virt-manager.py is being exec'd every second when running virt-manager

Bug #1292674 reported by Colin Ian King
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I've been trying to track down processes that keep the system busy and found that when running virt-manager virt-manager.py is being exec'd every second from the "init --user" process:

19:19:33 fork: parent pid 3037 (init --user)
19:19:33 -> child pid 22112 (python /usr/share/virt-manager/virt-manager.py)
19:19:33 exit: 0 pid 22112 (python /usr/share/virt-manager/virt-manager.py)
19:19:34 fork: parent pid 3037 (init --user)
19:19:34 -> child pid 22113 (python /usr/share/virt-manager/virt-manager.py)
19:19:34 exit: 0 pid 22113 (python /usr/share/virt-manager/virt-manager.py)
19:19:35 fork: parent pid 3037 (init --user)
19:19:35 -> child pid 22114 (python /usr/share/virt-manager/virt-manager.py)
19:19:35 exit: 0 pid 22114 (python /usr/share/virt-manager/virt-manager.py)
19:19:36 fork: parent pid 3037 (init --user)
19:19:36 -> child pid 22115 (python /usr/share/virt-manager/virt-manager.py)
19:19:36 exit: 0 pid 22115 (python /usr/share/virt-manager/virt-manager.py)
19:19:37 fork: parent pid 3037 (init --user)
19:19:37 -> child pid 22116 (python /usr/share/virt-manager/virt-manager.py)
19:19:37 exit: 0 pid 22116 (python /usr/share/virt-manager/virt-manager.py)
19:19:38 fork: parent pid 3037 (init --user)
19:19:38 -> child pid 22117 (python /usr/share/virt-manager/virt-manager.py)
19:19:38 exit: 0 pid 22117 (python /usr/share/virt-manager/virt-manager.py)

The script seems to be executing very quickly and terminating almost immediately. However, is it really necessary for this python script to be exec'd every second? It seems a little bit over the top.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug.

I could be missing it, but don't see anything in the code that would be doing this. I also didn't see it happening under strace. I assume this is happening under unity in trusty? How exactly are you starting virt-manager? Do you have anything under ~/.init or ~/.local/share/applications relating to virt-manager?

Revision history for this message
Stefan Bader (smb) wrote :

Looks to be the same cycle for me with the Precise version of virt-manager. This is just after startup with no autoconnection.

10:29:19 fork 6572 child /usr/bin/python /usr/share/virt-manager/virt-manager.py
10:29:19 exit 6572 0 0.000 /usr/bin/python /usr/share/virt-manager/virt-manager.py
10:29:21 fork 1 parent /sbin/ini
10:29:21 fork 6573 child /usr/bin/python /usr/share/virt-manager/virt-manager.py
10:29:21 exit 6573 0 0.000 /usr/bin/python /usr/share/virt-manager/virt-manager.py

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Colin Ian King (colin-king) wrote :

This is happening under Unity on Trusty. I'm starting virt-manager from the launcher. I have nothing in ~/.init

ls -al ~/.local/share/applications
total 28
drwxrwxr-x 3 king king 4096 Jan 29 15:12 .
drwx------ 36 king king 4096 Mar 19 09:19 ..
-rw-rw-r-- 1 king king 185 Nov 24 2012 BBCNewsbbccouk.desktop
-rw-rw-r-- 1 king king 253 Jan 29 15:12 GoogleCalendargooglecom.desktop
-rw-r--r-- 1 king king 266 Oct 29 17:30 Landscapelandscapecanonicalcom.desktop
-rw-rw-r-- 1 king king 1198 Jan 5 15:55 mimeapps.list
drwxrwxr-x 3 king king 4096 Mar 16 2012 wine

there relating to virt manager either.

Changed in virt-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

This is happening in engine.py by tick() starting a thread every second to update the stat graphics in the main window.

Revision history for this message
Colin Ian King (colin-king) wrote :

OK, so it's rather a heavyweight way to bump statistics.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

It looks like this has been addressed upstream, by among others commits 5e9e444dec and 76887c9a3.

Revision history for this message
Colin Ian King (colin-king) wrote :

@Serge, any idea when or if the fix will land in Trusty?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1292674] Re: virt-manager.py is being exec'd every second when running virt-manager

Quoting Colin King (<email address hidden>):
> @Serge, any idea when or if the fix will land in Trusty?

I think it will have to wait until we merge the next release, which
I'm told has issues due to new dependencies requiring MIR.

(Cherrypicking the likely candidates didn't work for me)

Revision history for this message
Colin Ian King (colin-king) wrote :

That works fine for me. Thanks Serge.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.