You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Java] while using s3 FileSystemDatasetFactory getting this exception #36069
Describe the bug, including details regarding any error messages, version, and platform.
/Users/voltrondata/github-actions-runner/_work/crossbow/crossbow/arrow/cpp/src/arrow/filesystem/s3fs.cc:2598: arrow::fs::FinalizeS3 was not called even though S3 was initialized. This could lead to a segmentation fault at exit
i think the java client is not closing the s3 client gracefully because of that memory leak happening
changed the title [-]while using s3 FileSystemDatasetFactory getting this exception[/-][+][Java] while using s3 FileSystemDatasetFactory getting this exception[/+]on Jun 14, 2023
CC @davisusanibar@lidavidm (note that this warning was newly added to the S3 filesystem in the previous release so it is very possible the Java implementation has never been calling finalize)
CC @davisusanibar@lidavidm (note that this warning was newly added to the S3 filesystem in the previous release so it is very possible the Java implementation has never been calling finalize)
RowCount: 2979
/Users/runner/work/crossbow/crossbow/arrow/cpp/src/arrow/filesystem/s3fs.cc:2598: arrow::fs::FinalizeS3 was not called even though S3 was initialized. This could lead to a segmentation fault at exit
while running s3 file reader using java after for sometime the machine is crash looping due to this AWS Error NETWORK_CONNECTION during HeadObject operation: curlCode: 43, A libcurl function was given a bad argument
this generally happens when aws s3 connection pool are not closed AFAIK
I guess the problem in introduced in #33858 . The description contains:
BREAKING CHANGE: S3 can only be initialized and finalized once.
BREAKING CHANGE: S3 (the AWS SDK) will not be finalized until after all CPU & I/O threads are finished.
A helpful way is calling FinalizeS3 when exit. This patch is in arrow-12.0
However, I guess this patch might fixed it: #36442 . Maybe you can confirm it latter?
Java's dataset API uses JNI. It means that Java's dataset API calls C++ implementation directly. (It doesn't use Python.)
We need to implement a Java binding for arrow::fs::FinalizeS3() and users need to call it explicitly.
Or we may be able to do it implicitly if Java provides an atexit() like hook.
Activity
[-]while using s3 FileSystemDatasetFactory getting this exception[/-][+][Java] while using s3 FileSystemDatasetFactory getting this exception[/+]westonpace commentedon Jun 14, 2023
CC @davisusanibar @lidavidm (note that this warning was newly added to the S3 filesystem in the previous release so it is very possible the Java implementation has never been calling finalize)
davisusanibar commentedon Jun 14, 2023
Just able to reproduce this warning with:
Output messages:
Next step:
febinsathar commentedon Jun 15, 2023
while running s3 file reader using java after for sometime the machine is crash looping due to this AWS Error NETWORK_CONNECTION during HeadObject operation: curlCode: 43, A libcurl function was given a bad argument
this generally happens when aws s3 connection pool are not closed AFAIK
febinct commentedon Jul 21, 2023
this is in java not python
mapleFU commentedon Jul 23, 2023
I guess the problem in introduced in #33858 . The description contains:
A helpful way is calling
FinalizeS3when exit. This patch is in arrow-12.0However, I guess this patch might fixed it: #36442 . Maybe you can confirm it latter?
kou commentedon Jul 24, 2023
AFAIK, there is no pyarrow package for Java.
Java's dataset API uses JNI. It means that Java's dataset API calls C++ implementation directly. (It doesn't use Python.)
We need to implement a Java binding for
arrow::fs::FinalizeS3()and users need to call it explicitly.Or we may be able to do it implicitly if Java provides an
atexit()like hook.lidavidm commentedon Jul 24, 2023
Java has Runtime#addShutdownHook
lidavidm commentedon Jul 24, 2023
@davisusanibar @danepitkin any interest in this?
danepitkin commentedon Jul 24, 2023
Yes! We can take this on. Thanks for the ping.
apacheGH-36069: [Java] Ensure S3 is finalized on shutdown
GH-36069: [Java] Ensure S3 is finalized on shutdown (#36934)
apacheGH-36069: [Java] Ensure S3 is finalized on shutdown (apache#36934)
apacheGH-36069: [Java] Ensure S3 is finalized on shutdown (apache#36934)