apache / apache/arrow

[C++] An unstable crash may appears when reading table from a json file.

Open
#20,253 5 comments 0 reactions 0 assignees View on GitHub
Component: C++ Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

An unstable crash may appears when reading table from a json file.

arrow and parquet are installed by apt-get.

```Java

g++ test_arrow_json.cpp -o test_arrow_json -larrow -lparquet && ./test_arrow_json

/build/apache-arrow-8.0.0/cpp/src/arrow/result.cc:28: ValueOrDie called on an error: NotImplemented: JSON conversion to struct>, light_bboxes: list>, countdown: timestamp[s]> is not supported
/usr/lib/x86_64-linux-gnu/libarrow.so.800(+0x39e131)[0x7f07b843e131]
/usr/lib/x86_64-linux-gnu/libarrow.so.800(_ZN5arrow4util8ArrowLogD1Ev+0xdd)[0x7f07b878e83d]
/usr/lib/x86_64-linux-gnu/libarrow.so.800(_ZN5arrow8internal17InvalidValueOrDieERKNS_6StatusE+0x17d)[0x7f07b8626e8d]
./test_arrow_json(+0x1b9b)[0x5613e4b53b9b]
./test_arrow_json(+0x12f2)[0x5613e4b532f2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f07b772fc87]
./test_arrow_json(+0xfba)[0x5613e4b52fba]
Aborted (core dumped)
```

**Reporter**: [Jack Tondon](https://issues.apache.org/jira/browse/ARROW-16615)
#### Original Issue Attachments:
- [test_arrow_json.cpp](https://issues.apache.org/jira/secure/attachment/13043929/test_arrow_json.cpp)
- [test.json](https://issues.apache.org/jira/secure/attachment/13043928/test.json)

**Note**: *This issue was originally created as [ARROW-16615](https://issues.apache.org/jira/browse/ARROW-16615). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with the attached test_arrow_json.cpp and test.json, then run the reported g++ command against the installed Arrow and Parquet libraries to reproduce the abort. Trace the JSON-to-struct conversion reported as unsupported and determine the expected handling for the supplied table. Done means the input no longer causes an unhandled crash, with regression coverage for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.