You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Max Bolingbroke (Jira)" <ji...@apache.org> on 2019/10/07 16:00:00 UTC
[jira] [Comment Edited] (ARROW-6806) Segfault deserializing
ListArray containing null/empty list
[ https://issues.apache.org/jira/browse/ARROW-6806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16945986#comment-16945986 ]
Max Bolingbroke edited comment on ARROW-6806 at 10/7/19 3:59 PM:
-----------------------------------------------------------------
This is actually a regression: I thought it failed in 0.13 but I just retested and the bytestring deserializes OK in v0.13.0, in just the way I expected:
{code:java}
>>> t.columns[0].chunks[0]
<pyarrow.lib.ListArray object at 0x000000F203AFBB88>
[
[]
]{code}
was (Author: batterseapower):
This is actually a regression: I thought it failed in 0.13 but I just retested and the bytestring deserializes OK, in just the way I expected:
{code:java}
>>> t.columns[0].chunks[0]
<pyarrow.lib.ListArray object at 0x000000F203AFBB88>
[
[]
]{code}
> Segfault deserializing ListArray containing null/empty list
> -----------------------------------------------------------
>
> 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
> Priority: Major
>
> The following code segfaults for me (Windows and Linux, pyarrow 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)