Bug 15593

Summary: AB-INT: QEMU fails with release unlocked lock
Product: [QA/Testing] Functional (self) Testing Reporter: Mathieu Dubois-Briand <mathieu.dubois-briand>
Component: oe-selftestAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+    
Version: unspecified   
Target Milestone: 5.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Mathieu Dubois-Briand 2024-09-12 08:42:57 UTC
Autobuilder fail during qemux86-64-tc on fedora38-ty-6

https://autobuilder.yoctoproject.org/typhoon/#/builders/148/builds/2169/steps/12/logs/stdio

[?7h
Extra log data exception OSError(9, 'Bad file descriptor')
2024-09-08 01:20:25,745 - oe-selftest - INFO - 10: 1/2 6/18 (33.38s) (0 failed) (runqemu.QemuTest.test_qemu_can_boot_nfs_and_shutdown)
2024-09-08 01:20:25,745 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/qemux86-64-tc/build/meta/lib/oeqa/utils/commands.py", line 374, in runqemu
    qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes)
  File "/home/pokybuild/yocto-worker/qemux86-64-tc/build/meta/lib/oeqa/targetcontrol.py", line 164, in start
    start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd, qemuparams=params)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pokybuild/yocto-worker/qemux86-64-tc/build/meta/lib/oeqa/utils/qemurunner.py", line 522, in launch
    self.thread.serial_lock.release()
RuntimeError: release unlocked lock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/qemux86-64-tc/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 214, in test_qemu_can_boot_nfs_and_shutdown
    with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
  File "/usr/lib64/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/pokybuild/yocto-worker/qemux86-64-tc/build/meta/lib/oeqa/utils/commands.py", line 380, in runqemu
    raise Exception(msg)
Exception: release unlocked lock
Failed to start QEMU - see the logs in /home/pokybuild/yocto-worker/qemux86-64-tc/build/build-st-2145515/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/testimageQemurunner log output from /home/pokybuild/yocto-worker/qemux86-64-tc/build/build-st-2145515/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/testimage/qemurunner_log.20240908010736:
Comment 2 Mathieu Dubois-Briand 2024-09-25 08:54:31 UTC
qemuppc fedora38-ty-6
https://autobuilder.yoctoproject.org/typhoon/#/builders/63/builds/9226/steps/14/logs/stdio
Comment 4 Richard Purdie 2024-11-07 14:58:07 UTC
Many of these are really caused by KVM hangs in the bootloader on arm. Those were fixed by disabling KVM in the booloader tests. 

The lock issue was fixed with:

https://git.yoctoproject.org/poky/commit/?id=d29f43bd0b4644b850e7e4cfe294ffd899bd6e6d