------- Comment #11 from dominiq at lps dot ens dot fr 2008-07-13 16:19 ------- I confirm that the problem appears at revision 137631 (137630 works fine).
Using gdb, the hanging depends on the code: for the comment #10 I get the following backtrace #0 0x93b424ee in semaphore_wait_signal_trap () #1 0x93b49fc5 in pthread_mutex_lock () #2 0x0019c172 in *__gfortrani_close_units () at ../gcc/gthr-posix.h:695 #3 0x000fc291 in cleanup () at ../../../gcc-4.4-work/libgfortran/runtime/main.c:175 #4 0x8fe12fc3 in __dyld__ZN16ImageLoaderMachO13doTerminationERKN11ImageLoader11LinkContextE () #5 0x8fe04f7b in __dyld__ZN4dyld14runTerminatorsEPv () #6 0x93b6afdc in __cxa_finalize () #7 0x93b6aed0 in exit () #8 0x00001eef in start () If I add print *, 'open' close(11) before the 'end', I get #0 0x93b424ee in semaphore_wait_signal_trap () #1 0x93b49fc5 in pthread_mutex_lock () #2 0x0019c1e5 in get_external_unit (n=6, do_create=1) at ../../../gcc-4.4-work/libgfortran/io/unit.c:288 #3 0x0019a501 in data_transfer_init (dtp=0xbfffd9d8, read_flag=0) at ../../../gcc-4.4-work/libgfortran/io/transfer.c:1828 #4 0x00001efd in MAIN__ () #5 0x00001f98 in main (argc=1, argv=0xbfffdb84) at ../../../gcc-4.4-work/libgfortran/fmain.c:21 In all cases I have looked at the hanging occurs after: ... (gdb) stepi 0x93b42cf7 in _sysenter_trap () (gdb) stepi ^C Program received signal SIGINT, Interrupt. 0x93b424ee in semaphore_wait_signal_trap () (gdb) disassemble 0x93b42cf0 0x93b42d00 Dump of assembler code from 0x93b42cf0 to 0x93b42d00: 0x93b42cf0 <cerror+56>: inc %ebx 0x93b42cf2 <cerror+58>: xchg %ax,%ax 0x93b42cf4 <_sysenter_trap+0>: pop %edx 0x93b42cf5 <_sysenter_trap+1>: mov %esp,%ecx 0x93b42cf7 <_sysenter_trap+3>: sysenter 0x93b42cf9 <_sysenter_trap+5>: nopl (%eax) 0x93b42cfc <i386_get_ldt+0>: mov $0x6,%eax End of assembler dump. -- dominiq at lps dot ens dot fr changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[4.4 Regression] Broken IOs |[4.4 Regression] I/Os hang |at rev. 137644 on i686- |at rev. 137631 on darwin9 |apple-darwin9 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36806