SUPERH platform development
 help / color / mirror / Atom feed
* Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547!
@ 2017-09-26 12:29 Thomas Petazzoni
  2017-09-26 12:36 ` John Paul Adrian Glaubitz
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-09-26 12:29 UTC (permalink / raw)
  To: linux-sh

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: 
         
         
         
         
         
         
882a7eea 
97c1dea8 

dea0: 
00000000 
88002e44 
88015770 
97c1deb0 
88363a6c 
97c1ded8 
884ddfcc 
97c1dee4 

dec0: 
882a6f60 
97e93000 
88363a6c 
882a6f60 
8804306c 
97e93000 
97c1def0 
00000000 

dee0: 
00000000 
97c1def0 
fffff000 
8834fe40 
756e6b6e 
6f776e2d 
626c6f63 
6b28302c 

df00: 
30290070 
9780a800 
880e4dfa 
97c1df28 
884de1b8 
97c1df30 
884f4060 
884f901c 

df20: 
884f9008 
884f4020 
8800214c 
00000000 
884de31e 
97c1df3c 
884f9024 
884f4060 

df40: 
884ddbd8 
97c1df5c 
884f901c 
884f9008 
884f4020 
8800214c 
884f9014 
00000007 

df60: 
00000007 
00000000 
884dd234 
884f7928 
00000062 
882b6380 
97c1df94 
97c1a53c 

df80: 
881806e8 
883a6f50 
00000000 
884f9014 
8804306c 
88007224 
97c2ff30 
883a734c 

dfa0: 
88032f2c 
00000000 
00000000 
00000000 
00000000 
00000000 
882b636c 
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:  
bf        
8800d1f6

->8800d16c:  
trapa     
#62

  8800d16e:  
mov       
r4
, 
r8

  8800d170:  
cmp/hi    
r8
, 
r10

  8800d172:  
bf.s      
8800d17e

  8800d174:  
mov       
#0
, 
r0

  8800d176:  
mov.l     
@(8,r9)
, 
r1


Process: swapper (pid: 1, stack limit = 97c1c001)
Stack: (0x97c1ddcc to 0x97c1e000)
ddc0: 
         
         
         
ffffffe0 
000000c0 
97c15c34 
97c15c30 
8800db66 

dde0: 
97c1ddfc 
8800dc08 
97c26cc0 
97e6830c 
00000000 
97e68300 
884f9148 
97e68300 

de00: 
8800dc08 
8800d118 
97c15c34 
97c15c30 
8800dcf4 
97c1de30 
882c0134 
8800cff8 

de20: 
884f9148 
97c1ac00 
8800dacc 
884f90f4 
88005e4a 
97c1de50 
882a6f60 
97e93000 

de40: 
97c1de98 
97c1ac00 
8839c450 
884f90f4 
8835e618 
88043086 
97c1de64 
8804306c 

de60: 
88002938 
97c1de7c 
97e93000 
97c1de98 
00000000 
8804306c 
97c1ac00 
8835e618 

de80: 
88002b30 
97c1de98 
88174b10 
8804306c 
97c1de98 
97c1ac00 
882a7eea 
97c1dea8 

dea0: 
00000000 
88002e44 
88015770 
97c1deb0 
88363a6c 
97c1ded8 
884ddfcc 
97c1dee4 

dec0: 
882a6f60 
97e93000 
88363a6c 
882a6f60 
8804306c 
97e93000 
97c1def0 
00000000 

dee0: 
00000000 
97c1def0 
fffff000 
8834fe40 
756e6b6e 
6f776e2d 
626c6f63 
6b28302c 

df00: 
30290070 
9780a800 
880e4dfa 
97c1df28 
884de1b8 
97c1df30 
884f4060 
884f901c 

df20: 
884f9008 
884f4020 
8800214c 
00000000 
884de31e 
97c1df3c 
884f9024 
884f4060 

df40: 
884ddbd8 
97c1df5c 
884f901c 
884f9008 
884f4020 
8800214c 
884f9014 
00000007 

df60: 
00000007 
00000000 
884dd234 
884f7928 
00000062 
882b6380 
97c1df94 
97c1a53c 

df80: 
881806e8 
883a6f50 
00000000 
884f9014 
8804306c 
88007224 
97c2ff30 
883a734c 

dfa0: 
88032f2c 
00000000 
00000000 
00000000 
00000000 
00000000 
882b636c 
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


-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547!
  2017-09-26 12:29 Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547! Thomas Petazzoni
@ 2017-09-26 12:36 ` John Paul Adrian Glaubitz
  2017-09-26 12:52 ` Thomas Petazzoni
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-26 12:36 UTC (permalink / raw)
  To: linux-sh

Hi Thomas!

On 09/26/2017 02:29 PM, Thomas Petazzoni wrote:
> 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.

> 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.
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

> [1] https://bugzilla.kernel.org/

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547!
  2017-09-26 12:29 Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547! Thomas Petazzoni
  2017-09-26 12:36 ` John Paul Adrian Glaubitz
@ 2017-09-26 12:52 ` Thomas Petazzoni
  2017-09-26 12:55 ` John Paul Adrian Glaubitz
  2017-09-26 13:04 ` Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-09-26 12:52 UTC (permalink / raw)
  To: linux-sh

Hello,

On Tue, 26 Sep 2017 14:36:42 +0200, John Paul Adrian Glaubitz wrote:

> On 09/26/2017 02:29 PM, Thomas Petazzoni wrote:
> > 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.

> 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.

> > 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547!
  2017-09-26 12:29 Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547! Thomas Petazzoni
  2017-09-26 12:36 ` John Paul Adrian Glaubitz
  2017-09-26 12:52 ` Thomas Petazzoni
@ 2017-09-26 12:55 ` John Paul Adrian Glaubitz
  2017-09-26 13:04 ` Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-09-26 12:55 UTC (permalink / raw)
  To: linux-sh

On 09/26/2017 02:52 PM, Thomas Petazzoni wrote:
>> 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?

>> 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

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547!
  2017-09-26 12:29 Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547! Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2017-09-26 12:55 ` John Paul Adrian Glaubitz
@ 2017-09-26 13:04 ` Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-09-26 13:04 UTC (permalink / raw)
  To: linux-sh

Hello,

On Tue, 26 Sep 2017 14:55:44 +0200, John Paul Adrian Glaubitz wrote:

> > 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.

> > 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-26 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 12:29 Bug report: kernel BUG at arch/sh/kernel/dwarf.c:547! Thomas Petazzoni
2017-09-26 12:36 ` John Paul Adrian Glaubitz
2017-09-26 12:52 ` Thomas Petazzoni
2017-09-26 12:55 ` John Paul Adrian Glaubitz
2017-09-26 13:04 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox