[Buildroot] [RFC] buildroot uClibc fork problem?

Roberto A. Foglietta roberto.foglietta at gmail.com
Fri Oct 24 11:41:25 UTC 2008


Hi

 playing with buildroot I build a tinyx server in which

 strace xterm -e cat /var/log/X.log

 sometimes goes OK but many times goes WRONG. The problem exists in
both qemu virtual machine and real iso-booted cpu. The problem it is
the same in starting blackbox so it is not related to rxvt (xterm)
only.

 I can reproduce the problem with attached rcS, in particular there
are two xterms call. Once the first fails to works correctly (CPU @
99%) the environment is corrupted in such way that killing it and try
to execute the same command from xterm would fail again. In this case
killing the crazy xterm, twm and trying to run blackbox put the CPU @
99%. Instead if the first xterm call does not happen (i.e.: commented
out) then everything seem works almost properly (at least until now).
For this reason I have attached the file descriptors and process list
generated by rcS attached.

 Kernel source is a 2.6.21.4-eeepc patched to became 2.6.21.7 as one
supported by buildroot.  Some other details about my buildroot system
could be retrieved here http://lugge.wikidot.com/ugles. If somebody is
interested in investigating the problem I can upload 12Mb of ISO
somewhere on my website/ftp.

=== OK ===

fork()                                  = 1153
close(5)                                = 0
select(4, [3], [3], NULL, NULL)         = 1 (out [3])
writev(3, [{"\213\1\5\0\0\0\1\0\0\0\0\0\0\0\0\0\5\0\5\0\213\1\4\0\0\0\2\0\0\0\0\0\7"...,
36}], 1) = 36
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, NULL, WNOHANG, NULL)          = 1153
munmap(0xb7db0000, 34424)               = 0
munmap(0xb7da8000, 29320)               = 0
munmap(0xb7da3000, 17680)               = 0
_exit(0)                                = ?


=== WRONG ===

fork()                                  = 1170
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, NULL, WNOHANG, NULL)          = 1170
rt_sigaction(SIGCHLD, {0x804de70, [CHLD], SA_RESTORER|SA_RESTART,
0xb7e28248}, {0x804de70, [CHLD], SA_RESTORER|SA_RESTART, 0xb7e28248},
8) = 0
sigreturn()                             = ? (mask now [])
close(5)                                = 0
select(4, [3], [3], NULL, NULL)         = 1 (out [3])
writev(3, [{"\213\1\5\0\0\0\1\0\0\0\0\0\0\0\0\0\5\0\5\0\213\1\4\0\0\0\2\0\0\0\0\0\7"...,
68}], 1) = 68
select(4, [3], [], NULL, NULL)          = 1 (in [3])
read(3, "\1\1^\0\0\0\0\0\2\0`\0\251o\f\10\20\343\26\01008\216\27788\216\277\231\370\6\10"...,
4096) = 32
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])
read(4, "xauth:  creating new authority fi"..., 4096) = 1562
read(4, 0x805a76a, 2534)                = -1 EIO (Input/output error)
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])

[ ... forever @ 99% of CPU  ...]

read(4, 0x805a150, 4096)                = -1 EIO (Input/output error)
read(3, 0x805cbf4, 4096)                = -1 EAGAIN (Resource
temporarily unavailable)
select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])


 Thanks for your attention,
-- 
/roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fds.WRONG
Type: application/octet-stream
Size: 12405 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20081024/372d6a56/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rcS
Type: application/octet-stream
Size: 1906 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20081024/372d6a56/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace_log.OK.bz2
Type: application/x-bzip2
Size: 5978 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20081024/372d6a56/attachment.bz2>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace_log.WRONG.bz2
Type: application/x-bzip2
Size: 6201 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20081024/372d6a56/attachment-0001.bz2>


More information about the buildroot mailing list