Skip to content
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

JSON decoding issues starting with version 1.5.5 (Java::JavaLang::ArrayIndexOutOfBoundsException) #4316

Closed
breml opened this issue Dec 8, 2015 · 10 comments

Comments

@breml
Copy link
Contributor

breml commented Dec 8, 2015

We suffered from ArrayIndexOutOfBounds exceptions while decoding JSON with logstash, starting from version 1.5.5.

My colleague described the problem in: https://discuss.elastic.co/t/json-en-decoding-issues-starting-with-version-1-5-5/36543

Now we could tackle down this issue. The problem is related to FasterXML/jackson-core#216, which got fixed with jackson-* version 2.6.2.

I filed an issue in jrjackson to update the dependecies: guyboertje/jrjackson#48

Solution for logstash:

As soon as jrjackson is updated, logstash should update to the latest version of jrjackson to fix this issue.

Steps to reproduce:

  1. logstash config:
input {
  file {
    codec => json
    path => "/tmp/json-parse-problem.input"
  }
}
output {
  stdout {}
}
  1. start logstash with the above config
  2. provide some input
for i in `seq 1 120`; do echo '{"message":"'${i}'", "test'${i}'":0}'; done >> /tmp/json-parse-problem.input

The first message to throw an exception is number 114.

@jordansissel
Copy link
Contributor

@guyboertje thoughts?

@guyboertje
Copy link
Contributor

I will be creating a new version of JrJackson today to fix the Jackson bug.

@guyboertje
Copy link
Contributor

@breml - released JrJackson today. v 0.3.8 in rubygems. Are you able to do a plugin update --no-verify and get the new JrJackson version?

@breml
Copy link
Contributor Author

breml commented Dec 10, 2015

@guyboertje I will check tomorrow

@breml
Copy link
Contributor Author

breml commented Dec 11, 2015

@guyboertje we have checked with version 0.3.8 of jrjackson, and it is working fine now.

@guyboertje
Copy link
Contributor

@breml - thank you for that.

@breml
Copy link
Contributor Author

breml commented Dec 18, 2015

Upstream is fixed. Dependency in Logstash should be updated.

@suyograo
Copy link
Contributor

This will be fixed in 2.1.2 and v2.2. We don't intend to release any more patch fixes on top of 1.5 unless its a security issue.

@suyograo
Copy link
Contributor

@breml any reason you could not update to 2.x?

@breml
Copy link
Contributor Author

breml commented Dec 21, 2015

Fix in v2.1.2 is fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants