program hangs after calling exit



Hello,

I posted this question on gnu.gcc.help and was asked to try here. I
have included more information based on advice on that group.

I have a program that uses Check Point's OPSEC SDK. I had two instances
of the program running. The programs exit when they detect that a
certain file is not locked. I traced test lock. After running them
overnight, I removed the lock on this file and both processes detected
this and attempted to exit but continued to hang. I used top and saw
that the State was R and that the programs continued to consume CPU
time.

Here is the output of "thread apply all where" after attaching gdb to
process 1:

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.

Thanks

.



Relevant Pages

  • Re: program hangs after calling exit
    ... have included more information based on advice on that group. ... of the program running. ... I traced test lock. ... this and attempted to exit but continued to hang. ...
    (comp.os.linux.development.apps)
  • Re: Roundabouts
    ... away from the outside edge of a roundabout, no matter which exit you are ... I thought that the highwaycdoe advice was to keep in the lefthand lane. ...
    (uk.rec.cycling)
  • Re: [OT] Happy Holidays
    ... will reconsider leaving us without your help and advice. ... Where was the exit() message? ... night, good luck with the list, and Happy Holidays. ...
    (Ubuntu)
  • Re: Roundabouts
    ... away from the outside edge of a roundabout, no matter which exit you are ... I thought that the highwaycdoe advice was to keep in the lefthand lane. ...
    (uk.rec.cycling)
  • java virtual machine launcher headache
    ... find the main class, program will exit", on the desktop. ... referring to the java virtual machine launcher. ... Can anyone out there give me some advice on ... is on offer (only kidding), but any advice would be much ...
    (microsoft.public.windowsxp.general)