[R] Fwd: help track a segmentation fault

Omar Lakkis uofiowa at gmail.com
Wed May 4 20:13:57 CEST 2005


This is the back trace.
Is my best shot recompiling R with debug flag to get better info from
teh debugger?

(gdb) r --no-save < r.in > r.out
Starting program: /usr/lib/R/bin/exec/R --no-save < r.in > r.out
(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)
(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 16384 (LWP 14949)]
Creating a new generic function for 'names' in 'its'
Creating a new generic function for 'names<-' in 'its'
Creating a new generic function for 'print' in 'its'
Creating a new generic function for 'start' in 'its'
Creating a new generic function for 'end' in 'its'
Creating a new generic function for 'summary' in 'its'
Creating a new generic function for 'diff' in 'its'
Creating a new generic function for 'union' in 'its'
Creating a new generic function for 'intersect' in 'its'

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 14949)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x00000001 in ?? ()
#2  0x08647304 in ?? ()
#3  0x08e7bb5c in ?? ()
#4  0x4009f754 in Rf_eval () from /usr/lib/R/lib/libR.so
#5  0x4009f9e6 in Rf_eval () from /usr/lib/R/lib/libR.so
#6  0x400a2501 in Rf_evalList () from /usr/lib/R/lib/libR.so
#7  0x400d1eed in do_internal () from /usr/lib/R/lib/libR.so
#8  0x400d3cc0 in do_nextmethod () from /usr/lib/R/lib/libR.so
#9  0x400d1a41 in do_internal () from /usr/lib/R/lib/libR.so
#10 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#11 0x400a01b7 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#12 0x4009fb2b in Rf_eval () from /usr/lib/R/lib/libR.so
#13 0x400a1845 in do_begin () from /usr/lib/R/lib/libR.so
#14 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#15 0x400a01b7 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#16 0x400a4054 in Rf_DispatchGroup () from /usr/lib/R/lib/libR.so
#17 0x4012574b in do_relop () from /usr/lib/R/lib/libR.so
#18 0x4009fd62 in Rf_eval () from /usr/lib/R/lib/libR.so
#19 0x400a2501 in Rf_evalList () from /usr/lib/R/lib/libR.so
#20 0x4009fcca in Rf_eval () from /usr/lib/R/lib/libR.so
#21 0x4009f9e6 in Rf_eval () from /usr/lib/R/lib/libR.so
#22 0x400a26f7 in Rf_evalListKeepMissing () from /usr/lib/R/lib/libR.so
#23 0x400a3300 in Rf_EvalArgs () from /usr/lib/R/lib/libR.so
#24 0x400a36d7 in Rf_DispatchOrEval () from /usr/lib/R/lib/libR.so
#25 0x40145387 in do_subset () from /usr/lib/R/lib/libR.so
#26 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#27 0x400a2501 in Rf_evalList () from /usr/lib/R/lib/libR.so
#28 0x4009fcca in Rf_eval () from /usr/lib/R/lib/libR.so
#29 0x400a2501 in Rf_evalList () from /usr/lib/R/lib/libR.so
#30 0x4009fcca in Rf_eval () from /usr/lib/R/lib/libR.so
#31 0x400a22db in do_set () from /usr/lib/R/lib/libR.so
#32 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#33 0x400a0dd4 in do_if () from /usr/lib/R/lib/libR.so
#34 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#35 0x400a1845 in do_begin () from /usr/lib/R/lib/libR.so
#36 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#37 0x400a14da in do_while () from /usr/lib/R/lib/libR.so
#38 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#39 0x400a1845 in do_begin () from /usr/lib/R/lib/libR.so
#40 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#41 0x400a01b7 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#42 0x4009fb2b in Rf_eval () from /usr/lib/R/lib/libR.so
#43 0x400a22db in do_set () from /usr/lib/R/lib/libR.so
#44 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#45 0x400a1845 in do_begin () from /usr/lib/R/lib/libR.so
#46 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#47 0x400a14da in do_while () from /usr/lib/R/lib/libR.so
#48 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#49 0x400a1845 in do_begin () from /usr/lib/R/lib/libR.so
#50 0x4009fe22 in Rf_eval () from /usr/lib/R/lib/libR.so
#51 0x400a01b7 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#52 0x4009fb2b in Rf_eval () from /usr/lib/R/lib/libR.so
#53 0x400c305b in Rf_ReplIteration () from /usr/lib/R/lib/libR.so
#54 0x400c3273 in Rf_ReplIteration () from /usr/lib/R/lib/libR.so
---Type <return> to continue, or q <return> to quit---
#55 0x400c3df1 in run_Rmainloop () from /usr/lib/R/lib/libR.so
#56 0x400c3e2e in Rf_mainloop () from /usr/lib/R/lib/libR.so
#57 0x080486d0 in main ()
(gdb) 

---------- Forwarded message ----------
From: Omar Lakkis <uofiowa at gmail.com>
Date: May 4, 2005 12:51 PM
Subject: help track a segmentation fault
To: r-help at stat.math.ethz.ch


I have an R script that I run using

nohup R CMD BATCH r.in r.out &

The code loops through data from the database and takes hours. The
problem is, in about an hour and a half after I start the script the
program stops and I get

/usr/lib/R/bin/BATCH: line 55: 14067 Done                    ( echo
"invisible(options(echo = TRUE))"; cat ${in}; echo "proc.time()" )
     14068 Segmentation fault      | ${R_HOME}/bin/R ${opts} >${out} 2>&1

in the nohup.out file.
If I run the code from within R, not using CMD BATCH, R sig faults
after the hour and a half (roughly).
I monitored the process using "top" and found nothing usual, the mem
utilization is around 15% and  CPU time in the 90s%. I do not see a
steady increase in mem usage signaling memory leak.
I have a core dump file generated but I do not know what to do with it.
Can someone, please, suggest to me what I can do to track this
problem, probably using the -d flag with R, which I do not know how to
use.
I am running R 2.1.0 on debian.




More information about the R-help mailing list