GCJ program hanging in __pthread_sigsuspend on exit()

Thomas Aeby aeby@graeff.com
Mon Dec 5 21:42:00 GMT 2005


>From time to time my java programs (currently: Debian Linux, GCC 4.0.1)
hang when they should exit. When this happens, I end up with one process
(=1 thread) staying up. When I generate a backtrace via GDB I get
something like this:

#0  __pthread_sigsuspend (set=0xbffff430)
    at ../linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c:56
#1  0x084a8698 in __pthread_wait_for_restart_signal (self=0x8780540) at
pthread.c:1203
#2  0x084a9d70 in __pthread_alt_lock (lock=0x884f1f0, self=0x8780540) at
restart.h:34
#3  0x084a7505 in __pthread_mutex_lock (mutex=0x884f1e0) at mutex.c:123
#4  0x084c4811 in free ()
#5  0x0827d767 in __deregister_frame_info_bases (begin=0x8781f90) at
unwind-dw2-fde.c:201
#6  0x0804818b in __do_global_dtors_aux ()
#7  0x08502e1e in _fini ()
#8  0x084bb04d in exit ()
#9  0x082aef2d in java::lang::Runtime::exitInternal (this=0xfffffffc,
status=0)
    at ../../../gcc-4.0.1/libjava/java/lang/natRuntime.cc:124
#10 0x082c8454 in java.lang.Runtime.halt(int) (this=0x5cfc0, status=0)
    at ../../../gcc-4.0.1/libjava/java/lang/Runtime.java:385
#11 0x082c7fab in java.lang.Runtime.exit(int) (this=0x5cfc0, status=0)
    at ../../../gcc-4.0.1/libjava/java/lang/Runtime.java:271
#12 0x082cce34 in java.lang.System.exit(int) (status=2147483647)
    at ../../../gcc-4.0.1/libjava/java/lang/System.java:501
#13 0x0814a530 in sfi.director.util.Tools.exit(int) (exitcode=0)
    at sfi/director/util/Tools.java:472

So, the left over thread is the one running System.exit() and actually
the exit() procedure hangs. Does this look familiar to someone? Any
acknowledgements that this happens to someone else? Does somebody know
a solution to this?

Best regards,
Tom
-- 
----------------------------------------------------------------------------
Thomas Aeby, Kirchweg 52, 1735 Giffers, Switzerland, Tel: (+41)264180040
Internet: aeby@graeff.com                       PGP public key available
----------------------------------------------------------------------------




More information about the Java mailing list