Repository navigation
google cloud storage: NPE from BlobId.java:119 #709
Description
Activity
- addedapi: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.
on Feb 12, 2021 - addedtriage meI really want to be triaged.I really want to be triaged.
on Feb 13, 2021 - addedstatus: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.and removedtriage meI really want to be triaged.I really want to be triaged.
on Feb 16, 2021 Please let me know if there is any more information I can provide.
Thanks for your report.
From digging into the stack a bit it looks like the
StorageObjectproto is null here where the client is trying to construct the object for for the newly created Blob. This seems like a bug; it should not be something that can happen if the upload was successful and I would expect a different error if the upload failed (not NPE).@frankyn @BenWhitehead any ideas how this could have happened? I know there have been some recent updates to the upload logic.
We saw this for a second time yesterday. I have updated the stack trace slightly to reflect that this is coming from a ThreadPoolExecutor. We have found that we need to send content to GCS in parallel in order to get acceptable speeds. I'm not sure if that affects anything.
Hi @egh,
Did you have these issues with
1.113.3or is your usage relatively new?I think this is not a concurrency issue. It is most likely due an edge case that was not handled correctly in PR #604.
I'm writing a unit test to confirm, but I think the case is:- Retry is handled.
- The object is not saved in Case 4 or 7
Thanks for clarifying and for filing this issue, @egh. This is a relatively new change which tried to make the library more reliable but introduced a few issues.
One recommendation if you need to get unblocked now is to revert to the earlier version
1.113.4while we work out this issue.Reacted by Erik Hetzner- addedpriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.and removedstatus: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.
on Feb 17, 2021 - added a commit that references this issue
on Feb 26, 2021
Environment details
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
google-cloud-storage-1.113.9.jar
google-cloud-core-1.94.0.jar
google-cloud-core-http-1.94.0.jar
Steps to reproduce
Code example
Stack trace
This is an intermittent issue - I’ve only seen it once, as far as I know. I can’t see how the NPE could be coming from our code. I can’t seem to find any similar issue in the issues list or online.
Thanks for any help you can provide!