Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547!
Hello,
I'm using Linux 4.13 on a big endian SH4A system, and whenever I get a kernel panic (for example because there is no root filesystem available), I get "kernel BUG at arch/sh/kernel/dwarf.c:547!". It seems like the DWARF-reading logic in arch/sh/kernel/dwarf.c doesn't support some recent DWARF information emitted by gcc. My toolchain uses gcc 6.4.0. Have you already encountered this problem?
You'll find below the full kernel panic log. You'll also notice that the layout of the kernel panic message is really weird, with many newlines all over the place, which probably is another bug.
Best regards,
Thomas
List of all partitions:
0100 16384 ram0
(driver?)
0101 16384 ram1
(driver?)
0102 16384 ram2
(driver?)
0103 16384 ram3
(driver?)
0104 16384 ram4
(driver?)
0105 16384 ram5
(driver?)
0106 16384 ram6
(driver?)
0107 16384 ram7
(driver?)
0108 16384 ram8
(driver?)
0109 16384 ram9
(driver?)
010a 16384 ram10
(driver?)
010b 16384 ram11
(driver?)
010c 16384 ram12
(driver?)
010d 16384 ram13
(driver?)
010e 16384 ram14
(driver?)
010f 16384 ram15
(driver?)
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) CPU: 0 PID: 1 Comm: swapper Not tainted 4.13.0 #1 Stack: (0x97c1de98 to 0x97c1e000)
de80:
882a7eea97c1dea8
dea0:
0000000088002e44
8801577097c1deb088363a6c97c1ded8884ddfcc97c1dee4
dec0:882a6f6097e9300088363a6c882a6f608804306c97e9300097c1def0
00000000
dee0:
0000000097c1def0fffff0008834fe40756e6b6e6f776e2d626c6f636b28302c
df00:
302900709780a800880e4dfa97c1df28884de1b897c1df30884f4060884f901c
df20:884f9008884f40208800214c
00000000884de31e97c1df3c884f9024884f4060
df40:884ddbd897c1df5c884f901c884f9008884f40208800214c884f9014
00000007
df60:
00000007
00000000884dd234884f7928
00000062882b638097c1df9497c1a53c
df80:881806e8883a6f50
00000000884f90148804306c
8800722497c2ff30883a734c
dfa0:88032f2c
00000000
00000000
00000000
00000000
00000000882b636c
00000000
dfc0:
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
dfe0:
00000000
00000000
00000000
40008000
00000000
00000000
00000000
00000000
Call trace: ------------[ cut here ]------------ kernel BUG at arch/sh/kernel/dwarf.c:547! Kernel BUG: 003e [#1] Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.13.0 #1
task: 97c1ac00 task.stack: 97c1c000
PC is at dwarf_cfa_execute_insns.isra.1+0x54/0x430 PR is at dwarf_cfa_execute_insns.isra.1+0xba/0x430 PC : 8800d16c SP : 97c1ddcc SR : 400080f0
TEA : c0091240
R0 : 8800d208 R1 : 8800dbf0 R2 : 00000000 R3 : 000000c0 R4 : 883ce012 R5 : ffffff6c R6 : 97c15c30 R7 : 0000000e R8 : 883ce011 R9 : 97e68300 R10 : 883ce0b4 R11 : 8800dc08 R12 : 00000080 R13 : ffffffc0 R14 : 97c1ddcc
MACH: 0000007c MACL: 00000110 GBR : b85ae522 PR : 8800d1d2
Call trace: [<8800db66>] dwarf_unwind_stack+0x9a/0x208 [<8800dc08>] dwarf_unwind_stack+0x13c/0x208 [<8800dc08>] dwarf_unwind_stack+0x13c/0x208 [<8800d118>] dwarf_cfa_execute_insns.isra.1+0x0/0x430 [<8800dcf4>] dwarf_unwinder_dump+0x20/0x9c [<8800cff8>] dwarf_frame_free_regs+0x0/0x68 [<8800dacc>] dwarf_unwind_stack+0x0/0x208 [<88005e4a>] unwind_stack+0x2a/0x104 [<882a6f60>] strlen+0x0/0x60 [<88043086>] printk+0x1a/0x2c [<8804306c>] printk+0x0/0x2c [<88002938>] show_trace.part.0+0x2c/0x74 [<8804306c>] printk+0x0/0x2c [<88002b30>] show_stack+0x38/0x5c [<88174b10>] bust_spinlocks+0x0/0x50 [<8804306c>] printk+0x0/0x2c [<882a7eea>] dump_stack+0x16/0x2c [<88002e44>] arch_local_irq_restore+0x0/0x2c [<88015770>] panic+0x98/0x1fc [<884ddfcc>] mount_block_root+0x1c0/0x284 [<882a6f60>] strlen+0x0/0x60 [<882a6f60>] strlen+0x0/0x60 [<8804306c>] printk+0x0/0x2c [<880e4dfa>] SyS_mknod+0x12/0x20 [<884de1b8>] mount_root+0x4c/0x7c [<8800214c>] do_one_initcall+0x0/0x128 [<884de31e>] prepare_namespace+0x136/0x1e4 [<884ddbd8>] kernel_init_freeable+0x11c/0x1c8 [<8800214c>] do_one_initcall+0x0/0x128 [<884dd234>] repair_env_string+0x0/0x70 [<882b6380>] kernel_init+0x14/0xfc [<881806e8>] debug_smp_processor_id+0x0/0x24 [<8804306c>] printk+0x0/0x2c [<88007224>] ret_from_kernel_thread+0xc/0x14 [<88032f2c>] schedule_tail+0x0/0x84 [<882b636c>] kernel_init+0x0/0xfc
Code:
8800d166:
mov
#47
,
r0
8800d168:
cmp/hi
r0
,
r5
8800d16a:
bf8800d1f6
->8800d16c:
trapa
#62
8800d16e:
mov
r4
,
r8
8800d170:
cmp/hi
r8
,
r10
8800d172:
bf.s8800d17e
8800d174:
mov
#0
,
r0
8800d176:
mov.l
@(8,r9)
,
r1
Process: swapper (pid: 1, stack limit = 97c1c001)
Stack: (0x97c1ddcc to 0x97c1e000)
ddc0:
ffffffe0000000c097c15c3497c15c308800db66
dde0:97c1ddfc8800dc0897c26cc097e6830c
0000000097e68300884f914897e68300
de00:8800dc088800d11897c15c3497c15c308800dcf497c1de30882c01348800cff8
de20:884f914897c1ac008800dacc884f90f488005e4a97c1de50882a6f6097e93000
de40:97c1de9897c1ac008839c450884f90f48835e618
8804308697c1de648804306c
de60:
8800293897c1de7c97e9300097c1de98
000000008804306c97c1ac008835e618
de80:88002b3097c1de9888174b108804306c97c1de9897c1ac00882a7eea97c1dea8
dea0:
0000000088002e44
8801577097c1deb088363a6c97c1ded8884ddfcc97c1dee4
dec0:882a6f6097e9300088363a6c882a6f608804306c97e9300097c1def0
00000000
dee0:
0000000097c1def0fffff0008834fe40756e6b6e6f776e2d626c6f636b28302c
df00:
302900709780a800880e4dfa97c1df28884de1b897c1df30884f4060884f901c
df20:884f9008884f40208800214c
00000000884de31e97c1df3c884f9024884f4060
df40:884ddbd897c1df5c884f901c884f9008884f40208800214c884f9014
00000007
df60:
00000007
00000000884dd234884f7928
00000062882b638097c1df9497c1a53c
df80:881806e8883a6f50
00000000884f90148804306c
8800722497c2ff30883a734c
dfa0:88032f2c
00000000
00000000
00000000
00000000
00000000882b636c
00000000
dfc0:
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
dfe0:
00000000
00000000
00000000
40008000
00000000
00000000
00000000
00000000
---[ end trace d51c294bbd3f5847 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
random: crng init done
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
John Paul Adrian Glaubitz
maintainerHi Thomas!
Quoted 1 line · Thomas Petazzoni
I'm using Linux 4.13 on a big endian SH4A system,
Wow, that's the first time I hear someone use SuperH in Big-Endian mode.
May I ask what kind of hardware you are using? I'm still looking for new/used SH4 boards to add additional buildd resources in Debian.
Quoted 9 lines
a kernel panic (for example because there is no root filesystem available), I get "kernel BUG at
arch/sh/kernel/dwarf.c:547!". It seems like the DWARF-reading logic inarch/sh/kernel/dwarf.cdoesn't support some recent DWARF information emitted by gcc. My toolchain uses gcc 6.4.0. Have you already encountered this problem?You'll find below the full kernel panic log. You'll also notice that the layout of the kernel panic message is really weird, with many newlines all over the place, which probably is another bug.
I think it might be a better idea to report this issue to the kernel bugzilla [1] so your bug report doesn't get lost. SuperH can now be selected as the target architecture, too.
Adrian
Quoted 1 line
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Hello,
Quoted 4 lines · John Paul Adrian Glaubitz
Quoted 1 line · Thomas Petazzoni
I'm using Linux 4.13 on a big endian SH4A system,
Wow, that's the first time I hear someone use SuperH in Big-Endian mode.
Hehe, yes, I know, it's pretty uncommon. The hardware platform I'm using was not running Linux... until now. And the big endian choice is made at the HW level, so it's not trivial to change it to little endian.
Quoted 2 lines
May I ask what kind of hardware you are using? I'm still looking for new/used SH4 boards to add additional buildd resources in Debian.
It's a custom platform using the SH7786 SoC. Sadly, this is clearly not a HW platform that I can provide to help Debian having more build resources.
Quoted 6 lines
Quoted 3 lines
You'll find below the full kernel panic log. You'll also notice that the layout of the kernel panic message is really weird, with many newlines all over the place, which probably is another bug.
I think it might be a better idea to report this issue to the kernel bugzilla [1] so your bug report doesn't get lost. SuperH can now be selected as the target architecture, too.
I thought about this, but I'm not sure the SH maintainers are actively looking at the kernel bug tracker.
Let's see if Rich and/or Yoshinori have some feedback about my issue.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
John Paul Adrian Glaubitz
maintainerQuoted 6 lines · Thomas Petazzoni
Quoted 2 lines
May I ask what kind of hardware you are using? I'm still looking for new/used SH4 boards to add additional buildd resources in Debian.
It's a custom platform using the SH7786 SoC. Sadly, this is clearly not a HW platform that I can provide to help Debian having more build resources.
I assume this is some custom hardware used for automotive or industrial applications?
Quoted 8 lines
Quoted 3 lines
I think it might be a better idea to report this issue to the kernel bugzilla [1] so your bug report doesn't get lost. SuperH can now be selected as the target architecture, too.
I thought about this, but I'm not sure the SH maintainers are actively looking at the kernel bug tracker.
Let's see if Rich and/or Yoshinori have some feedback about my issue.
Yoshinori is currently not active in kernel development but from what I have heard, he was planning to return soonish. In any case, I just want to avoid that your issue gets lost on the mailing lists.
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Hello,
Quoted 6 lines · John Paul Adrian Glaubitz
Quoted 3 lines
It's a custom platform using the SH7786 SoC. Sadly, this is clearly not a HW platform that I can provide to help Debian having more build resources.
I assume this is some custom hardware used for automotive or industrial applications?
Yes, correct.
Quoted 5 lines
Quoted 1 line
Let's see if Rich and/or Yoshinori have some feedback about my issue.
Yoshinori is currently not active in kernel development but from what I have heard, he was planning to return soonish. In any case, I just want to avoid that your issue gets lost on the mailing lists.
Rich has been active recently on SuperH related topics, and has a very solid toolchain related background. So perhaps he'll have some insight about this DWARF issue.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com