xpra icon
Bug tracker and wiki

Opened 8 years ago

Last modified 8 years ago

#251 closed defect

server uses 100% CPU with old versions of Python — at Initial Version

Reported by: Antoine Martin Owned by:
Priority: critical Milestone: 0.8
Component: server Version: trunk
Keywords: Cc:


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 in this python.org ticket, and in 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):

  • overriding subprocess._cleanup
  • doing the reaping ourselves and calling _handle_exitstatus ourselves


Note: this is not the same as the 100% cpu bug in pygtk, which you can find here and here.

Change History (0)

Note: See TracTickets for help on using tickets.