Re: Strange wait for input in background processes

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Thu, 4 Mar 2010 12:12:28 +0100


Hi Robert,

this should be fixed in the trunk. The problem was terminal output, not input: editline (ROOT's new terminal handler) needs to tell the terminal its configuration. It simply delays that now if the process is in the background.

Thanks for your report!

Cheers, Axel.

Robert Hatcher wrote on 03/03/2010 09:24 PM:
> Hi,
> I've noticed lately that when I run our main exe in background
> via a command like:
>
> $ minosexe -b -q myscript.C &
>
> the process hangs:
>
> [1]+ Stopped minosexe -bq myscript.C
>
> whereas:
>
> $ minosexe -b -q myscript.C < /dev/null &
>
> works. To get the first to move on I have to bring
> it to the foreground for a minute and then return it to
> background.
>
> Both indicate that something wants the terminal connected
> even if it isn't reading actual input (as far as I can tell).
>
> If I connect to the stalled process via gdb I get the
> traceback below. Could a test be put in place in the
> readline handling to see if it is connected to a terminal
> before trying to do this?
>
> I'm running under bash shell on Scientific Linux 4.4 w/
> ROOT versions:
> v5.20/00, v5.22/00c, v5.24/00b, v5.26/00b and SVN HEAD.
>
> For the SVN HEAD version the traceback is:
> (gdb) where
> #0 0x002577a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> #1 0x04bb13f0 in tcsetattr () from /lib/tls/libc.so.6
> #2 0x01b5645a in tty_setup (el=0x8694888) at core/editline/src/tty.cxx:539
> #3 0x01b5661e in tty_init (el=0x8694888) at core/editline/src/tty.cxx:575
> #4 0x01b41cdc in el_init (prog=0x1eec74f "", fin=0x4c19740,
> fout=0x4c195e0,
> ferr=0x4c19480) at core/editline/src/el.cxx:93
> #5 0x01b4acaf in rl_initialize () at core/editline/src/readline.cxx:223
> #6 0x01b4c6a9 in stifle_history (max=400)
> at core/editline/src/readline.cxx:996
> #7 0x01b3bb2d in Gl_histsize (size=500, save=400)
> at core/editline/src/Getline_el.cxx:410
> #8 0x017511a5 in TRint (this=0x840dd40, appClassName=0x1520eaf "TAPP",
> argc=0x153cd90, argv=0x153cda0, options=0x0, numOptions=0, noLogo=true)
> at core/rint/src/TRint.cxx:232
> #9 0x014e946a in JobCRootEnv (this=0x840c8f8, argc=3, argv=0xbfffb3d4)
> at
> /afs/fnal.gov/files/data/minos/d120/packages/JobControl/HEAD/JobCRootEnv.cxx:146
> #10 0x014c3030 in JobCEnv (this=0x840c890, argc=3, argv=0xbfffb3d4)
> at
> /afs/fnal.gov/files/data/minos/d120/packages/JobControl/HEAD/JobCEnv.cxx:100
> #11 0x014c40e5 in JobCEnv::Instance (argc=3, argv=0xbfffb3d4)
> at
> /afs/fnal.gov/files/data/minos/d120/packages/JobControl/HEAD/JobCEnv.cxx:376
> #12 0x001fbaf2 in main (argc=3, argv=0xbfffb3d4)
> at
> /afs/fnal.gov/files/data/minos/d120/packages/JobControl/HEAD/main/JobCmain.cxx:19
> #13 0x04b06de3 in __libc_start_main () from /lib/tls/libc.so.6
> #14 0x08048a01 in _start ()
>
>
> Robert W. Hatcher | rhatcher_at_fnal.gov
> <mailto:rhatcher_at_fnal.gov> 630-840-3102
> FNAL CD/REX (MINOS) | MS 220, PO Box 500, Batavia IL 60510
>
>
>
>
Received on Thu Mar 04 2010 - 12:08:50 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 04 2010 - 17:50:01 CET