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

qvm-trim-template gets stuck on cleaning up #2728

Closed
hyperfekt opened this Issue Mar 26, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@hyperfekt

hyperfekt commented Mar 26, 2017

Qubes OS version (e.g., R3.2):

R3.2

Affected TemplateVMs (e.g., fedora-23, if applicable):

debian-8, whonix-gw, whonix-ws


Expected behavior:

After performing fstrim the qvm-trim-template command cleans up within a few seconds and exits.

Actual behavior:

fstrim done, cleaning up... is shown indefinitely. A keyboard interrupt displays the following:

Traceback (most recent call last):
    File "/usr/bin/qvm-trim-template", line 171, in <module>
        main()
    File "/usr/bin/qvm-trim-template", line 148, in main
        time.sleep(1)

The directory /var/lib/qubes/appvms/trim-[templatename] and the domain trim-[templatename] continue to exist.

Steps to reproduce the behavior:

  1. execute qvm-trim-template [templatevm], where [templatevm] is one of the affected (see above)

General notes:

Attempts to perform the cleanup manually with rm -r /var/lib/qubes/appvms/trim-[templatename], followed by virsh -c xen:/// undefine trim-[templatename] (as per #1910 (comment)) and virsh -c xen:/// destroy trim-[templatename] and then try to reproduce the issue with the same TemplateVM lead to failure to execute the qrexec-daemon:

Disk usage before:
2433080 /var/lib/qubes/vm-templates/debian-8/root.img
Creating temporary VM...
--> Creating volatile image: /var/lib/qubes/appvms/trim-debian-8/volatile.img...
--> Loading the VM (type = AppVM)...
--> Starting Qubes DB...
--> Setting Qubes DB info for the VM...
--> Updating firewall rules...
--> Starting the VM...
--> Starting the qrexec daemon...
Waiting for VM's qrexec agent.............................................................Cannot connect to 'trim-debian-8' qrexec agent for 60 seconds, giving up
Traceback (most recent call last):
  File "/usr/bin/qvm-trim-template", line 171, in <module>
    main()
  File "/usr/bin/qvm-trim-template", line 116, in main
    fstrim_vm.start(start_guid=False, verbose=True)
  File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 2031, in start
    self.start_qrexec_daemon(verbose=verbose,notify_function=notify_function)
  File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 1854, in start_qrexec_daemon
    raise OSError ("Cannot execute qrexec-daemon!")
OSError: Cannot execute qrexec-daemon!

A reboot does not change this.


Related issues:

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 26, 2017

Member

I've never seen this.
Are you using a vanilla 3.2? If not, what modifications have you made?
What are the specs of your Qubes machine?

Member

unman commented Mar 26, 2017

I've never seen this.
Are you using a vanilla 3.2? If not, what modifications have you made?
What are the specs of your Qubes machine?

@hyperfekt

This comment has been minimized.

Show comment
Hide comment
@hyperfekt

hyperfekt Mar 27, 2017

hyperfekt commented Mar 27, 2017

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Mar 27, 2017

Member

Just to check: Did the VM have a long name (#1655)?

Member

andrewdavidwong commented Mar 27, 2017

Just to check: Did the VM have a long name (#1655)?

@hyperfekt

This comment has been minimized.

Show comment
Hide comment
@hyperfekt

hyperfekt Mar 27, 2017

No, these were all the default templates.

hyperfekt commented Mar 27, 2017

No, these were all the default templates.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 28, 2017

Member

I dont use Whonix, but I do use Debian templates without seeing this behaviour, even on laptop with less than 8GB RAM.
I cant think of an obvious explanation why Debian based templates should behave differently from Fedora ones.
Could you try deleting the existing Debian-8, replacing it with the original taken from your install medium, and then try the trim?

Member

unman commented Mar 28, 2017

I dont use Whonix, but I do use Debian templates without seeing this behaviour, even on laptop with less than 8GB RAM.
I cant think of an obvious explanation why Debian based templates should behave differently from Fedora ones.
Could you try deleting the existing Debian-8, replacing it with the original taken from your install medium, and then try the trim?

@hyperfekt

This comment has been minimized.

Show comment
Hide comment
@hyperfekt

hyperfekt Mar 28, 2017

How exactly would I go about doing that? I don't appear to be able to find the original VM on the medium.
I presume I would create the VM using the qvm-create command.
Excuse if I'm a bit slow, I'm relatively new to both Linux and Qubes.
Alternatively I wouldn't mind reinstalling Qubes to get a fresh template, I've been wanting to do that anyway.
BTW, I stumbled upon another bug while trying to do this. (#2733)

hyperfekt commented Mar 28, 2017

How exactly would I go about doing that? I don't appear to be able to find the original VM on the medium.
I presume I would create the VM using the qvm-create command.
Excuse if I'm a bit slow, I'm relatively new to both Linux and Qubes.
Alternatively I wouldn't mind reinstalling Qubes to get a fresh template, I've been wanting to do that anyway.
BTW, I stumbled upon another bug while trying to do this. (#2733)

@hyperfekt

This comment has been minimized.

Show comment
Hide comment
@hyperfekt

hyperfekt Apr 1, 2017

I did a complete reinstall, and this time this glitch(?) did not appear. o_o

I did a complete reinstall, and this time this glitch(?) did not appear. o_o

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Apr 2, 2017

Member

Ok, feel free to let us know if the issue recurs.

Member

andrewdavidwong commented Apr 2, 2017

Ok, feel free to let us know if the issue recurs.

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