Comments (8)
@maoe What does ghc-events inc
show? Does it show a lot of 0: create thread 0
events?
from ghc-events.
Does it show a lot of 0: create thread 0 events?
No, not really.
Unfortunately I don't have time to debug this today. Please feel free to take a look if you're interested.
from ghc-events.
@Unselfish I looked into https://github.com/haskell/ThreadScope/files/4376429/log4.txt briefly and found that the header of the file seemed broken.
If you look at hexdump of log4.txt, the beginning of the file looks like this:
Offset: 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F
00000000: 6864 7262 6865 7462 6574 6200 0000 0004 hdrbhetbetb.....
00000010: 0000 000A 0D43 7265 6174 6520 7468 7265 .....Create.thre
00000020: 6164 0000 0000 6574 6500 6574 6200 0001 ad....ete.etb...
The first row (00000000) seems fine. The problem I think is the second row (00000010). The first 4 bytes of the row is a Word32 which represents the length of the next field, which is the string describing the event, "Create thread". The value is 0A
here, which is 10 in decimal. This doesn't match the length of Create thread
, which is 13! Actually if you truncate the 0A
from the second row with a binary editor, ghc-events successfully parses the whole eventlog header. It still fails to parse the following events though.
While I haven't looked at the other eventlogs yet, I suspect your GHC or something (storage layer or memory modules?) is not working correctly. Can you try different versions of GHC or run the same program on a different machine, and see if the issue persists?
from ghc-events.
I see this error on Linux when the eventlog'd program is run with a large environment (about 69 kb, but I suspect the magic number is 2^16 bytes).
from ghc-events.
@ttuegel What do you mean by a large environment?
from ghc-events.
@maoe A large process environment, the environment variables. The ProgramEnv
constructor of EventInfo
.
from ghc-events.
@ttuegel I see. You're right that a payload of an eventlog message is limited to 2^16 bytes. See postPayloadSize in the RTS. This feature was removed as of GHC 8.8.1 though.
And I suppose this issue is something different because as I explained earlier the eventlog (https://github.com/haskell/ThreadScope/files/4376429/log4.txt) has a broken event header (rather than a payload).
from ghc-events.
You can also run into this overflow if you have a command line longer than 2^16.
from ghc-events.
Related Issues (20)
- Testsuite write-merge failing HOT 14
- Update the maintainer field HOT 8
- v0.5 Hackage release? HOT 6
- Use EventLogFormat.h from upstream (GHC) HOT 17
- Support new field 'par_balanced_copied_bytes' of EVENT_GC_STATS_GHC HOT 2
- Bounded memory sorting HOT 7
- Can we get a release? HOT 3
- getEvent can't deserialize event serialized by putEvent HOT 7
- Event parsers and serializers should have roundtrip property HOT 1
- Package bounds need to be restricted for old releases HOT 5
- Add support for extra field in ThreadStopStatus.Status
- What is evCap HOT 5
- Add contributing guidelines (CONTRIBUTING.md) HOT 1
- test-versions: test/ticky-ticky.eventlog: openBinaryFile: does not exist (No such file or directory) HOT 1
- ProfSampleCostCentre in the eventlog file carries a CapNo instead of a Capset HOT 2
- ghc-events show should exit with an error by default if it fails to consume the complete eventlog. HOT 1
- Drop support for GHC < 8 HOT 1
- UserBinaryMessage containing non utf8 text leads to runtime error HOT 1
- Handling EventBlocks and roundtripping HOT 2
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 ghc-events.