-
-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE at BytesToNameCanonicalizer #145
Comments
Can you easily see if this was already in 2.4.0? I would guess it'd be regression from 2.3.3 to 2.4.0 (since there is fair bit of under-the-hood refactoring there); 2.4.0 -> 2.4.1 should have fewer diffs. |
@cowtowncoder yea, it happens also in 2.4.0 .... |
@kimchy thanks. Unfortunate as it is, at least it makes sense. Code itself does suggest a race condition of some kind... I hope it is not, since single-threaded probs much easier to unit test. |
@cowtowncoder aye, smells like a race condition..., can't seem to repro it on my end still.... |
Hmmh. Actually... code looks bit funky. It'd seem like null check should be needed there, and how 2.3 had it. |
Nope. Code in that particular spot not changed. |
Looking at diffs, I think the problem is probably in new If so, this could still be reproducible with single-thread, but require heavy production of distinct names to trigger the problem. |
@cowtowncoder I see..., interesting..., in any case, if you think of a fix without being to easily repro it in a test, I can easily recreate this in a benchmark type code we have consistently, so I can try it out. |
@kimchy Ok. Ideally it'd be reproducible on demand, but since I will try not to touch this code in foreseeable future (once fixed), I am ok with "manual" verification here. :) |
Ok, I think I may know what is going on here:
and if so, fix is to add null check in code. I'll try that later on tonight (need to be going now, but will get back to it). |
@kimchy I was able to reproduce it locally, with bit of tweaking, although wasn't able to make automated test. However fix worked as expected, and problem does not seem to affect |
@cowtowncoder this is perfect, works, thank you!. Apologies in advance for the question, but do you have a rough estimate for a 2.4.2 release? |
@kimchy This is actually the first fix since 2.4.1, but given its critical nature it should get out quickly. One short-term possibility would be to do a micro-release 2.4.1.1, until full 2.4.2 push. This to both give bit more time to address other issues found from 2.4.1, and to plug the immediate problem. It'd require additional entry for Would this make sense? If so, I can push 2.4.1.1 right away. |
@cowtowncoder I think 2.4.1.1 release will confuse users, it would be the first release that has another .v number..., so my vote is just to wait for 2.4.2, and if a few more weeks are needed, then its worth it compared to the confusing that will happen... . |
Users need not use 2.4.1.1, and in fact it'd be only for experienced users, or those with specific problems. But I won't bother with 2.4.1.1 unless someone wants it; I think 2.4.2 will need to be released before end of July anyway. And the option of micro-patch is always available for critical patches, just wanted to mention that in case it made sense for particular issue. |
@cowtowncoder make sense, we want to release 1.3 ES in a couple of weeks, if we can get 2.4.2 into this release, it would be awesome. |
@cowtowncoder thinking about it, if you are up for 2.4.1.1, it would be great, as it will give jackson more time to bake in our (randomized) testing infra, and potentially flush other things |
@kimchy Ok. I'll do 2.4.1.1, more for testing / fallback-option purposes, since doing that is trivially easy. |
2.4.1.1 now pushed, should trickle to Maven central within an hour or two. I also updated 2.4.2 release page: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.4.2 and noticed that there was actually already one earlier critical fix; for which there is |
@cowtowncoder thank you! |
@kimchy thank you for reporting this. Also: once issue is dealt with, I am curious if performance difference between 2.3 and 2.4 is measurable. There are some minor improvements that show improvements in some of the tests, but it is hard to know for sure. |
FYI, I know this is a crazy use case, but I had to disable JsonFactory.Feature.FAIL_ON_SYMBOL_HASH_OVERFLOW since it was tripping. 2.4.1.1 fixes the problem, thanks! |
@cowtowncoder missed your perf question, it does seem that for large documents, there is performance improvements, though nothing scientific yet, will properly test |
@kimchy I'd also be interested in overflow case -- I was bit hesitant wrt this; I know there are exploits out there so there should be some limit (plus performance will go down the drain way before). But at the same time it is theoretically possible to reach limits... and sounds like in practice as well. So it is also possible that default max overflow limit should be increased, if modest increase would help solve use cases. If not, then feature works. |
Heya, updated to 2.4.1, and started to get the following exception:
This seems to happen with very large documents, with many different field names. I tried loading the document and recreating the failure, but it doesn't seem to fail... . I suspect maybe this is caused by many different threads parsing at the same time? I do not know.
For reference, here is a sample document that it fails on: https://dl.dropboxusercontent.com/u/2136051/jackson_npe.txt.
The text was updated successfully, but these errors were encountered: