apache / apache/arrow-java

[Java] MacOS SIGABRT in ORC JNI adapter when destructing multiple ORC readers

Open
#60 5 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

### Describe the bug, including details regarding any error messages, version, and platform.

I was playing around with the Arrow Java ORC adapter and noticed an intermittent SIGABRT when `.clear()`ing ORC file/stripe readers.

On MacOS M1 (aarch64), I can reproduce locally with this diff: https://github.com/apache/arrow/pull/43699. However, this diff does not fail in CI, which is configured to run only on Linux. The test iteratively creates a new ORC file, reads a stripe, then deletes it. The test is repeated 100 times. The SIGABRT is intermittent and typically crashes on a random test iteration.

My assumption is that there is a memory management issue in the Arrow ORC JNI / Arrow ORC / Apache ORC C++ layers that manifests when destructing the ORC C++ objects.

### Component(s)

Java

Contributor guide

Open the contributing guide

Research direction

Start with the reproducer diff in apache/arrow#43699 and run its repeated ORC file/stripe reader test on macOS M1. Trace the Java ORC JNI, Arrow ORC, and Apache ORC C++ destruction paths; done means the 100-iteration test no longer intermittently raises SIGABRT.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, java
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.