-
-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#3277 - malta/mipseb64: #6424
Comments
guidosarducci: I've confirmed this problem also occurs on malta/mipsel64, once the binutils build failure on that platform is fixed by [[https://github.com//pull/3288|PR#3288]] Reproducing the issue is trivial using QEMU (image built from defaults): This bug could use input from a developer familiar with procd init. |
guidosarducci: Still seeing the same error after updating to current openwrt commit b59a98b. Enabling debug of procd init shows a little more information.
./scripts/qemustart malta be64 -append "init_debug=4"
Looking at the [[https://lxr.openwrt.org/source/procd/initd/init.c|procd code]], the main init seems to start OK, then forks kmodloader which also completes without error. The subsequent code does: The kernel panic is immediately after, and the logged "exitcode=0x0000000b" is: Perhaps there's an issue with one of the forked process, or during uloop_run(). |
yousong: Likely the 0xb exitcode is for SIGSEGV. See /bin/kill -L |
guidosarducci: As another experiment I configured init as /bin/sh to test some basic functions:
|
guidosarducci: BTW, I realized the "exitcode" refers to a status returned by wait() which, in the case of signal termination, encodes the signal in the low byte. So yes, 0x0b is SIGSEGV. I also keep coming back to the fact the invalid read access address and the epc are the same. It seems like there's a crazy jump being made into inaccessible memory, from somewhere well away (ra=000000fffc2f05f0) from the init code. While booting with "init=/bin/sh" a few times, I could manually mount /proc and look at the self memory map. The previous ra seems very close to the [vvar]/[vdso] regions, which could make sense given a long jump, and gives me some ideas/clues to follow up on. |
guidosarducci:
On current master, the image for target malta (mipseb64) errors during startup of the init process, resulting in a boot loop.
Two points to note:
The specific error is a SIGSEGV fault:
[ 1.061776] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 1.091522] Freeing unused kernel memory: 21544K
[ 1.091778] This architecture does not have kernel memory protection.
[ 1.092156] Run /init as init process
[ 1.137374] random: fast init done
[ 1.197756] init: Console is alive
[ 1.284807] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 1.294466] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 1.309498] init: - preinit -
[ 1.321863] do_page_fault(): sending SIGSEGV to init for invalid read access from 0000000000000360
[ 1.322458] epc = 0000000000000360 in init[aaaba5c000+4000]
[ 1.323185] ra = 000000fffd40d5e0 in
[ 1.325513] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 1.326546] Rebooting in 1 seconds..
The text was updated successfully, but these errors were encountered: