[R] Help with debugging message

Terry Therneau therneau at mayo.edu
Tue Feb 21 20:30:08 CET 2012


 Someone has given me a data set that produces a failure with all the
hallmarks of a memory overrun in a C routine.  I've tried running it
under an instrumented version of R with valgrind and don't catch
anything.  I do get one error message out though:

==642== Warning: set address range perms: large range [0x3901d040,
0x3f2ae7070) (undefined)

Can anyone shed light on what this means?

Details:
 R2.14.1
 Centos
 Probable culprit: "agsurv" in the survival package.  

 Simplifed overview:
    survfitcoxph.fit:
	calls agsurv multiple times to create a set of survival curves that are
the basis for calculation
	Then for each desired output curve, calls a routine internal to
survfitcoxph that does various things (mostly reconciling time points).
That routine finishes its work, creates a list, and returns.  The object
created isn't large at all. That return process never completes ---
infinite wait. 

  Kill it with cntrl\, claims to have died in Rf_alloc :
==5420== 
==5420== Process terminating with default action of signal 3 (SIGQUIT)
==5420==    at 0x4D14695: Rf_allocVector (memory.c:2445)
==5420==    by 0x4D8FCAC: SubassignTypeFix (subassign.c:113)
==5420==    by 0x4D91146: do_subassign2_dflt (subassign.c:1568)
==5420==    by 0x4D92012: do_subassign2 (subassign.c:1451)
==5420==    by 0x4CD940D: Rf_eval (eval.c:469)
==5420==    by 0x4CDBEB6: do_set (eval.c:1724)
==5420==    by 0x4CD940D: Rf_eval (eval.c:469)
==5420==    by 0x4CDB91B: applydefine (eval.c:1680)
==5420==    by 0x4CD940D: Rf_eval (eval.c:469)
==5420==    by 0x4CDAC21: do_begin (eval.c:1420)
==5420==    by 0x4CD940D: Rf_eval (eval.c:469)
==5420==    by 0x4CDCA27: do_for (eval.c:1294)
==5420== 
==5420== HEAP SUMMARY:
==5420==     in use at exit: 16,030,517,919 bytes in 13,235 blocks
==5420==   total heap usage: 32,358 allocs, 19,123 frees, 16,057,325,344
bytes al

This error appears to be repeatable.

Terry T



More information about the R-help mailing list