recursively call shell script will freeze whole system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
run the following script will freeze the whole system. i made some mistakes when i write it.
but such a bad script should not freeze the whole system.
<code>
if test $# -gt t ;
then
echo 1;
else
`basename $0` \<url\> \[new_filename\]
fi
</code>
it's not the first time that recursively call to script freeze the system.
i didn't remember what i have run the last time. but the results are the same.
the system became no responding to keyboard and mouse.
screen and windows content not update any more.
i confirmed the SSH and CTRL+ALT+F# this time. both of them stuck or 60s timeout-ed.
Ubuntu version: 12.04.1 amd64 server
Linux kernel version: 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
bash: 4.2-2ubuntu2
coreutils: 8.13-3ubuntu3
i have confirmed this bug is vm (virtualbox) running the same version ubuntu, it froze too.
it will not terminate itself. your can cancel it will CTRL+C at the beginning seconds.
after running for longer time it become not cancel-able and not accept the key input.
i have tried another box running Fedora 15[1] , it has no such problem. and can be
canceled by CTRL+C . after running for longer time it will quit itself.
fedora version:Fedora 15 i686
Linux version:
2.6.38.
bash-4.
coreutils-
affects: | launchpad → ubuntu-ubuntu-server |
affects: | ubuntu-ubuntu-server → gnubash |
affects: | gnubash → bash (Ubuntu) |
sorry, can't protect against pebkac issues.