Re: program hangs after calling exit
- From: "David Schwartz" <davids@xxxxxxxxxxxxx>
- Date: Tue, 20 Dec 2005 18:52:18 -0800
"mar" <marvind434@xxxxxxxxx> wrote in message
news:1135111874.811838.307670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thread 1 (Thread -1218497376 (LWP 27039)):
> #0 0x00eb7bc6 in _IO_flush_all_lockp () from /lib/tls/libc.so.6
> #1 0x00eb7f20 in _IO_cleanup () from /lib/tls/libc.so.6
> #2 0x00e74702 in exit () from /lib/tls/libc.so.6
> #3 0x00e5f7ff in __libc_start_main () from /lib/tls/libc.so.6
> #4 0x08050c21 in _start ()
>
> Here is the output of "thread apply all where" after attaching gdb to
> process 2:
> Thread 1 (Thread -1218501472 (LWP 28306)):
> #0 0x00b47c2e in _IO_flush_all_lockp () from /lib/tls/libc.so.6
> #1 0x00b47f20 in _IO_cleanup () from /lib/tls/libc.so.6
> #2 0x00b04702 in exit () from /lib/tls/libc.so.6
> #3 0x00aef7ff in __libc_start_main () from /lib/tls/libc.so.6
> #4 0x08050c21 in _start ()
>
> I ran these programs on RedHat Enterprise Linux 3.0 kernel 2.4.21-20. I
> am not sure why these processes are hanging after calling exit. This
> does not happen all the time - only after running these programs for a
> long time.
>
> I would appreciate any help in this matter.
It may be the context in which you are calling 'exit'. But what's
happening is that the 'exit' function is trying to clean up standard I/O and
some thread is still in the middle of a standard I/O operation. This can
commonly happen if you call 'exit' from a signal handler, but it can also
happen when a thread makes a blocking standard I/O operation that blocks for
a very long time (like reading from a keyboard or network connection).
DS
.
- Follow-Ups:
- Re: program hangs after calling exit
- From: Paul Pluzhnikov
- Re: program hangs after calling exit
- References:
- program hangs after calling exit
- From: mar
- program hangs after calling exit
- Prev by Date: Re: program hangs after calling exit
- Next by Date: Re: Porting Linux game to handset
- Previous by thread: Re: program hangs after calling exit
- Next by thread: Re: program hangs after calling exit
- Index(es):
Relevant Pages
|