All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] pipes
@ 2001-02-09 15:29 Alan Modra
  2001-02-15 16:38 ` Richard Hirst
  2001-02-22  6:37 ` [parisc-linux] pipes Alan Modra
  0 siblings, 2 replies; 22+ messages in thread
From: Alan Modra @ 2001-02-09 15:29 UTC (permalink / raw)
  To: parisc-linux

Would anyone like to hazard a guess as to whether pipes work OK?

The fixincludes problem I'm seeing with devel branch gcc builds looks like
a loss of data in a pipe.  fixincl does a fairly standard trick of opening
a pipe(2) to a fork & exec'd shell, and by putting a little debugging code
in I see some fishy commands in the shell.

Good debug info looks like:

==
case hppa-unknown-linux-gnu in
*-*-sysv4* | \
i?86-*-sysv5* | \
i?86-*-udk* | \
i?86-*-solaris2.[0-4] | \
powerpcle-*-solaris2.[0-4] | \
sparc-*-solaris2.[0-4] )
    echo run ;;
* ) echo skip ;;
esac
==
cd /usr/include
case hppa-unknown-linux-gnu in
*-*-sysv4* | \
i?86-*-sysv5* | \
i?86-*-udk* | \
i?86-*-solaris2.[0-4] | \
powerpcle-*-solaris2.[0-4] | \
sparc-*-solaris2.[0-4] )
    echo run ;;
* ) echo skip ;;
esac

echo
echo ShElL-OuTpUt-HaS-bEeN-cOmPlEtEd

where the first hunk of text between `=='s is wrapped in
`cd /usr/include' .. `echo funky stuff' and plugged into the pipe.  The
hunk of text after the second `==' is what the shell reads from the pipe.
Everything works as expected for a while, and then we get

==
file=sys/stat.h
if ( test  -r types/vxTypesOld.h ) > /dev/null 2>&1
then echo TRUE
else echo FALSE
fi
==
cd /usr/include
file=sys/stat.h
if ( test  -r types/vxTypesOld.h ) > /dev/null 2>&1
then echo TRUE
else echo FALSE
fi
d

Oops, did we just lose 41 chars?

Unfortunately, I'm not sure where the loss happens.  When I tried to
"strace -f -s 256 ...", I ran into

User Fault on Kernel Space pid=319 command='sh'

     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00000000000001000000000000001011
r0-3     00000000 00076808 0002b4c7 00000001
r4-7     401e8648 00000000 0000008b 0007dda8
r8-11    00000001 00076808 0007f008 00078008
r12-15   00076808 00078f02 00076808 bb000ac8
r16-19   00076808 00063800 ffffffff 401e8648
r20-23   000000af 400f0258 0007e498 00000008
r24-27   00000000 bb000ac8 00000002 00076808
r28-31   00000000 00000000 bb000c00 400f027f
sr0-3    0000035e 0000035c 00000000 0000035e
sr4-7    0000035e 0000035e 0000035e 0000035e

IASQ: 00000000 00000000 IAOQ: 400f027f 400f0283
 IIR: 4ad30048    ISR: 0000035e  IOR: 0007e4bc
ORIG_R28: ffffffff

0x400f0270 <__sigprocmask+24>:  stw r3,-3c(sr0,sp)
0x400f0274 <__sigprocmask+28>:  be,l 100(sr2,r0),%sr0,%r31
0x400f0278 <__sigprocmask+32>:  ldi af,r20
0x400f027c <__sigprocmask+36>:  copy ret0,r3

Tried various kernels I built near the end of January, and one dated
20010201 "Linux version 2.4.0-test10 (jsm@forest)" from Matt Taggart.

Time to sleep on it, I think

Alan

^ permalink raw reply	[flat|nested] 22+ messages in thread
[parent not found: <20010223113052.G4660@linuxcare.com>]

end of thread, other threads:[~2001-02-26 21:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-09 15:29 [parisc-linux] pipes Alan Modra
2001-02-15 16:38 ` Richard Hirst
2001-02-22  6:37 ` [parisc-linux] pipes Alan Modra
2001-02-22 10:37   ` Jes Sorensen
2001-02-22 11:00   ` Richard Hirst
2001-02-22 11:09     ` Richard Hirst
2001-02-22 11:26       ` Alan Cox
2001-02-22 11:39         ` Alan Modra
2001-02-22 11:52           ` Alan Cox
2001-02-22 11:53           ` Richard Hirst
2001-02-22 11:34     ` Alan Modra
2001-02-22 11:52       ` Richard Hirst
2001-02-22 12:27         ` Alan Modra
2001-02-22 13:03           ` Richard Hirst
2001-02-22 13:27             ` Alan Modra
2001-02-22 17:00               ` Richard Hirst
2001-02-22 17:44                 ` Paul Bame
2001-02-23 12:25                   ` Richard Hirst
2001-02-23 12:43                     ` Alan Modra
     [not found] <20010223113052.G4660@linuxcare.com>
     [not found] ` <Pine.LNX.4.21.0102232231470.9345-100000@front.linuxcare.com.au>
2001-02-23 21:23   ` Richard Hirst
2001-02-26 17:57     ` Richard Hirst
2001-02-26 21:30       ` Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.