MichaelChirico / r-bugs

A ⚠️read-only⚠️mirror of https://bugs.r-project.org/
20 stars 0 forks source link

[BUGZILLA #15673] R C5.0 Segmentation Fault/Memory Management Error #5228

Closed MichaelChirico closed 4 years ago

MichaelChirico commented 4 years ago

Created attachment 1564 [details] R script to recreate bug

I found a memory allocation error(s) testing the R C5.0 software. Technically the bug is not in the R code, but in the C classes invoked by the CRAN C50 package. See handling of dynamic memory allocation (use of callloc, malloc, realloc, and free) in that code. This bug exists in the new version of C5.0 0.1.0-16 and in older versions, such as C5.0 version 0.0.9 and C5.0 version 0.1.0-013. I'm attaching an R script that will recreate the error. The script also has more notes regarding the issue. Just run the "runMyTest" function to recreate. I tested this using rApache in Linux and RStudio in Windows 7 64bit.

The Linux core dump shows the segmentation fault when invoking calloc from C standard library.

For example:

[Fri Jan 24 13:24:36 2014] [notice] child pid 6628 exit signal Segmentation fault (11), possible coredump in /tmp glibc detected /usr/sbin/httpd: corrupted double-linked list: 0x00007f3c455445b0 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x30a36760e6)[0x7f3c41a5f0e6] /lib64/libc.so.6(+0x30a3679f0a)[0x7f3c41a62f0a] /lib64/libc.so.6(__libc_calloc+0xc6)[0x7f3c41a635a6] /usr/lib64/R/library/C50/libs/C50.so(Pcalloc+0x17)[0x7f3c341d9857] /usr/lib64/R/library/C50/libs/C50.so(SiftRules+0x3d5)[0x7f3c341d3005] /usr/lib64/R/library/C50/libs/C50.so(FormRules+0x346)[0x7f3c341bc656] /usr/lib64/R/library/C50/libs/C50.so(ConstructClassifiers+0x478)[0x7f3c341b6aa8] /usr/lib64/R/library/C50/libs/C50.so(c50main+0x269)[0x7f3c341cd279] /usr/lib64/R/library/C50/libs/C50.so(+0x2ffed)[0x7f3c341d5fed] /usr/lib64/R/lib/libR.so(+0x33fc293b27)[0x7f3c38898b27] /usr/lib64/R/lib/libR.so(Rf_eval+0x6e3)[0x7f3c388cb323] /usr/lib64/R/lib/libR.so(+0x33fc2c9328)[0x7f3c388ce328] /usr/lib64/R/lib/libR.so(Rf_eval+0x4dc)[0x7f3c388cb11c] /usr/lib64/R/lib/libR.so(+0x33fc2c9510)[0x7f3c388ce510] /usr/lib64/R/lib/libR.so(Rf_eval+0x4dc)[0x7f3c388cb11c] /usr/lib64/R/lib/libR.so(Rf_applyClosure+0x341)[0x7f3c388bda71] /usr/lib64/R/lib/libR.so(Rf_eval+0x20d)[0x7f3c388cae4d] /usr/lib64/R/lib/libR.so(+0x33fc2c9328)[0x7f3c388ce328] /usr/lib64/R/lib/libR.so(Rf_eval+0x4dc)[0x7f3c388cb11c] /usr/lib64/R/lib/libR.so(+0x33fc2c9510)[0x7f3c388ce510] /usr/lib64/R/lib/libR.so(Rf_eval+0x4dc)[0x7f3c388cb11c] /usr/lib64/R/lib/libR.so(Rf_applyClosure+0x341)[0x7f3c388bda71] /usr/lib64/R/lib/libR.so(+0x33fc2f94e3)[0x7f3c388fe4e3] /usr/lib64/R/lib/libR.so(+0x33fc2f99ca)[0x7f3c388fe9ca] /usr/lib64/R/lib/libR.so(Rf_eval+0x4dc)[0x7f3c388cb11c] /usr/lib64/R/lib/libR.so(Rf_applyClosure+0x341)[0x7f3c388bda71] /usr/lib64/R/lib/libR.so(Rf_eval+0x20d)[0x7f3c388cae4d]


METADATA

MichaelChirico commented 4 years ago

Please file bugs of contributed packages to the authors.


METADATA

MichaelChirico commented 4 years ago

Simon,

Okay thanks. Do you know who it is that I should contact about this? Who is the author/maintainer of the C source code used by R C5.0?

Thanks,

(In reply to Simon Urbanek from comment #1)

Please file bugs of contributed packages to the authors.

METADATA

MichaelChirico commented 4 years ago

Type maintainer("C50")


METADATA

MichaelChirico commented 4 years ago

Simon,

Thanks for the tip. FYI: sent email to Max Kuhn regarding issue. (In reply to Simon Urbanek from comment #3)

Type maintainer("C50")

METADATA

MichaelChirico commented 4 years ago

FYI: Contacted Max regarding this issue. It was a memory management/cleanup issue with the C5.0 software. This problem will be fixed by the new C5.0 version 0.1.0-17, soon to be released.


METADATA