Comment 0 for bug 339743

Revision history for this message
Anders Kaseorg (andersk) wrote : Jaunty i386 popen() misbehaves on Lenny 2.6.26-1-amd64 kernel

There is something very wrong with the popen() implementation in Jaunty on i386. It works fine when run on the Jaunty kernel, but when run on the Lenny 2.6.26-1-amd64 kernel, it misbehaves as follows. The output of the subcommand, instead of being fed to the pipe, is fed directly to stdout; the pipe either returns errors or hangs forever.

This causes weird errors in many programs running in a Jaunty i386 chroot on our Lenny build server.

Attached is a small 5-line test program. Run
  gcc -static popen-test.c -o popen-test
and then copy popen-test to a Lenny machine to see the problem.

Correct output:
  $ uname -r
  2.6.28-8-generic
  $ ./popen-test
  popen returned 0x1ec6400
  ferror returned 0
  fread returned 19
  ferror returned 0
  pclose returned 0
Incorrect output:
  $ uname -r
  2.6.26-1-amd64
  $ ./popen-test
  popen returned 0x935f688
  ferror returned 0
  SHOULD NOT DISPLAY

This has been reproduced independently by two of us with two different Jaunty i386 installs and two different Lenny installs.