strange gcc -pipe problem in 2.0.3x

Thomas Sailer (sailer@ife.ee.ethz.ch)
Fri, 15 Aug 1997 12:04:33 +0200


On one machine, I have a strange problem relating to gcc -pipe.

The phenomenology looks like that:

When I try to compile the kernel, compiling the first file
hangs forever. ps shows both cc1 and as sleeping in pipe_read.

An strace -ff shows the following behaviour:
gcc (the driver) does the following

pipe -> gets fds 4 and 5.
fork's off the preprocessor and cc1.
then the intention is to close 4 and close 5, however it
does:
close 4 (succeeds)
close 13xxxx (some big number) correctly fails with EBADF,
leaving a writer open on the pipe to cc1, thus letting cc1 hang
forever, thus letting as hang forever.

Now I would assume a user space problem if the same setup would not
work perfectly on a 2.1.43. And I dimly remember that it also worked
on 2.0.18. Flaky hardware is also not too likely, because the above
behaviour is perfectly reproducible on that single machine.

Any hints where to look further?

Tom

NB: gcc without -pipe works ok. gcc is 2.7.2.1, libc 5.3.12, pretty
out of the box RedHat 4.2