apache / apache/arrow-julia

Bus errors when writing `DataFrame`

Open
#474 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
312
Forks
78
PR merge metrics
No merged PRs in 30d

Description

I intermittently get bus errors with crash to terminal when writing `DataFrame`s to `.arrow`:
```
julia> Arrow.write("df.arrow", df)
[8796] signal (7.2): Bus error
in expression starting at REPL[243]:1
getindex at ./essentials.jl:13 [inlined]
getindex at ~/.julia/packages/Arrow/R2Rvz/src/arraytypes/primitive.jl:48 [inlined]
getindex at ~/.julia/packages/ArrowTypes/Nb4EC/src/ArrowTypes.jl:412 [inlined]
iterate at ./abstractarray.jl:1220 [inlined]
iterate at ./abstractarray.jl:1218 [inlined]
writearray at ~/.julia/packages/Arrow/R2Rvz/src/utils.jl:49
writebuffer at ~/.julia/packages/Arrow/R2Rvz/src/arraytypes/primitive.jl:102
unknown function (ip: 0x7ff9d489d0d0)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
write at ~/.julia/packages/Arrow/R2Rvz/src/write.jl:363
macro expansion at ~/.julia/packages/Arrow/R2Rvz/src/write.jl:151 [inlined]
#124 at ./threadingconstructs.jl:373
unknown function (ip: 0x7ff9d487aa9f)
_jl_invoke at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined]
ijl_apply_generic at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gf.c:2940
jl_apply at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/julia.h:1879 [inlined]
start_task at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/task.c:1092
Allocations: 16091661486 (Pool: 15611643534; Big: 480017952); GC: 116806
Bus error (core dumped)
```
This was with Julia 1.9.1 and Arrow.jl v2.6.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Julia 1.9.1 case with Arrow.write("df.arrow", df), then inspect the stack entries in src/arraytypes/primitive.jl and src/write.jl, especially getindex, writearray, and writebuffer. Done means the intermittent bus error is prevented and a regression test covers writing DataFrames to .arrow.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.