[Fixed] long delay when stopping Lubuntu

Postings relating to old VirtualBox pre-releases
Post Reply
taz
Posts: 35
Joined: 10. Aug 2012, 10:03

[Fixed] long delay when stopping Lubuntu

Post by taz »

Hi guys
after installation of BETA1/2 addons to guest stopping/shutdown of guest takes a VERY long time (original like 1-2s, now more than minute).

I think this is something with systemd + GAs, I'd appreciate if someone could try to reproduce, it should be fairly easy to spot the prob/performance regression (delay).

thnx
L
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: long delay when stopping Lubuntu

Post by frank »

Which version of VirtualBox Guest Additions do you have installed? I saw such delays as well but so far only with 5.0.x, not with trunk. Can you confirm that? Of course this should also not happen with the 5.0.x Guest Additions and we need to fix that.
taz
Posts: 35
Joined: 10. Aug 2012, 10:03

Re: long delay when stopping Lubuntu

Post by taz »

xx@box:~$ VBoxControl --version
5.1.0_BETA2r107840
xx@box:~$ uname -a
Linux vpnbox 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
xx@box:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

If I press ESC on console I get stopping services(mostly vbox), last is:
Stopped vboxadd.service

and then nothing (some timeout however counts in background, I was able to get uncolored console in one reboot and that had some timeout counter from systemd which ev. killed stuck process)
taz
Posts: 35
Joined: 10. Aug 2012, 10:03

Re: long delay when stopping Lubuntu

Post by taz »

after I manually killed all processes the shutdown was fast again ;)

It seems the culprit is drag and drop process
after I kill manually the shutdown is fast again ;)

878 ? S 0:00 /usr/bin/VBoxClient --draganddrop
879 ? Sl 0:00 \_ /usr/bin/VBoxClient --draganddrop

note that parent 878 reacts properly to kill
BUT 879 has to be killed with -9, otherwise no luck (which is the timeout we see)

NOTE that I have drag and drop disabled completely (I tried enabling it, still no luck), so basically 879 needs to react to kill properly ... (especially if drag and drop is not used :) )

@frank - is this enough for you to get someone to fix this?

tia
L
bqbauer
Posts: 159
Joined: 14. Dec 2008, 22:04

Re: long delay when stopping Lubuntu

Post by bqbauer »

Ditto, long delays shutting down 16.04. See the other message thread on this topic for my logs
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: long delay when stopping Lubuntu

Post by frank »

taz wrote:after I manually killed all processes the shutdown was fast again ;)

It seems the culprit is drag and drop process
after I kill manually the shutdown is fast again ;)

878 ? S 0:00 /usr/bin/VBoxClient --draganddrop
879 ? Sl 0:00 \_ /usr/bin/VBoxClient --draganddrop

note that parent 878 reacts properly to kill
BUT 879 has to be killed with -9, otherwise no luck (which is the timeout we see)

NOTE that I have drag and drop disabled completely (I tried enabling it, still no luck), so basically 879 needs to react to kill properly ... (especially if drag and drop is not used :) )

@frank - is this enough for you to get someone to fix this?

tia
L
Great finding! Sure, that's enough to fix the problem. How did you find the offending process? Was is just trial and error or does systemd provide any logging which points to the offending process?

Thank you!
taz
Posts: 35
Joined: 10. Aug 2012, 10:03

Re: long delay when stopping Lubuntu

Post by taz »

trial and error, so basically lucky guess by looking at ptree ( I mean ps axf :) )

tia for the fix
L
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: long delay when stopping Lubuntu

Post by frank »

I'm asking because I'm not aware how to convince systemd to log such shutdown delays. Anyway, found the problem, will be fixed in Beta 3.
taz
Posts: 35
Joined: 10. Aug 2012, 10:03

Re: [Fixed] long delay when stopping Lubuntu

Post by taz »

neither do I, but it'd be nice to see some detailed logs on when systemd decides to use SIGKILL on a process that misbehaves and SIGHUP ain't enough

so if I will find a way I will spam you here :)
(feel free to do the same)

tia
L
Post Reply