[oe] systemd on armv4t

Martin Jansa martin.jansa at gmail.com
Thu Nov 22 12:20:33 UTC 2012


On Fri, Nov 09, 2012 at 12:20:14PM +0100, Martin Jansa wrote:
> On Wed, Nov 07, 2012 at 09:18:04PM +0000, Phil Blundell wrote:
> > On Wed, 2012-11-07 at 21:53 +0100, Martin Jansa wrote:
> > > Core was generated by `/sbin/init splash'.
> > > Program terminated with signal 4, Illegal instruction.
> > > #0  0x40110a00 in raise () from /lib/libpthread.so.0
> > > (gdb)
> > > (gdb) bt
> > > #0  0x40110a00 in raise () from /lib/libpthread.so.0
> > > #1  0x000118de in ?? ()
> > > #2  0x000118de in ?? ()
> > 
> > That backtrace (and the disassembly) doesn't tell you much about the
> > real location of the fault since it just shows systemd re-throwing a
> > signal that it caught.  If you compile with -fasynchronous-unwind-tables
> > then you might get a better backtrace; otherwise, you can hack main.c to
> > stop it catching SIGILL in the first place.  Or turn on user fault
> > debugging in the kernel.
> 

I have more info on this one.

The problem is caused by:
commit 9591c93c20af236fdc1a99b548435b6df75af497
Author: Khem Raj <raj.khem at gmail.com>
Date:   Wed Aug 15 23:09:00 2012 -0700

    eglibc-2.16: Remove build dependency on libgcc_s and libgcc_eh

    This patch backports two patches from glibc trunk essentially
    dropping the requirements to have libgcc_s and libgcc_eh
    this will simplify the toolchain bootstrap sequence.

    Signed-off-by: Khem Raj <raj.khem at gmail.com>

And it happens in runtime when *kernel* is built with toolchain having this patch included.

Just booting uImage built with eglibc without this patch makes systemd working fine again.

Problem is that I cannot revert just this one patch in master 
because it depends on lot of other toolchain changes since then,
but uImage built with oe-core just before this patch and with this 
patch makes the difference.

CCing Khem as he added this patch and I really need some help with this one.

I'll upload workdirs from both builds later, now I'm rebuilding it, 
because it was cleaned between buils.

Cheers,

> Thanks, now I have better backtrace:
> Core was generated by `/sbin/init splash'.
> Program terminated with signal 4, Illegal instruction.
> #0  0x400d3a00 in raise (sig=sig at entry=4) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:45
> 45                                  sig);
> (gdb) bt
> #0  0x400d3a00 in raise (sig=sig at entry=4) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:45
> #1  0x0001183e in crash (sig=4) at src/core/main.c:135
> #2  <signal handler called>
> #3  0x40062d44 in __sync_add_and_fetch_4 (ptr=0xbc710, val=1)
>     at /OE/shr-core/tmp-eglibc/work-shared/gcc-4.7.2-r13/gcc-4.7.2/libgcc/config/arm/linux-atomic.c:128
> #4  0x4005e8bc in _dbus_atomic_inc (atomic=atomic at entry=0xbc710) at dbus-sysdeps-unix.c:2440
> #5  0x40056560 in _dbus_server_init_base (server=server at entry=0xbc710, vtable=<optimized out>, address=address at entry=0xbe81a7e0) at dbus-server.c:118
> #6  0x40056fbc in _dbus_server_new_for_socket (fds=fds at entry=0xbe81a7dc, n_fds=n_fds at entry=1, address=address at entry=0xbe81a7e0,
>     noncefile=noncefile at entry=0x0) at dbus-server-socket.c:320
> #7  0x40057404 in _dbus_server_new_for_domain_socket (path=path at entry=0xbc678 "/run/systemd/private", abstract=abstract at entry=0,
>     error=error at entry=0xbe81a890) at dbus-server-unix.c:276
> #8  0x400575ea in _dbus_server_listen_platform_specific (entry=<optimized out>, server_p=0xbe81a874, error=0xbe81a890) at dbus-server-unix.c:134
> #9  0x400568a0 in dbus_server_listen (address=0x6d9d4 "unix:path=/run/systemd/private", error=0xbe81a8e8) at dbus-server.c:585
> #10 0x00033ec2 in bus_init_private (m=0xbc340) at src/core/dbus.c:1076
> #11 bus_init (m=m at entry=0xbc340, try_bus_connect=try_bus_connect at entry=false) at src/core/dbus.c:1147
> #12 0x00014eb2 in manager_new (running_as=running_as at entry=SYSTEMD_SYSTEM, _m=_m at entry=0xbe81aa54) at src/core/manager.c:305
> #13 0x0000fbb8 in main (argc=2, argv=0xbe81af04) at src/core/main.c:1612
> (gdb) disass 0x40062d44
> Dump of assembler code for function __sync_add_and_fetch_4:
>    0x40062d2c <+0>:     push    {r4, r5, r6, lr}
>    0x40062d2e <+2>:     adds    r5, r0, #0
>    0x40062d30 <+4>:     adds    r6, r1, #0
>    0x40062d32 <+6>:     ldr     r0, [r5, #0]
>    0x40062d34 <+8>:     adds    r2, r5, #0
>    0x40062d36 <+10>:    adds    r4, r0, r6
>    0x40062d38 <+12>:    adds    r1, r4, #0
>    0x40062d3a <+14>:    ldr     r3, [pc, #16]   ; (0x40062d4c <__sync_add_and_fetch_4+32>)
>    0x40062d3c <+16>:    bl      0x40063404
>    0x40062d40 <+20>:    cmp     r0, #0
>    0x40062d42 <+22>:    bne.n   0x40062d32 <__sync_add_and_fetch_4+6>
>    0x40062d44 <+24>:    adds    r0, r4, #0
>    0x40062d46 <+26>:    pop     {r4, r5, r6}
>    0x40062d48 <+28>:    pop     {r1}
>    0x40062d4a <+30>:    bx      r1
>    0x40062d4c <+32>:    lsrs    r0, r0, #31
>    0x40062d4e <+34>:    vsli.32 <illegal reg q13.5>, q8, #31
> End of assembler dump.
> 
> Cheers,
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com



-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20121122/983d307f/attachment-0002.sig>


More information about the Openembedded-devel mailing list