gfortran tests hanging, causing timeouts

Geoffrey Keating geoffk@apple.com
Thu Jul 24 20:05:00 GMT 2008


After revision 137630 and probably before 137646 but at least before  
138065, some gfortran tests started hanging on powerpc-darwin.  There  
are enough of these tests hanging that it adds more than 16 hours to  
the bootstrap+test time, causing the regression tester to consider  
that the build has probably hung and abort it.

More information is available at <http://gcc.gnu.org/regtest/HEAD/>.

I looked at one of them, chmod_3.exe, and it was hung here:

#0  0x9002b888 in semaphore_wait_signal_trap ()
#1  0x9000198c in pthread_mutex_lock ()
#2  0x0029899c in *__gfortrani_find_file (file=0xe <Address 0xe out of  
bounds>, file_len=40) at /Users/regress/tbox/svn-gcc/libgfortran/../ 
gcc/gthr-posix.h:695
#3  0x0028db7c in *__gfortrani_new_unit (opp=0xbfffec98, u=0x2b3660,  
flags=0xbffff238) at /Users/regress/tbox/svn-gcc/libgfortran/io/open.c: 
489
#4  0x0028e2e4 in *__gfortran_st_open (opp=0xbffff2ec) at /Users/ 
regress/tbox/svn-gcc/libgfortran/io/open.c:703
#5  0x0000281c in MAIN__ () at /Users/regress/tbox/svn-gcc/gcc/ 
testsuite/gfortran.dg/chmod_3.f90:7
#6  0x00002bb8 in main (argc=10, argv=0xb) at /Users/regress/tbox/svn- 
gcc/libgfortran/fmain.c:21

There are no other threads in the program:

(gdb) info threads
* 1 process 20757 local thread 0x1003  0x9002b978 in  
semaphore_wait_trap ()

What appears to be happening is that get_external_unit in io/unit.c is  
being miscompiled, so that the call to __gthread_mutex_unlock is being  
jumped over; then when *__gfortrani_find_file tries to take the lock  
it hangs.

Looking at all the relevant changes, I most suspect this change:

------------------------------------------------------------------------
r137631 | dberlin | 2008-07-08 09:11:06 -0700 (Tue, 08 Jul 2008) | 82  
lines

I can provide preprocessed source if that would help.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2462 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-regression/attachments/20080724/a1d46eaa/attachment.p7s>


More information about the Gcc-regression mailing list