[Avocado-devel] avocado-vt hangs with: Creating new, empty env file 2
Andrei Stepanov
astepano at redhat.com
Fri Feb 10 13:05:51 UTC 2017
Hi
For a long time SpiceQE from time to time had this error:
Exception thrown while loading env
(AttributeError("'VM' object has no attribute 'name'",), <class
virttest.qemu_monitor.HumanMonitor at 0x3992a78>, (<virttest.qemu_vm.VM
object at 0x3e25950>, 'hmp1',
'/var/tmp/avocado_bFZBC6/monitor-hmp1-20170210-134859-mVznyQoq', False))
Creating new, empty env file 2
After which Avocado test process hangs forever. It was very hard to explain.
I finally found the cause.
It is easy reproduce even with "boot" test.
1. Change boot.py to raise any exception at the beginning of run()
function: "raise E...."
2. Run this test with:
avocado run --show-job-log boot --vt-extra-params 'kill_vm=no'
'kill_vm_on_error=no'
This test will stay active all time no matter what.
The problem is: there is active thread:
[<_MainThread(MainThread, started 140040446437184)>,
<Thread(tail_thread_MwKAuDx9_QEMU_AUDIO, started 140040077772544)>]
tail_thread_xxxxxx thread is created at:
./lib/python2.7/site-packages/aexpect/client.py:624:
self.tail_thread = threading.Thread(target=self._tail,
This is a cause that Avocado process stays active.
It reaches exit point:
--Return--
> /mnt/tests/spice/qe-tests/virtualenv/bin/avocado(83)<module>()->None
-> sys.exit(app.run())
(Pdb)
But running thread doesn't allow to exit:
# strace -f -p 22879
Process 22879 attached with 2 threads
[pid 22879] select(10, [9], [], [], {0, 17975} <unfinished ...>
[pid 22353] futex(0x45e0760, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 22879] <... select resumed> ) = 0 (Timeout)
[pid 22879] select(10, [9], [], [], {0, 50000}) = 0 (Timeout)
[pid 22879] select(10, [9], [], [], {0, 50000}) = 0 (Timeout)
[pid 22879] select(10, [9], [], [], {0, 50000}) = 0 (Timeout)
[pid 22879] select(10, [9], [], [], {0, 50000}) = 0 (Timeout)
Okay. We can set "kill_vm" to "yes". But...... There is something wrong
with:
kill_vm = no + kill_vm_on_error=no
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20170210/814505f6/attachment.htm>
More information about the Avocado-devel
mailing list