Skip to content
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

Daemon hangs for 30s when suspending a suspended instance #559

Closed
ricab opened this issue Jan 15, 2019 · 3 comments
Closed

Daemon hangs for 30s when suspending a suspended instance #559

ricab opened this issue Jan 15, 2019 · 3 comments

Comments

@ricab
Copy link
Collaborator

ricab commented Jan 15, 2019

Perhaps a minor issue, but:

$ multipass suspend graceful-cobia
$ time multipass suspend graceful-cobia 
                                                                                
real    0m30.041s
user    0m0.024s
sys     0m0.016s

An attached gdb shows the following stack:

#0  0x00007f481c10874d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f481689538c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f481689549c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f481cf393ff in QEventDispatcherGlib::processEvents (this=0x272b010, flags=...)
    at kernel/qeventdispatcher_glib.cpp:422
#4  0x00007f481cee3c3a in QEventLoop::exec (this=0x7ffe4c63a9f0, flags=...)
    at kernel/qeventloop.cpp:214
#5  0x00000000009e638c in multipass::Daemon::suspend(grpc::ServerContext*, multipass::SuspendRequest const*, grpc::ServerWriter<multipass::SuspendReply>*) ()
[...]

The thread serving the request waits here until timeout. Ideally it would reply back ASAP after realizing the instance was already suspended.

@ricab ricab changed the title Daemon hangs for 30s when suspending an suspended instance Daemon hangs for 30s when suspending a suspended instance Jan 15, 2019
@smokfyz
Copy link
Contributor

smokfyz commented Jan 15, 2019

Hey. Can I use this issue for the first contribution to the project?

@townsend2010
Copy link
Contributor

Hey @smokfyz,

Unless @ricab has already started to fix it, then yes, by all means, go for it!

Good luck and let us know if you have any questions.

@ricab
Copy link
Collaborator Author

ricab commented Jan 15, 2019

@smokfyz sure, go ahead! I haven't done anything on it yet, only reported.

bors bot added a commit that referenced this issue Jan 16, 2019
561: Fix daemon hangs when suspending a suspended instance. r=townsend2010 a=smokfyz

Fix #559 and also hangs when suspending a stopped instance.

Co-authored-by: Ivan Sharapenkov <[email protected]>
@bors bors bot closed this as completed in #561 Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants