Bug 677830 - tcsh stuck in infinite loop after fg (foreground) command
Summary: tcsh stuck in infinite loop after fg (foreground) command
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: tcsh
Version: 14
Hardware: i386
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Vojtech Vitek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-16 00:40 UTC by Penelope Fudd
Modified: 2015-03-04 23:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 16:35:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Penelope Fudd 2011-02-16 00:40:15 UTC
Description of problem:
I've got a tcsh that's consuming 100% cpu while doing nothing obvious.  Up to this point, I had been starting 20+ jobs in the background, and as each one stopped for keyboard input, I'd type 'fg' and give them some.

Version-Release number of selected component (if applicable):
tcsh-6.17-11.fc14.i686

How reproducible:
Not tried.

Steps to Reproduce:
1. Start 20 background tasks with a foreach loop
  foreach n (`cat .alist`)
    ssh -n $n xlogo > $n &
  end
2. Get notices about jobs stopping because they need keyboard input, in this case, "host not found in known_hosts file, are you sure?"
3. Type 'fg' for each, type 'yes'
  
Actual results:
It worked for most of the jobs, but at the end, I got this:

...
ssh -n 137.82.128.93 xlogo
The authenticity of host '137.82.128.93 (<no hostip for proxy command>)' can't be established.
RSA key fingerprint is 00:12:22:8c:f6:8b:01:b8:43:89:a1:ea:07:50:9c:b7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '137.82.128.93' (RSA) to the list of known hosts.
^CKilled by signal 2.
kirk:/tmp> fg
ssh -n 137.82.128.82 xlogo
The authenticity of host '137.82.128.82 (<no hostip for proxy command>)' can't be established.
RSA key fingerprint is 22:20:ac:e1:f1:9a:2b:a2:d1:ea:02:b2:d0:ad:2f:57.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '137.82.128.82' (RSA) to the list of known hosts.
^CKilled by signal 2.
kirk:/tmp> fg
ssh -n 137.82.128.107 xlogo
fg: No such job.
kirk:/tmp> fg

^C^C^Z^\



Expected results:
It should 'just work'...


Additional info:
It looks like the code that keeps track of the background jobs got
confused about how many jobs were in the list (due to asynchronous
updates as jobs ended), and it went past the end of the list.  It may
need more error checking to prevent a race condition, I guess.

Comment 1 Bob Arendt 2011-03-24 03:57:29 UTC
This could be the same problem that we've seen, and we have a simple patch.  See https://bugzilla.redhat.com/show_bug.cgi?id=690356

Comment 2 Vojtech Vitek 2011-03-24 14:49:39 UTC
Bob, this issue is not related to bug 690356.

Comment 3 Fedora End Of Life 2012-08-16 16:35:25 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.