This triggers more often in 0.8.x because we try to launch pulseaudio by default if sound is enabled, but this has nothing to do with sound: you can also trigger this bug with:
xpra start :10 --start-child=ls
'ls' will terminate and send python into a 100% CPU spin.
That's because we register a SIGCHLD
handler in order to support the --exit-with-children
flag, and this interferes with subprocess.Popen
in mysterious ways.
This is a known issue in Python versions 3.0 and 2.6 and older, only versions 2.7 and 3.1 onwards have the fix, more details this twisted bug.
All sorts of workarounds are suggested, but none of them seem to work here (at least not without significant code changes - which I am very reluctant to do simply to support broken versions of python):
subprocess._cleanup
_handle_exitstatus
ourselves
etc..
Note: this is not the same as the 100% cpu bug in pygtk which you can find this other 100% cpu bug (although this one probably shared the same underlying cause).
r2683 cleans up this mess: if you use a buggy Python version and --exit-with-children
then you will end up using polling, all other cases end up with cleaner/better code.
We will not be held hostage by already fixed bugs!
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/251