busybox segfault in __uClibc_main

Murch, Christopher cmurch at mrv.com
Mon Dec 5 16:33:21 UTC 2005


Hi,
I experienced a similiar issue, I don't have a resolution but maybe some
more useful info.
I'm also running on powerpc using gcc 3.4.4 and using uClibc 0.9.28 (all
compiled with buildroot).

The issue only occurs for me when the executable is built static (DO_DEBUG
for uClibc builds staticly).
I did not have any luck debugging the issue, instead I worked around it by
just using dynamic libraries.

My debug attempts with gdb/strace both failed because under the context of
gdb/strace the issue does not appear repeatable.  The segfault appears to
happen on call to exit(), if you replace your call to exit() with _exit(),
the problem seems to disappear.

Any more I can do to help, let me know.
-Chris

-----Original Message-----
From: Linh Dang [mailto:linhd at nortel.com]
Sent: Monday, December 05, 2005 10:50 AM
To: uclibc at uclibc.org
Subject: Re: busybox segfault in __uClibc_main


Erik Andersen <andersen at codepoet.org> wrote:

> On Fri Dec 02, 2005 at 12:25:14PM -0500, Linh Dang wrote:
>> with 1.1-pre1 it would segfault at the same place when i run
>>
>> busybox ls
>>
>> but ash wouldn't event start, it segfaulted right away.
>>
>> Is there a version of busybox that would work with uClibc?
>
> All versions of busybox work with uClibc.  I strongly suspect
> you are using a broken kernel or a broken toolchain.

Erik, I'd like to apologize if my question offended you. It was not
intentional! I wrongly thought that busybox/uClibc is an unusual
configuration.

As for the versions of toolchain and kernel.


I'm using

        mainline 2.6.14 ppc32 kernel 
        gcc-3.4.2 (built by buildroot)
        binutils-2.16.1 (built by buildroot)
        uClibc 0.9.28 (built by buildroot)

btw, busybox-1.01 works flawlessly with glibc. The reason I'm looking
for uClibc-linked busybox is my flash space starts getting full.


Rob Landley rob at landley.net:
> 
> I'm using busybox with uClibc.  I think the imporant part here is busybox
on 
> ppc.
> 
> I'd like to track this down, can you email me an strace of the segfaulting

> cases you've found?  (And you've confirmed that a simple "hello world" 
> program works fine with your uclibc toolchain, right?)
> 
> Rob
> 


Well, I can run ash as long as I dont call any "external" command
i.e. make busybox do fork/exec. "internal" commands such as export,
set, setenv, etc. work fine.

Regards

--
Linh Dang
_______________________________________________
uClibc mailing list
uClibc at uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc



More information about the uClibc mailing list