python3-twisted seems to be broken for txfixture package

Bug #1705768 reported by Rafael David Tinoco
0
Affects Status Importance Assigned to Milestone
twisted (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

When trying to package txfixture using regular python3-twisted package I get this:

$ ps auxwww | grep cannotlis
ubuntu 46610 0.5 0.8 34884 29268 pts/1 S+ 19:33 0:00 /usr/bin/python3.5 -Wignore::DeprecationWarning /usr/bin/twistd -o -y /home/ubuntu/source/packages/txfixture/recipe/.pybuild/pythonX.Y_3.5/build/tests/cannotlisten.tac --pidfile /tmp/tmpiae4_7c4/cannotlisten.pid --logfile /tmp/tmpiae4_7c4/cannotlisten.log

$ cat /tmp/tmpiae4_7c4/cannotlisten.log
2017-07-21 19:33:54+0000 [-] Log opened.
2017-07-21 19:33:54+0000 [-] twistd 16.0.0 (/usr/bin/python3.5 3.5.2) starting up.
2017-07-21 19:33:54+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2017-07-21 19:33:54+0000 [-] Traceback (most recent call last):
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 982, in startListening
2017-07-21 19:33:54+0000 [-] skt.bind(addr)
2017-07-21 19:33:54+0000 [-] PermissionError: [Errno 13] Permission denied
2017-07-21 19:33:54+0000 [-]
2017-07-21 19:33:54+0000 [-] During handling of the above exception, another exception occurred:
2017-07-21 19:33:54+0000 [-]
2017-07-21 19:33:54+0000 [-] Traceback (most recent call last):
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 207, in postApplication
2017-07-21 19:33:54+0000 [-] self.startApplication(self.application)
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 394, in startApplication
2017-07-21 19:33:54+0000 [-] service.IService(application).privilegedStartService()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/application/service.py", line 278, in privilegedStartService
2017-07-21 19:33:54+0000 [-] service.privilegedStartService()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/application/internet.py", line 106, in privilegedStartService
2017-07-21 19:33:54+0000 [-] self._port = self._getPort()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/application/internet.py", line 134, in _getPort
2017-07-21 19:33:54+0000 [-] 'listen%s' % (self.method,))(*self.args, **self.kwargs)
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 478, in listenTCP
2017-07-21 19:33:54+0000 [-] p.startListening()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 984, in startListening
2017-07-21 19:33:54+0000 [-] raise CannotListenError(self.interface, self.port, le)
2017-07-21 19:33:54+0000 [-] twisted.internet.error.CannotListenError: Couldn't listen on any:1: [Errno 13] Permission denied.
2017-07-21 19:33:54+0000 [-]
2017-07-21 19:33:54+0000 [-] During handling of the above exception, another exception occurred:
2017-07-21 19:33:54+0000 [-]
2017-07-21 19:33:54+0000 [-] Traceback (most recent call last):
2017-07-21 19:33:54+0000 [-] File "/usr/bin/twistd", line 18, in <module>
2017-07-21 19:33:54+0000 [-] run()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 29, in run
2017-07-21 19:33:54+0000 [-] app.run(runApp, ServerOptions)
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 617, in run
2017-07-21 19:33:54+0000 [-] runApp(config)
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
2017-07-21 19:33:54+0000 [-] _SomeApplicationRunner(config).run()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 352, in run
2017-07-21 19:33:54+0000 [-] self.postApplication()
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 213, in postApplication
2017-07-21 19:33:54+0000 [-] untilConcludes(os.write, statusPipe, "1 %s" % (strippedError,))
2017-07-21 19:33:54+0000 [-] File "/usr/lib/python3/dist-packages/twisted/python/util.py", line 713, in untilConcludes
2017-07-21 19:33:54+0000 [-] return f(*a, **kw)
2017-07-21 19:33:54+0000 [-] TypeError: a bytes-like object is required, not 'str'

And txfixture package hangs in

tests.test_tachandler.TacTestFixtureTestCase.test_couldNotListenTac

Because the exception is not caught by twisted (that had exception itself).

"twisted" package found at:

https://launchpad.net/~ubuntu-debian-backports/+archive/ubuntu/sid

seems to be able to solve this.

I guess changes in between those 2 versions fix this issue.

Changed in twisted (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
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.