Bug 14007

Summary: When qemu hangs, try to create a snapshot or core file.
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Randy MacLeod <randy.macleod>
Component: oe-core otherAssignee: Randy MacLeod <randy.macleod>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium+ CC: paulg, sakib.sajal, sgw, tim.orling
Version: 3.2   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Randy MacLeod 2020-08-13 11:01:03 UTC
Some Yocto Autobuilder intermittent failures involve cases where Qemu appears to be hung. we should use Qemu's snapshot feature to store the state of the VM so that the problem can be debugged at a later time. 

If snapshotting does not work often enough we could also consider forcing Qemu to dump a core file using gcore ( https://sourceware.org/gdb/onlinedocs/gdb/Core-File-Generation.html ) or perhaps by sending it a SIGINT since we want the process to terminate.

Both of these approaches would should archive the data produced and put a policy in place for when additional archives would cause the local filesystem to become 'too full'. Perhaps deleting the oldest archive would make sense.
Comment 1 Randy MacLeod 2022-03-24 16:15:14 UTC
Saul added code to talk with the qemu system using the QMP protocol in:
meta/lib/oeqa/utils/qemurunner.py

I think that if that fails, then we try to create a snapshot and if that fails, dump a core file.
Comment 2 Randy MacLeod 2022-06-16 15:27:35 UTC
Some of this is done but we need to document it and ensure that the SWAT team knows how to make use of the feature.
Comment 3 Randy MacLeod 2025-02-14 16:46:37 UTC
bulk change to add Saul's non-WR address.
Comment 4 Randy MacLeod 2025-02-14 16:48:24 UTC
Bulk change: Remove Saul's old WR address.