Bug 15562

Summary: boot failures due to entering emergency mode
Product: [QA/Testing] Runtime Testing Reporter: Ross Burton <ross.burton>
Component: testimageAssignee: Jon Mason <jon.mason>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: jon.mason, randy.macleod
Version: unspecified   
Target Milestone: 5.1 M3   
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 Ross Burton 2024-07-24 13:01:54 UTC
Occasionally (mostly on sbsa-ref, so arm64) the system fails to boot and systemd drops into emergency mode:

WARNING: core-image-minimal-1.0-r0 do_testimage: Last 25 lines of all logging (55275):
[[0;32m  OK  [0m] Reached target [0;1;39mSocket Units[0m.
         Mounting [0;1;39mTemporary Directory /tmp[0m...
[[0;32m  OK  [0m] Started [0;1;39mEmergency Shell[0m.
[[0;32m  OK  [0m] Reached target [0;1;39mEmergency Mode[0m.
         Starting [0;1;39mRebuild Dynamic Linker Cache[0m...
         Starting [0;1;39mCreate Volatile Files and Directories[0m...
[[0;32m  OK  [0m] Mounted [0;1;39m/var/volatile[0m.
         Starting [0;1;39mLoad/Save OS Random Seed[0m...
[[0;32m  OK  [0m] Mounted [0;1;39mTemporary Directory /tmp[0m.
You are in emergency mode. After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, or "exit"
to continue bootup.
Press Enter for maintenance

This does not replicate on demand, maybe there's a timeout from system load?

It would be useful if oeqa could detect this and get the journal.

https://autobuilder.yoctoproject.org/typhoon/#/builders/113/builds/5756/steps/22/logs/stdio
Comment 1 Ross Burton 2024-07-24 13:26:51 UTC
Apparently Jon sees this reliably with fvp-base on his machines and blames a race.
Comment 2 Randy MacLeod 2024-07-25 14:42:06 UTC
This is happening often enough that we decided in the YP bug review meeting to make this a high importance.
Comment 3 Jon Mason 2024-08-15 18:12:07 UTC
The issue with fvp-base displaying this error was related to not having vfat as part of the system image.

I believe this issue is related to meta-arm/wic/qemu-efi-disk.wks.in not having "rootwait" in the bootloader args.  I'll add that (as it's generally a good thing to have) and we can see if this issue re-appears over the next week or so.
Comment 4 Jon Mason 2024-10-03 14:53:59 UTC
This _should_ be resolved by meta-arm commit 5a3ca1e23f222c874a8c340f47bec27a71c36fbb

https://git.yoctoproject.org/meta-arm/commit/meta-arm/wic?id=5a3ca1e23f222c874a8c340f47bec27a71c36fbb

Since adding that commit, there has been no re-occurrence of this issue.  Please re-open if it happens.