You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SegFault with fill_null_forward() on Boolean ChunkedArray #45086
This always crashes on the 12th iteration, when the array has 4096 values, across multiple computers with the following error:
Process finished with exit code -1073741819 (0xC0000005)
I dug under the hood to see what Pandas was doing and was able to create this pure PyArrow example (though I'm not sure if I'm using the API correctly):
Additionally, I was able to reproduce it on a RHEL8 server in the current Docker python:3.12 image. On that same server, outside of the container, I was unable to reproduce the problem in the system Python 3.8 installation with PyArrow 14.0.1.
changed the title [-]Windows Access Violation with fill_null_forward() on ChunkedArray[/-][+]SegFault with fill_null_forward() on Boolean ChunkedArray[/+]on Jan 7, 2025
Activity
aiudirog commentedon Jan 7, 2025
While running some other benchmarks, I ended up reproducing the issue on my personal Linux PC with Python 3.13.1 and PyArrow 18.1:
System Info
OS: Arch Linux
Kernel: 6.12.8-zen1-1-zen
Python: 3.13.1
Installed Packages (venv):
Additionally, I was able to reproduce it on a RHEL8 server in the current Docker
python:3.12image. On that same server, outside of the container, I was unable to reproduce the problem in the system Python 3.8 installation with PyArrow 14.0.1.[-]Windows Access Violation with fill_null_forward() on ChunkedArray[/-][+]SegFault with fill_null_forward() on Boolean ChunkedArray[/+]aiudirog commentedon Jan 7, 2025
I found the bug! It appears allocations for new chunked arrays don't account for the
BooleanType.byte_width()returning 0:arrow/cpp/src/arrow/type.h
Lines 608 to 609 in 6a0414b
arrow/cpp/src/arrow/type.h
Lines 186 to 192 in 6a0414b
This results in the allocation of a chunk with 0 bytes in it, but with the length declared to that of the original chunk.
Example in
ForwardFillChunked.Exec():arrow/cpp/src/arrow/compute/kernels/vector_replace.cc
Lines 693 to 699 in 6a0414b
apacheGH-45086: [C++] Fix heap buffer overflow in FillNullForward/Bac…
GH-45086: [C++] Fix heap buffer overflow in FillNullForward/Backward … (
zanmato1984 commentedon Sep 1, 2026
Issue resolved by pull request 50843
#50843