We’re getting a somewhat random segfault on a dataframes
getindex operation inside a for-loop. I haven’t been able to extract a MWE from the proprietary code where this is occurring, but here is part of the segfault and some notes on what we’ve tried. Maybe folks will have some recommendations on things to try?
2019-01-23T13:42:31Z signal (11): Segmentation fault 2019-01-23T13:42:31Z in expression starting at no file:0 2019-01-23T13:42:31Z ht_keyindex at ./dict.jl:280 2019-01-23T13:42:31Z getindex at ./dict.jl:477 [inlined] 2019-01-23T13:42:31Z getindex at /root/.julia/packages/DataFrames/lyCjP/src/other/index.jl:148 [inlined] 2019-01-23T13:42:31Z getindex at /root/.julia/packages/DataFrames/lyCjP/src/dataframe/dataframe.jl:243 [inlined] 2019-01-23T13:42:31Z view at /root/.julia/packages/DataFrames/lyCjP/src/subdataframe/subdataframe.jl:83 [inlined] 2019-01-23T13:42:31Z getindex at /root/.julia/packages/DataFrames/lyCjP/src/subdataframe/subdataframe.jl:102 [inlined] 2019-01-23T13:42:31Z maybeview at ./views.jl:123 [inlined]
- Fails on Julia 1.0.3 and 1.1 w/ DataFrames 0.16.0 -
- It seems to be tied to precompilation because if the function works once on the same data it seems to continue working for subsequent calls. Also, it never seems to error if the code is extracted from the function and pasted into the REPL.
- We always get the segfault on the second pass through our for-loop
- So far adding an
GC.gc()call prior to the failing
getindexoperation seems to fix the problem.
I’ll keep working on a MWE that I can share, but any recommendations would be greatly appreciated.