Comments (5)
Hello. I've seen similar issues in the past, particular in apps using Sidekiq on Ruby 3.0 because of a Ruby bug.
I assume one of the line may be corrupted.
You can get rid of these broken lines with heap-profiler clean path/to/file.json
. See f7da0ad
But I'd also love if you could share the broken lines, so I could see if it's another Ruby bug I could fix. You can use the same File.readlines { JSON.parse }
snippet to identify them.
from heap-profiler.
Hum, actually, re-reading the error, the issue isn't strictly a JSON syntax error, but that one of the values isn't of the expected type.
To identify it you may need to bisect the heap.
from heap-profiler.
Also was the heap dump generated with 3.2.1
? Or is that just your local ruby?
from heap-profiler.
@casperisfine thanks a lot. heap-profiler clean
fixed the problem! I've been using Ruby 3.2.1 both where the heap was created and locally. In general it also seems to be a valid JSON file and parsing it line by line seemed to work.
Here's also a diff before and after the clean step:
1494103d1494102
< 80, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}}
1494123d1494121
< {"address":"0x7f9d07934990", "type":"STRING", "shape_id":12, "slot_size":80, "class":"0x7f9d093aed98", "frozen":true, "embedded":true, "fstring":true, "bytesize":23, "value":"indeterminate_check_box", "encoding":"UTF-8"
from heap-profiler.
Hum, the first like is clearly only the half-end of a JSON object, I wonder what happened here.
The second line seem fine except that it's not terminated. I wonder if it might be a flushing issue of some sort.
from heap-profiler.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heap-profiler.