You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Max Bolingbroke (Jira)" <ji...@apache.org> on 2019/10/07 15:45:00 UTC
[jira] [Created] (ARROW-6806) Segfault deserializing ListArray
containing null
Max Bolingbroke created ARROW-6806:
--------------------------------------
Summary: Segfault deserializing ListArray containing null
Key: ARROW-6806
URL: https://issues.apache.org/jira/browse/ARROW-6806
Project: Apache Arrow
Issue Type: Bug
Components: C++
Affects Versions: 0.15.0
Reporter: Max Bolingbroke
The following code segfaults for me (Windows and Linux, pyarrow 0.13 and 0.15):
{code:java}
import pyarrow as pa
from io import BytesIO
x = b'\xdc\x00\x00\x00\x10\x00\x00\x00\x0c\x00\x0e\x00\x06\x00\r\x00\x08\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x03\x00\x10\x00\x00\x00\x00\x01\n\x00\x0c\x00\x00\x00\x08\x00\x04\x00\n\x00\x00\x00\x08\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x18\x00\x00\x00\x00\x00\x12\x00\x18\x00\x14\x00\x13\x00\x12\x00\x0c\x00\x00\x00\x08\x00\x04\x00\x12\x00\x00\x00\x14\x00\x00\x00\x14\x00\x00\x00`\x00\x00\x00\x00\x00\x0c\x01\\\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x18\x00\x00\x00\x00\x00\x12\x00\x18\x00\x14\x00\x00\x00\x13\x00\x0c\x00\x00\x00\x08\x00\x04\x00\x12\x00\x00\x00\x14\x00\x00\x00\x14\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x05\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xff\xff\xff\x06\x00\x00\x00$data$\x00\x00\x04\x00\x04\x00\x04\x00\x00\x00\x10\x00\x00\x00exchangeCodeList\x00\x00\x00\x00\xcc\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x16\x00\x0e\x00\x15\x00\x10\x00\x04\x00\x0c\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x10\x00\x00\x00\x00\x03\n\x00\x18\x00\x0c\x00\x08\x00\x04\x00\n\x00\x00\x00\x14\x00\x00\x00h\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
r = pa.RecordBatchStreamReader(BytesIO(x))
r.read_all()
{code}
I *think* what should happen instead is that I should get a Table with a single column named "exchangeCodeList", where the column is a ChunkedArray with a single chunk, where that chunk is a ListArray containing just a single element (a null). Failing that (i.e. if the bytestring is actually malformed), pyarrow should maybe throw an error instead of segfaulting?
I'm not 100% sure how the bytestring was generated: I think it comes from a Java-based server. I can deserialize the server response fine if all the records have at least one element in the "exchangeCodeList" column, but not if at least one of them is null. I've tried to reproduce the failure by generating the bytestring with pyarrow but can't trigger the segfault.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)