bash hangs after every command when running on Linux < 2.6.10

Bug #17334 reported by Jonathan Riddell
6
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Fix Released
Critical
Matthias Klose

Bug Description

Bash 3.0-14ubuntu1 hangs on amd64 after any command taking up 99% CPU cycles. 3.0-13
did not have this problem.

x86 and ppc seem fine.

This was in a breezy chroot.

Revision history for this message
Guido Nickels (gsn) wrote :

definately broken. start a shell, execute a command and bash will immediately
hang and use 99% cpu.
affected package versions: 3.0-14ubuntu1

Revision history for this message
Laurent Baillet (laurent-baillet) wrote :

> Bash 3.0-14ubuntu1 hangs on amd64 after any command taking up 99% CPU cycles.
 3.0-13
> did not have this problem.
>
> x86 and ppc seem fine.

the problem occurs on a x86 too.

> This was in a breezy chroot.

Revision history for this message
Colin Watson (cjwatson) wrote :

I see this too. strace fragment as follows:

11411 exit_group(0) = ?
11408 <... waitpid resumed> 0x7ffff188, WUNTRACED|0x8) = -1 EINVAL (Invalid
argument)
11408 waitpid(-1, 0x7ffff188, WUNTRACED|0x8) = -1 EINVAL (Invalid argument)
[...]

I became curious as to what that mysterious 0x8 was, and found it in breezy's
/usr/include/bits/waitflags.h (but not in sid's). According to the waitpid(2)
man page, WCONTINUED is available only since Linux 2.6.10, and warty's kernel
has the following code at the top of sys_wait4():

        if (options & ~(WNOHANG|WUNTRACED|__WNOTHREAD|__WCLONE|__WALL))
                return -EINVAL;

If you can test for whether WCONTINUED is available at run-time, then that would
be best; otherwise, perhaps it would be best to disable use of WCONTINUED
entirely, if that doesn't cause significant breakage?

Revision history for this message
Matthias Klose (doko) wrote :

fixed in 3.0-15

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.