segfault when running busybox dmesg

Bug #1100250 reported by Leif Lindholm
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AArch64 cross-distro work
Fix Released
High
Unassigned
Linaro OpenEmbedded
Fix Released
Undecided
Unassigned

Bug Description

Linaro 12.12.

When running (busybox) dmesg on the foundation model, it first prints the kernel log, and then it is terminated on a segfault:
---
[63368.251146] dmesg[1474]: unhandled level 1 translation fault (11) at 0x100415faf, esr 0x92000045
[63368.251219] pgd = ffffffc87fe05000
[63368.251275] [100415faf] *pgd=0000000000000000
[63368.251347]
[63368.251399] Pid: 1474, comm: dmesg
[63368.251475] CPU: 0 Not tainted (3.6.0-1-linaro-vexpress64 #1~ci+121213151217)
[63368.251545] PC is at 0x401d1c
[63368.251602] LR is at 0x401e74
[63368.251669] pc : [<0000000000401d1c>] lr : [<0000000000401e74>] pstate: 20000000
[63368.251736] sp : 0000007ff16e6410
[63368.251791] x29: 0000007ff16e6410 x28: 0000007ff16e6528
[63368.251908] x27: 0000000000404df0 x26: 0000007f92a5f710
[63368.252024] x25: 0000000000417f38 x24: 0000000000415fb0
[63368.252140] x23: 0000000000415f38 x22: 0000000000415fc4
[63368.252256] x21: 0000000000415000 x20: 0000000000415fc4
[63368.252372] x19: 0000007ff16e64f0 x18: 0000007ff16e6130
[63368.252488] x17: 0000007f929b5560 x16: 0000000000000000
[63368.252604] x15: 0000007f92a69028 x14: 0000000000002710
[63368.252720] x13: 0000007f9290e3e8 x12: ffffffffffffffff
[63368.252836] x11: 0000000000000005 x10: 0000000000000000
[63368.252950] x9 : 0000000000000000 x8 : 000000000000003f
[63368.253066] x7 : ffffffffffffffc4 x6 : fffffffffffffdfe
[63368.253182] x5 : 000000000000003b x4 : 0000000000415000
[63368.253296] x3 : 0000000000000000 x2 : 0000007f92a5f6f0
[63368.253412] x1 : 0000000100415f37 x0 : 00000000ffffffff
[63368.253520]
---

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Works fine for me with OE kernel.

Revision history for this message
Leif Lindholm (leif-lindholm) wrote :

That was with the (12.12) OE kernel.

However, this behaviour is gone with build #132 filesystem/kernel, which uses glibc 2.17. Feel free to close.

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: New → Fix Released
Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
milestone: none → 13.01
Revision history for this message
Dan Aloni (alonid) wrote :

This is very similar to what I'm getting with the newer rootfs of vexpress64-openembedded_sdk-armv8_20130127-242, combined with the kernel: Linux genericarmv8 3.8.0-1-linaro-vexpress64 #1ubuntu1~ci+130127041142 SMP Sun Jan 27 04:15:58 UTC 2013 aarch64 GNU/Linux.

When I login with sshd:

[ 1494.369684] sshd[861]: unhandled level 2 translation fault (11) at 0x00000000, esr 0x92000006
[ 1494.369763] pgd = ffffffc87e450000
[ 1494.369826] [00000000] *pgd=00000008fe7d7003, *pmd=0000000000000000

[ 1494.369994] Pid: 861, comm: sshd
[ 1494.370079] CPU: 0 Not tainted (3.8.0-1-linaro-vexpress64 #1ubuntu1~ci+130127041142)
[ 1494.370160] PC is at 0x7fb7cf345c
[ 1494.370224] LR is at 0x40bf90
[ 1494.370299] pc : [<0000007fb7cf345c>] lr : [<000000000040bf90>] pstate: a0000000
[ 1494.370373] sp : 0000007ffffff430
[ 1494.370434] x29: 0000007ffffff430 x28: 000000000044b000
[ 1494.370554] x27: 000000000046bf14 x26: 0000000000448928
[ 1494.370673] x25: 0000007ffffff5c0 x24: 000000000047e248
[ 1494.370791] x23: 0000000000000006 x22: 0000000000000001
[ 1494.370909] x21: 0000000000000001 x20: 000000000047e660
[ 1494.371028] x19: 000000000044b468 x18: 0000000000000018
[ 1494.371146] x17: 0000007fb7cf3458 x16: 000000000046a9f8
[ 1494.371264] x15: 0000000000000fc0 x14: 00000000000000c0
[ 1494.371383] x13: 0000007fb7dc2e50 x12: 0000000000000000
[ 1494.371500] x11: 0000000000000040 x10: 00000000fffffff8
[ 1494.371618] x9 : 0000000000000000 x8 : 0000000000000000
[ 1494.371735] x7 : 0000000000000fff x6 : 0000000000000000
[ 1494.371853] x5 : 0000000002800010 x4 : 0000000042800520
[ 1494.371972] x3 : 4280052002800010 x2 : 0000000000000000
[ 1494.372090] x1 : 000000000044b468 x0 : 0000000000000000

A bit of analysis shows the place in libc where it faults:

7fb7c79000-7fb7da4000 r-xp 00000000 fe:02 487 /lib/libc-2.17.so
7fb7da4000-7fb7db3000 ---p 0012b000 fe:02 487 /lib/libc-2.17.so
7fb7db3000-7fb7db7000 r-xp 0012a000 fe:02 487 /lib/libc-2.17.so
7fb7db7000-7fb7db9000 rwxp 0012e000 fe:02 487 /lib/libc-2.17.so

000000000007a458 <strcmp>:
   7a458: d2800002 movz x2, #0x0
 ** 7a45c: 38626803 ldrb w3, [x0,x2] **
   7a460: 38626824 ldrb w4, [x1,x2]
   7a464: 340000c3 cbz w3, 7a47c <strcmp+0x24>
   7a468: 6b04007f cmp w3, w4
   7a46c: 91000442 add x2, x2, #0x1
   7a470: 54ffff60 b.eq 7a45c <strcmp+0x4>
   7a474: 4b040060 sub w0, w3, w4
   7a478: d65f03c0 ret
   7a47c: 4b0403e0 neg w0, w4
   7a480: d65f03c0 ret

Caller inside sshd (according to LR):
  40bf84: 9400e1b4 bl 444654 <setlogin+0x200>
  40bf88: aa1303e1 mov x1, x19
  40bf8c: 97ffedf9 bl 407770 <strcmp@plt>
  40bf90: 6b1f001f cmp w0, wzr
  40bf94: 1a9f17e0 cset w0, eq

Any takers?

Changed in linaro-aarch64:
status: New → Fix Released
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.