BusyBox 1.2.1 piping issue
Denis Vlasenko
vda.linux at googlemail.com
Thu Apr 5 22:17:00 UTC 2007
On Thursday 05 April 2007 23:31, Coleman Brumley wrote:
> >>> strace -f -o file.log ./busybox ash -c 'echo abcd | grep a'
> >>>
> >>> .config? On which arch are you? Does it happen on i386?
> >>
> >> heh, actually we just noticed this ourselves with busybox 1.4.2 on blackfin:
> >> echo "" | grep .
> >> grep seems to crash
> >> -mike
> >>
> > Thanks, Mike and Denis.
> >
> > It seems to be the "|" for me, since this also crashes:
> >
> > echo $x | cut -d"=" -f1 | tr 'A-Z' 'a-z'
> >
> > > strace -f -o file.log ./busybox ash -c 'echo abcd | grep a'
> >
> > I don't have strace installed as part of my busybox build. What
> > setting in .config turns that on? Or did you mean to run the strace
> > command on my desktop?
> >
> > This is for an arm platform cross compiled using gcc v3.4.1. I don't
> > know if it happens on i386, since I haven't built for that arch, just
> > arm. My .config is attached.
This .config seems to work on i386 on current svn:
# ./busybox ash
BusyBox v1.6.0.svn (2007-04-06 00:11:23 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
# echo hi | cat | dd | cat | dd | cat | dd | cat | dd | cat | dd | wc -l
0+1 records in
0+1 records out
0+1 records in
0+1 records out
0+1 records in
0+1 records out
0+1 records in
0+1 records out
0+1 records in
0+1 records out
1
# echo hi | cat | dd | cat | dd | cat | dd | cat | dd | cat | dd | sed 's/i/o/'
0+1 records in
0+1 records out
0+1 records in
0+1 records out
0+1 records in
0+1 records out
0+1 records in
0+1 records out
0+1 records in
0+1 records out
ho
> FYI, I recompiled with "CONFIG_TR=y" in my .config and the pipe is
> working now.
>
> find . -name *.c -exec grep -Hi "CONFIG_TR" {} \; doesn't result in
> anything, so I'm not sure where the dependency is, if there even is one.
Also ENABLE_TR, USE_TR, SKIP_TR...
Re stracing: it is likely to end up not showing anything useful, so don't
try very hard. Think about other ways to find it, like inserting
fprintf(stderr,"i am here\n") - type debug prints.
--
vda
More information about the busybox
mailing list