Azure-Samples / MipSDK-File-Java-Basic

MIP File SDK Java Wrapper Sample Application
MIT License
3 stars 8 forks source link

Error message [ Exception in thread "Thread-12985214" java.lang.NullPointerException: null upcall object in mipns::Stream::Read ] #12

Open SEOJUNGJIN opened 2 years ago

SEOJUNGJIN commented 2 years ago

When we stress testing the MIP SDK instance (MIP SDK File Sample Source) created as a singleton in the Java Spring environment, the error occurs.

We used MIP SDK is "mip_sdk_java_ubuntu1804_1.12.61_preview.tar.gz", and when an error occurs during the stress testing, the STDOUT contents are as follows. ( https://www.microsoft.com/en-us/download/details.aspx?id=104267 )

Exception in thread "Thread-9336141" java.lang.NullPointerException: null upcall object in mipns::FileHandler::Observer::OnCommitSuccess Exception in thread "Thread-12966921" java.lang.NullPointerException: null upcall object in mipns::FileHandler::Observer::OnCommitSuccess Exception in thread "Thread-12970196" java.lang.NullPointerException: null upcall object in mipns::FileHandler::Observer::OnCommitSuccess Exception in thread "Thread-12971973" java.lang.NullPointerException: null upcall object in mipns::FileHandler::Observer::OnCommitSuccess Exception in thread "Thread-12975081" java.lang.NullPointerException: null upcall object in mipns::FileHandler::Observer::OnCommitSuccess Exception in thread "Thread-12985049" java.lang.NullPointerException: null upcall object in mipns::FileHandler::Observer::OnCommitSuccess Exception in thread "Thread-12985207" java.lang.NullPointerException: null upcall object in mipns::Stream::Seek Exception in thread "Thread-12985214" java.lang.NullPointerException: null upcall object in mipns::Stream::Read Exception in thread "Thread-12985218" java.lang.NullPointerException: null upcall object in mipns::Stream::Read Exception in thread "Thread-12985220" java.lang.NullPointerException: null upcall object in mipns::Stream::Read Exception in thread "Thread-12985221" java.lang.NullPointerException: null upcall object in mipns::Stream::Read Exception in thread "Thread-12985222" java.lang.NullPointerException: null upcall object in mipns::Stream::Read Exception in thread "Thread-12985224" java.lang.NullPointerException: null upcall object in mipns::Stream::Read ... ( Infinite loop output ) ... Exception in thread "Thread-12999999" java.lang.NullPointerException: null upcall object in mipns::Stream::Read

Doing a "MIP File::Delete Label" stress test with that MIP SDK for about 5 minutes may copy the error.

This error slows down the process and eventually crashes the process due to stack overflow.

We have already registered with Microsoft Case ( Case No: 32221263 ) and hope that the issue will be resolved as soon as possible.

Thanks!

nkc commented 4 weeks ago

We faced a similar issue in a stress test. As per our analysis, this happens after java heap error is thrown. Once the heap is completely consumed, the SDK shows this endless loop kind of behaviour. In our case the cause of java heap filling up was the byte[] objects which were being held up by NativeStream class.

The SDK wont let them get GC'ed untill you call below method for all the files for whose labelling is completed.

fileHandler.notifyCommitSuccessful(filePath);