On Feb 14, 2011, at 6:01 PM, ext Karol Lewandowski wrote:
I'm trying to narrow down one problem with shell redirection.
$ cat >Makefile <<"EOF"
all:
for i in `seq 1 99`; do sb2 -m devel -- echo bug >LOG.$${i}.stdout
2> LOG.$${i}.stderr; done
EOF
$ make
...
This test sometimes* fails with "Exit reason and status: signal 11"
as can be seen in respective *stderr file.
When I run this outside of make it doesn't seem to have this problem
(or at least it's way harder to trigger...)
I would be nice if we could fix this before release... I don't have
any patches yet, though... Any ideas?
We have seen something like that in the past, at least twice: The
first occasion was with "make", which has a nasty habit of using
setrlimit() to set stack to infinity, but not restoring it to what it
was before next exec. And that caused a segfault in ld.so, at least
with some versions, when using ld.so that way how sb2 uses it. So
libsb2 takes care of restoring the limit, please see how setrlimit()
and -64() are handled in preload/execgates.c.
The other thing was a bug in Ubuntu's kernel (see https://bugs.launchpad.net/ubuntu/+source/bash/+bug/452175)
. That could be triggered with a simple bash script, too. (n.b. since
"make" uses the the shell to do the actual execution, it is sometimes
hard to find out the exact problem)
Since both of these were already fixed, I hope that neither of them
came back... but maybe the descriptions may still give some ideas?
You could also try if the vm settings (of Linux kernel) have any
effect on the bug. e.g. change what you have in /proc/sys/kernel/
randomize_va_space, /proc/sys/vm/mmap_min_addr might also have some
effect, etc.
Lauri
_______________________________________________
Scratchbox-devel mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-devel