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

Qubes VM Manager: crash #1110

Closed
adrelanos opened this Issue Aug 9, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@adrelanos
Member

adrelanos commented Aug 9, 2015

Since I upgraded from the testers repository, Qubes VM Manger is sometimes crashing. Was starting net-vm. Window closes. Gone. Version 3.0.7-1.

I have an strace -f qubes-manager. Should I attach? Would that help? Or would you like any other means of debugging?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 9, 2015

Member

Backtrace would be better. If there wasn't error message window, check

on stderr (~/.xsession-errors).

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Aug 9, 2015

Backtrace would be better. If there wasn't error message window, check

on stderr (~/.xsession-errors).

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Aug 10, 2015

Member

I was confused. strace -f qubes-manager doesn't even show up a window.

There wasn't an error in the terminal.

~/.xsession-errors:
http://justpaste.it/mx1j

I failed to empty the file and to reproduce so you could read a smaller ~/.xsession-errors.

Member

adrelanos commented Aug 10, 2015

I was confused. strace -f qubes-manager doesn't even show up a window.

There wasn't an error in the terminal.

~/.xsession-errors:
http://justpaste.it/mx1j

I failed to empty the file and to reproduce so you could read a smaller ~/.xsession-errors.

@marmarek marmarek added this to the Release 3.1 milestone Sep 2, 2015

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Sep 18, 2015

Member

Quote @marmarek from https://groups.google.com/d/msg/qubes-users/y8ChV2zh4gY/Ol095qqnLAAJ

I think I've found a fix, just want to confirm that fixes the problem in
your case. Open /usr/lib64/python2.7/site-packages/qubes/qubesutils.py,
go to line 826 and change VIR_DOMAIN_EVENT_STARTED to
VIR_DOMAIN_EVENT_RESUMED. Then restart qubes-manager.

I've applied this fix and since then, Qubes Manger never crashed for me again. No longer able to reproduce this issue. Before it crashed quite often. Therefore closing this one.

Member

adrelanos commented Sep 18, 2015

Quote @marmarek from https://groups.google.com/d/msg/qubes-users/y8ChV2zh4gY/Ol095qqnLAAJ

I think I've found a fix, just want to confirm that fixes the problem in
your case. Open /usr/lib64/python2.7/site-packages/qubes/qubesutils.py,
go to line 826 and change VIR_DOMAIN_EVENT_STARTED to
VIR_DOMAIN_EVENT_RESUMED. Then restart qubes-manager.

I've applied this fix and since then, Qubes Manger never crashed for me again. No longer able to reproduce this issue. Before it crashed quite often. Therefore closing this one.

@adrelanos adrelanos closed this Sep 18, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Sep 18, 2015

Member

Wait a sec, for fix being pushed to the repo :)

Member

marmarek commented Sep 18, 2015

Wait a sec, for fix being pushed to the repo :)

@marmarek marmarek reopened this Sep 18, 2015

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Sep 20, 2015

Member

Got another Qubes VM Manager crash. Before I did qvm-run --all "sudo poweroff'. From then I was unable to start sys-net again. Qubes VM Manager kept crashing. I try gathering the debug info as explained in https://groups.google.com/forum/#!msg/qubes-users/y8ChV2zh4gY/Ol095qqnLAAJ.

Member

adrelanos commented Sep 20, 2015

Got another Qubes VM Manager crash. Before I did qvm-run --all "sudo poweroff'. From then I was unable to start sys-net again. Qubes VM Manager kept crashing. I try gathering the debug info as explained in https://groups.google.com/forum/#!msg/qubes-users/y8ChV2zh4gY/Ol095qqnLAAJ.

@marmarek marmarek modified the milestones: Release 3.0, Release 3.1 Sep 23, 2015

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Oct 2, 2015

utils/QubesWatch: use timers to retry QubesDB watch registration
QubesWatch._register_watches is called from libvirt event callback,
asynchronously to qvm-start. This means that `qubesdb-daemon` may
not be running or populated yet.

If first QubesDB connection (or watch registration) fails, schedule next
try using timers in libvirt event API (as it is base of QubesWatch
mainloop), instead of some sleep loop. This way other events will be
processed in the meantime.

QubesOS/qubes-issues#1110

(cherry picked from commit 5f0d564)

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Oct 2, 2015

utils/QubesWatch: register domain watches on VIR_DOMAIN_EVENT_RESUMED
QubesVM.start() first creates domain as paused, completes its setup
(including starting qubesdb-daemon and creating appropriate entries),
then resumes the domain. So wait for that resume to be sure that
`qubesdb-daemon` is already running and populated.

QubesOS/qubes-issues#1110

(cherry picked from commit ef60956)

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Oct 2, 2015

utils/QubesWatch: use timers to retry QubesDB watch registration
QubesWatch._register_watches is called from libvirt event callback,
asynchronously to qvm-start. This means that `qubesdb-daemon` may
not be running or populated yet.

If first QubesDB connection (or watch registration) fails, schedule next
try using timers in libvirt event API (as it is base of QubesWatch
mainloop), instead of some sleep loop. This way other events will be
processed in the meantime.

QubesOS/qubes-issues#1110

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Oct 2, 2015

utils/QubesWatch: register domain watches on VIR_DOMAIN_EVENT_RESUMED
QubesVM.start() first creates domain as paused, completes its setup
(including starting qubesdb-daemon and creating appropriate entries),
then resumes the domain. So wait for that resume to be sure that
`qubesdb-daemon` is already running and populated.

QubesOS/qubes-issues#1110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment