lidavidm commented on PR #13465: URL: https://github.com/apache/arrow/pull/13465#issuecomment-1171338313
Hmm, there's a possible minor bug between PyArrow/C++/Java: Python can keep a reference to the reader until interpreter shutdown (at which point the JVM has been shut down), and then collects the reader. This frees the `shared_ptr<RecordBatchReader>`; the implementation is `ArrayStreamBatchReader` whose destructor unconditionally calls ArrowArrayStreamRelease. (It doesn't implement Close() since this was just added). This calls into the JNI code, which tries to attach the JVM, fails, throws an uncaught exception, and dies. Changes needed: - Implement Close() properly so we can explicitly free - Don't unconditionally call ArrowArrayStreamRelease - In the JNI side, fail gracefully if we can't attach the JVM (warn instead of abort?) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org