system() not working properly after moving to uClibc

mzhang mzhang at aksysnetworks.com
Wed Nov 5 20:09:34 UTC 2008


Hello list,

I posted the following question a while back. Since then, we found out 
that our App was accidentally compiled with the 2.4 Header files. After 
changing the build system to compile with the 2.6 kernel headers, it 
seems the problem described below has been contained.

However, just recently we started to notice the "system()" call 
periodically stopped working.  A few people responded to my last post 
suggested to use "strace" utility to debug the system calls. So, I did 
compile the strace for our mips platform and ran it with our App. I was 
expecting to see some "fork()" and "exec()" calls when the "system()" 
call was executed. However, I did not see anything coming out of 
"system()" call both when it is working and not working. ("strace" did 
work cause I saw other tons of system calls when running the App).

So, I guess I need your help for both the "strace" and the "system()". 
When the "system()" failed, the return value was "-1". I checked the 
"man" page and it says "The value returned is -1 on error (e.g.  fork(2) 
failed)".

Any suggestion is helpful here.

Thanks,

Michael

mzhang wrote:
> Hello folks,
>
> We are migrating to Linux-2.6.10+uClibc-0.9.28.1+Busybox-1.2.2.1 on a 
> mipsel embedded platform from Linux kernel 2.4 + glibc 1.x. Everything 
> in our application seems working fine except the "system()" call.
>
> Our application is multi-threaded and "the system()" call worked in 
> the main thread, but after all other threads (around 10) are running, 
> the "system()" call stopped working and returns "-1".  We tried the 
> simplest one "system("ls")" and it failed with "-1".
>
> The application has been running on the old system for 4 years and we 
> never had this problem. So presumably, we think it might have 
> something to do with the fork() and pthread implementation in the uClibc.
>
> I searched in the mailing list and nothing comes close. So, any help 
> is appreciated here.
>
> Thanks,
>
> Michael
>
>
>
>
>




More information about the uClibc mailing list