-
Notifications
You must be signed in to change notification settings - Fork 317
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
fix: json out of bounds in batchrouter #2465
Conversation
Codecov ReportBase: 41.44% // Head: 36.11% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2465 +/- ##
==========================================
- Coverage 41.44% 36.11% -5.33%
==========================================
Files 175 200 +25
Lines 36288 39662 +3374
==========================================
- Hits 15039 14324 -715
- Misses 20313 24435 +4122
+ Partials 936 903 -33
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
638e52e
to
6b8d5f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK as a temporary solution, I'll try to understand the root cause and see if we can remove the copy
.
Co-authored-by: Francesco Casula <[email protected]>
2250548
to
4665a90
Compare
Description
We started to observe panics in the following line after we migrated to jsoniter library
err = json.Unmarshal(job.Parameters, ¶meters)
I reproduced the panic by modifying the slice capacity whilst parsing it. Unfortunately, that was not enough to prove or to help find the root cause of the problem.
As a mitigation step and to increase observability, I have introduced a wrapper, that in case of panic, prints useful information and fallbacks to the standard JSON library
Notion Ticket
https://www.notion.so/rudderstacks/Batch-router-unmarshaling-slice-bounds-out-of-range-8294d65d8f014c13904980d2c6c34713
Security