-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASAN error with package POUMM #4746
Comments
Hello, Thanks @mattdowle for reproducing the error with gctorture. If I am reading the log-file right, the operation causing the GCC-ASAN error should be this one.
The above code is located in the function summary.POUMM, file summaryPOUMM.R in the POUMM R-package. I tried to create a minimal example (stripped of any POUMM-specific stuff) that should reproduce the error. Please, do this first:
Hope this will reproduce the error faster. If it doesn't, then, probably something wrong happens earlier in the process but only manifests at this line of code. Let's see... |
Thanks, @venelin . |
The run with
|
Thanks @venelin for the repro data and code, in data-raw.zip above. I tried that again, this time repeating 10 times. On the 8th iteration it generated the error. Great.
|
Thanks @mattdowle for persisting! Really clever to put the gc() call in the loop! I wonder if the failure to reproduce in each iteration is due to a gctorture artefact or, rather, because, the error only occurs sporadically? |
Yes it's the Have managed to make an MRE independent of POUMM, below.
So this is the test I'll add to close this one, with 5 iterations assuming that reliably reproduces the asan fault.
|
Thanks @mattdowle for fixing this! I would wait until 1.13.0 gets published on CRAN, and then re-submit POUMM. Is this new data.table release already planned? |
Thanks for your patience, @venelin, and your help in tracking this one down. Sorry again your package was removed from CRAN because of it. |
Great 👌! And thanks for creating data.table! |
The maintainer of package POUMM, @venelin, contacted me because this error showed up on CRAN's gcc ASAN additional check of POUMM. The root cause appears to be data.table. POUMM was removed from CRAN because it wasn't fixed within 2 weeks, which I think is unreasonable. Especially given POUMM was passing with OK and NOTE and only failing the gcc-asan additional check.
The CRAN log shows a
heap-use-after-free
originating indogroups.c
andassign.c
(all the warnings can be ignored, I think, as they're unrelated to this memory problem): https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-ASAN/POUMM/00check.logAfter some effort I've managed to reproduce a
heap-use-after-free
, albeit originating from a different part of data.table code, output below.To reproduce I needed to use gc torture together with our standard strict build of R which includes strict-barrier and ASAN. I think it is a true data.table issue at this stage.
I extracted the code from POUMM's UserGuide.Rmd and ran it with echo on and gc torture turned on just before the plot(summary(...)) thanks to input from @venelin that the data.table usage is induced by the plot.summary. Still dealing with very long run times of over 12 hours to reproduce so it's a case of whittling it down since torture is required. The
SET_VECTOR_ELT
shown on CRAN's log looks ok to me (that protects its argument being assigned) so I don't see the problem just by looking at the ASAN output, so far. Locally, the output points toduplicate.c
so I'll look at that next.The text was updated successfully, but these errors were encountered: