Compose: Pyinstaller has issues with signals

Created on 12 Feb 2016  路  5Comments  路  Source: docker/compose

There's a bunch of history in #1040 and #2055.

We've tried multiple implementations of signal handlers, but each has their own set of issues, but ONLY when run from the frozen binary created by pyinstaller.

It looks like there is a very old issue in pyinstaller around this: https://github.com/pyinstaller/pyinstaller/issues/208

These problems can manifest in three ways:

  • a thread.error when a signal interrupts a thread lock
  • the signal handlers being completely ignored and raising a KeynoardInterupt instead
  • the signal handlers being registered but the try/except to handle the except is skipped (this could be caused by the signal firing multiple times for a single ctrl-c, but I can't really verify that's what is happening)
arepackaging kinbug

Most helpful comment

@Vanuan Not completely. We've reduced the number of situations under which it can happen, but haven't completely tracked it down.

All 5 comments

https://github.com/pyinstaller/pyinstaller/pull/1822 seems to fix it!

We could run my patched version to build the binaries if they don't want to accept the patch upstream. I'll prepare a PR so it can be tested on OSX.

It looks like the windows branch uses a completely different function, so there should be no impact on windows.

Having just upgraded to 1.6.1, I'm now hitting this most of the time. It's an irregular behaviour: sometimes CTRL-C stops the container, some times it aborts. Quite an annoying bug, leaving containers running in the background when I wasn't aware of it!

Is this fixed in 1.7?

docker-compose --version
docker-compose version 1.6.2, build 4d72027

@Vanuan Not completely. We've reduced the number of situations under which it can happen, but haven't completely tracked it down.

Shouldn't this be reopened? At least there should be a patch to print traces when this happens. Are you lacking information? Or is it an upstream issue?

Was this page helpful?
0 / 5 - 0 ratings