Skip to content
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

Invalid memory use and segfaults #459

Closed
otsaw opened this issue Jun 10, 2014 · 2 comments
Closed

Invalid memory use and segfaults #459

otsaw opened this issue Jun 10, 2014 · 2 comments

Comments

@otsaw
Copy link

otsaw commented Jun 10, 2014

After porting some code to dplyr's left_join, group_by+summarize and rbind_*, we keep getting segfaults often at rather random places. Assuming these segfaults were preceded by some kind of memory corruption, I ran R with valgrind (R -d valgrind &> foo.log < foo.R) and got the following output.

https://gist.github.com/otsaw/19be4bcff7690e8e75c8
https://gist.github.com/otsaw/8c368d552a1f378bae75

I have also managed to catch one relevant looking segfault with a backtrace.

https://gist.github.com/otsaw/f15a68e841e78187e79f

These problems occur in a large pile of stochastic simulation code. I haven't been able to isolate the problem. I can reproduce it, but not consistently. If I run the code with one core and valgrind, it might take days to reproduce. As far as I can tell, there shouldn't be anything weird about the data frames fed to dplyr functions, just normal data frames with more than zero rows and columns and basic data types.

I'm not familiar with debugging compiled code or memory errors. Does that output help at all? Is there something besides valgrind that I should try? Should dplyr's valgrind output be clean or can these be false positives? Based on the output, there appears to be some problems converting back to data frame from tbl_df; as_regular_df and ungroup_grouped_df?

@romainfrancois
Copy link
Member

It is going to be really hard to help if you can't give us some reproducible. The valgrind output is not really useful in isolation.

@otsaw
Copy link
Author

otsaw commented Jun 11, 2014

Yes, I figured so. Feel free to close this, I got no clues remaining, I can't isolate the bug.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants