#!python
GLOB sdist-make: /home/hpk/p/execnet/setup.py
py32 inst-nodeps: /home/hpk/p/execnet/.tox/dist/execnet-1.1.1dev5.zip
py32 runtests: commands[0] | py.test -rsfxX --junitxml=/home/hpk/p/execnet/.tox/py32/log/junit-py32.xml test_channel.py -k not(jython) -v -x
==================================== test session starts ====================================
platform linux2 -- Python 3.2.3 -- pytest-2.3.5 -- /home/hpk/p/execnet/.tox/py32/bin/python3.2
gateway test setup scope: session
execnet: /home/hpk/p/execnet/execnet/__init__.py -- 1.1.1dev5
plugins: timeout
collected 122 items
test_channel.py:15: TestChannelBasicBehaviour.test_serialize_error[popen] PASSED
test_channel.py:15: TestChannelBasicBehaviour.test_serialize_error[socket] PASSED
test_channel.py:15: TestChannelBasicBehaviour.test_serialize_error[ssh] SKIPPED
test_channel.py:15: TestChannelBasicBehaviour.test_serialize_error[proxy] PASSED
test_channel.py:15: TestChannelBasicBehaviour.test_serialize_error[proxy] ERROR
========================================== ERRORS ===========================================
________ ERROR at teardown of TestChannelBasicBehaviour.test_serialize_error[proxy] _________
group = <Group ['proxy-transport']>
> teardown=lambda group: group.terminate(timeout=1),
extrakey="testgroup",
scope=scope,
)
../conftest.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Group ['proxy-transport']>, timeout = 1
def terminate(self, timeout=None):
""" trigger exit of member gateways and wait for termination
of member gateways and associated subprocesses. After waiting
timeout seconds try to to kill local sub processes of popen-
and ssh-gateways. Timeout defaults to None meaning
open-ended waiting and no kill attempts.
"""
while self:
from execnet.threadpool import WorkerPool
vias = {}
for gw in self:
if gw.spec.via:
vias[gw.spec.via] = True
for gw in self:
if gw.id not in vias:
gw.exit()
def join_wait(gw):
gw.join()
gw._io.wait()
def kill(gw):
trace("Gateways did not come down after timeout: %r" % gw)
gw._io.kill()
safe_terminate(timeout, [
(lambda: join_wait(gw), lambda: kill(gw))
> for gw in self._gateways_to_join])
../execnet/multi.py:168:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout = 1
list_of_paired_functions = [(<function <lambda> at 0x3184d10>, <function <lambda> at 0x3184d98>)]
def safe_terminate(timeout, list_of_paired_functions):
workerpool = WorkerPool(len(list_of_paired_functions)*2)
def termkill(termfunc, killfunc):
termreply = workerpool.dispatch(termfunc)
try:
termreply.get(timeout=timeout)
except IOError:
killfunc()
replylist = []
for termfunc, killfunc in list_of_paired_functions:
reply = workerpool.dispatch(termkill, termfunc, killfunc)
replylist.append(reply)
for reply in replylist:
reply.get()
workerpool.shutdown()
> workerpool.join()
../execnet/multi.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <execnet.threadpool.WorkerPool object at 0x318db90>, timeout = None
def join(self, timeout=None):
""" wait until all worker threads have terminated. """
current = threading.currentThread()
deadline = delta = None
if timeout is not None:
deadline = time.time() + timeout
for thread in list(self._alive):
if deadline:
delta = deadline - time.time()
if delta <= 0:
raise IOError("timeout while joining threads")
> thread.join(timeout=delta)
../execnet/threadpool.py:164:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <WorkerThread(Thread-8, started daemon 140035077621504)>, timeout = None
def join(self, timeout=None):
if not self._initialized:
raise RuntimeError("Thread.__init__() not called")
if not self._started.is_set():
raise RuntimeError("cannot join thread before it is started")
if self is current_thread():
raise RuntimeError("cannot join current thread")
if __debug__:
if not self._stopped:
self._note("%s.join(): waiting until thread stops", self)
self._block.acquire()
try:
if timeout is None:
while not self._stopped:
> self._block.wait()
../../../.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py:854:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Condition(<_thread.lock object at 0x3188890>, 1)>, timeout = None
def wait(self, timeout=None):
if not self._is_owned():
raise RuntimeError("cannot wait on un-acquired lock")
waiter = _allocate_lock()
waiter.acquire()
self._waiters.append(waiter)
saved_state = self._release_save()
try: # restore state no matter what (e.g., KeyboardInterrupt)
if timeout is None:
> waiter.acquire()
E Failed: Timeout >20s
../../../.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py:235: Failed
-------------------------------------- Captured stderr --------------------------------------
Exception in thread io-forward-proxy:
Traceback (most recent call last):
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 121, in from_io
header = io.read(9) # type 1, channel 4, payload 4
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 93, in read
raise EOFError("expected %d bytes, got %d" %(numbytes, len(buf)))
EOFError: expected 9 bytes, got 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 693, in run
self._target(*self._args, **self._kwargs)
File "", line 149, in iothread
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 124, in from_io
raise EOFError('couldnt load message header, ' + e.args[0])
EOFError: couldnt load message header, expected 9 bytes, got 0
+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
~~~~~~~~~~~~~~~~~~~~~ Stack of Thread-8 (140035077621504) ~~~~~~~~~~~~~~~~~~~~~~
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 713, in _bootstrap
self._bootstrap_inner()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/home/hpk/p/execnet/execnet/threadpool.py", line 84, in run
while self._run_once():
File "/home/hpk/p/execnet/execnet/threadpool.py", line 72, in _run_once
result = func(*args, **kwargs)
File "/home/hpk/p/execnet/execnet/multi.py", line 167, in <lambda>
(lambda: join_wait(gw), lambda: kill(gw))
File "/home/hpk/p/execnet/execnet/multi.py", line 160, in join_wait
gw.join()
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 735, in join
self._receiverthread.join(timeout)
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 854, in join
self._block.wait()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 235, in wait
waiter.acquire()
~~~~~~~~~~~~~~~~~~~~~ Stack of receiver (140035086014208) ~~~~~~~~~~~~~~~~~~~~~~
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 713, in _bootstrap
self._bootstrap_inner()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 693, in run
self._target(*self._args, **self._kwargs)
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 674, in _thread_receiver
msg = Message.from_io(io)
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 121, in from_io
header = io.read(9) # type 1, channel 4, payload 4
File "/home/hpk/p/execnet/execnet/gateway_io.py", line 111, in read
return self.io.read(nbytes)
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 615, in read
self._buffer += self.channel.receive()
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 445, in receive
x = itemqueue.get(timeout=internal_timeout)
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/queue.py", line 194, in get
self.not_empty.wait(remaining)
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 241, in wait
gotit = waiter.acquire(True, timeout)
~~~~~~~~~~~~~~~~~~~~~ Stack of receiver (140035101587200) ~~~~~~~~~~~~~~~~~~~~~~
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 713, in _bootstrap
self._bootstrap_inner()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/home/hpk/.pythonbrew/pythons/Python-3.2.3/lib/python3.2/threading.py", line 693, in run
self._target(*self._args, **self._kwargs)
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 674, in _thread_receiver
msg = Message.from_io(io)
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 121, in from_io
header = io.read(9) # type 1, channel 4, payload 4
File "/home/hpk/p/execnet/execnet/gateway_base.py", line 91, in read
data = self._read(numbytes-len(buf))
+++++++++++++++++++++++++++++++++++ Timeout ++++++++++++++++++++++++++++++++++++
----------- generated xml file: /home/hpk/p/execnet/.tox/py32/log/junit-py32.xml ------------
================================== short test summary info ==================================
SKIP [1] /home/hpk/p/execnet/conftest.py:64: no 'gspecs' value found
!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
======================= 3 passed, 1 skipped, 1 error in 20.21 seconds =======================
ERROR: InvocationError: '/home/hpk/p/execnet/.tox/py32/bin/py.test -rsfxX --junitxml=/home/hpk/p/execnet/.tox/py32/log/junit-py32.xml test_channel.py -k not(jython) -v -x'
___________________________________