SIGWINCH signal only works in main thread

Bug #540457 reported by Edwin Grubbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

I get this traceback when bzrlib is imported by a different thread than the main thread.

Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/egrubbs/canonical/lp-sourcedeps/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/bin/shell_objects.py", line 114, in run_functest
    functest.run_framework(test_args=[module_name], test_runner=WindmillFunctestRunner())
  File "/home/egrubbs/canonical/lp-sourcedeps/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_functest/__init__.py", line 33, in run_framework
    tests.append([ test_collector.create_test_module(arg), module_chain ])
  File "/home/egrubbs/canonical/lp-sourcedeps/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_functest/collector.py", line 68, in create_test_module
    test_module = self.import_module(path)
  File "/home/egrubbs/canonical/lp-sourcedeps/eggs/windmill-1.3beta3_lp_r1440-py2.5.egg/windmill/dep/_functest/collector.py", line 32, in import_module
    module = imp.load_module(name, filename, pathname, description)
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/translations/windmill/tests/test_pofile_translate.py", line 10, in <module>
    from lp.translations.windmill.testing import TranslationsWindmillLayer
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/translations/windmill/testing.py", line 12, in <module>
    from canonical.testing.layers import BaseWindmillLayer
  File "/home/egrubbs/canonical/lp-branches/review/lib/canonical/testing/__init__.py", line 76, in <module>
    from canonical.testing.layers import *
  File "/home/egrubbs/canonical/lp-branches/review/lib/canonical/testing/layers.py", line 99, in <module>
    from canonical.launchpad.interfaces import IMailBox, IOpenLaunchBag
  File "/home/egrubbs/canonical/lp-branches/review/lib/canonical/launchpad/interfaces/__init__.py", line 12, in <module>
    from lp.bugs.interfaces.malone import *
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/bugs/interfaces/malone.py", line 12, in <module>
    from lp.bugs.interfaces.bug import IBug
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/bugs/interfaces/bug.py", line 41, in <module>
    from lp.bugs.interfaces.bugbranch import IBugBranch
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/bugs/interfaces/bugbranch.py", line 26, in <module>
    from lp.code.interfaces.branch import IBranch
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/code/interfaces/branch.py", line 62, in <module>
    from lp.code.bzr import BranchFormat, ControlFormat, RepositoryFormat
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/code/bzr.py", line 18, in <module>
    import lp.codehosting
  File "/home/egrubbs/canonical/lp-branches/review/lib/lp/codehosting/__init__.py", line 23, in <module>
    from bzrlib.plugin import load_plugins
  File "/home/egrubbs/canonical/lp-sourcedeps/eggs/bzr-2.1.0-py2.5-linux-i686.egg/bzrlib/plugin.py", line 36, in <module>
    from bzrlib import osutils
  File "/home/egrubbs/canonical/lp-sourcedeps/eggs/bzr-2.1.0-py2.5-linux-i686.egg/bzrlib/osutils.py", line 1446, in <module>
    signal.signal(signal.SIGWINCH, _terminal_size_changed)
ValueError: signal only works in main thread

Revision history for this message
Andrew Bennetts (spiv) wrote :

Probably something to fix in the 2.1 branch as well as trunk. Maybe just a try/except is good enough?

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 540457] Re: SIGWINCH signal only works in main thread

On 18 March 2010 10:47, Andrew Bennetts <email address hidden> wrote:
> *** This bug is a duplicate of bug 521989 ***
>    https://bugs.launchpad.net/bugs/521989
>
> Probably something to fix in the 2.1 branch as well as trunk.  Maybe
> just a try/except is good enough?
>
> ** Changed in: bzr
>   Importance: Undecided => High
>
> ** Changed in: bzr
>       Status: New => Confirmed

How on earth did you change the importance when it was already a dupe?
 Some kind of race in Launchpad perhaps between setting the values and
sending the mail?

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Martin Pool (mbp) wrote :

Spiv, actually bug 521989 claims to be fixed in (not yet released) 2.1.1

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.