New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'multipass exec' hangs in some cases (race condition?) #16

Closed
simos opened this Issue Dec 14, 2017 · 1 comment

Comments

Projects
None yet
4 participants
@simos

simos commented Dec 14, 2017

If you try

multipass exec myVM -- uname -a

several times, it hangs (around one out of three times).
You would need to stop, then restart the virtual machine in order to continue.

I managed to get

multipass exec myVM pwd

to hang by trying it about 15 times. Therefore, it does not matter which command it is. But some commands are too prone to hang than others.

@Saviq Saviq added the bug label Dec 14, 2017

@Saviq

This comment has been minimized.

Show comment
Hide comment
@Saviq

Saviq Dec 14, 2017

Collaborator

Confirmed:

⟫ while ./build/bin/multipass exec premium-jaguar -- uname -a; do true; done                                                                                 
Linux premium-jaguar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Linux premium-jaguar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Linux premium-jaguar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# hang

When this happens, the multipass client has this in gdb: gdb.txt

Collaborator

Saviq commented Dec 14, 2017

Confirmed:

⟫ while ./build/bin/multipass exec premium-jaguar -- uname -a; do true; done                                                                                 
Linux premium-jaguar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Linux premium-jaguar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Linux premium-jaguar 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# hang

When this happens, the multipass client has this in gdb: gdb.txt

albaguirre added a commit to albaguirre/multipass that referenced this issue Dec 15, 2017

[ssh client] Check for EOF before event poll
Prevent hangs by checking for ssh channel EOF before blocking
waiting for the next event which won't occur. Fixes CanonicalLtd#16

@Saviq Saviq closed this in #21 Dec 15, 2017

Saviq added a commit that referenced this issue Dec 15, 2017

[ssh client] Check for EOF before event poll
Prevent hangs by checking for ssh channel EOF before blocking
waiting for the next event which won't occur. Fixes #16

@Saviq Saviq added this to the 2017.2.3 milestone Apr 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment