Andy wrote:
> Weird. SIGALRM should not be set anywhere. It's used for the corefile
> resume, but the x86_64 version isn't merged yet (it doesn't quite
> work). I would run your program under strace and see if you can see
> where the alarm() call is being called-- that is what is eventually
> causing the crash.
> Andy
>From my past experiences, it's Matlab's polling that raises a SIGALRM,
the g95 MEX functions seem to abort on this signal.
Here's a Matlab session backtracing the SIGALRM
[chulbert@mellin ~]$ cat test_g95_mex.f90
SUBROUTINE MEXFUNCTION(nlhs,plhs,nrhs,prhs)
INTEGER :: nlhs,nrhs
INTEGER(kind=8) :: plhs(nlhs),prhs(nrhs)
END SUBROUTINE MEXFUNCTION
[chulbert@mellin ~]$ g95 -shared -o test_g95_mex.mexa64
test_g95_mex.f90
[chulbert@mellin ~]$ /usr/local/bin/matlab -Dgdb
GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) handle SIGALRM stop
Signal Stop Print Pass to program Description
SIGALRM Yes Yes Yes Alarm clock
(gdb) r -nojvm
Starting program: /usr/local/matlab/R2006b/bin/glnxa64/MATLAB -nojvm
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 46912601027440 (LWP 24182)]
[New Thread 1084229952 (LWP 24187)]
[Thread 1084229952 (LWP 24187) exited]
< M A T L A B >
Copyright 1984-2006 The MathWorks, Inc.
Version 7.3.0.298 (R2006b)
August 03, 2006
Detaching after fork from child process 24188.
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
>> test_g95_mex
>> clear all
Program received signal SIGALRM, Alarm clock.
[Switching to Thread 46912601027440 (LWP 24182)]
0x00000030c2cc3086 in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00000030c2cc3086 in poll () from /lib64/libc.so.6
#1 0x00000030c862d40a in _XtWaitForSomething () from
/usr/lib64/libXt.so.6
#2 0x00000030c862e543 in XtAppNextEvent () from /usr/lib64/libXt.so.6
#3 0x00002aaaaeba1a5b in UIX_AssertXThread_internal ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwuix.so
#4 0x00002aaaaeba1d0e in UIX_AssertXThread_internal ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwuix.so
#5 0x00002aaaab123330 in ioGetCharNoEcho ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwservices.so
#6 0x00002aaaab47215a in iolib::IOProxy::ReportIqmRequest ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwbridge.so
#7 0x00002aaaab4733a0 in ioCmdLineEditLoad ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwbridge.so
#8 0x00002aaaab47a40b in mnGetExecStatusAsInt ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwbridge.so
#9 0x00002aaaab47a52a in mnGetExecStatusAsInt ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwbridge.so
#10 0x00002aaaab47ac7b in mnParser ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwbridge.so
#11 0x00002aaaab5af503 in mcrInstance::mnParser ()
from /usr/local/matlab/R2006b/bin/glnxa64/libmwmcr.so
#12 0x000000000040159a in ?? ()
#13 0x00000030c2c1c784 in __libc_start_main () from /lib64/libc.so.6
#14 0x00000000004013da in ?? ()
#15 0x00007fffeeec3e98 in ?? ()
#16 0x0000000000000000 in ?? ()