Skip to content

Exception while reading a trace #18

@dwwoelfel

Description

@dwwoelfel

When I trace my program for a few minutes, Memtrace loses the ability to read back the file without an exception.

Given a trace, the following code will throw an exception:

let trace =
  Memtrace.Trace.Reader.open_
    ~filename:"trace.ctf"
Memtrace.Trace.Reader.iter trace (fun _ _  -> ())
Uncaught exception:
  
  "Assert_failure src/location_codec.ml:27:17"

Raised at Memtrace__Location_codec.Mtf_table.swap in file "src/location_codec.ml", line 27, characters 17-29
Called from Memtrace__Location_codec.Mtf_table.decode in file "src/location_codec.ml", line 59, characters 6-16
Called from Memtrace__Location_codec.Reader.get_location.(fun) in file "src/location_codec.ml", line 177, characters 8-143
Called from Stdlib__list.init_aux in file "list.ml", line 69, characters 12-15
Called from Memtrace__Location_codec.Reader.get_location in file "src/location_codec.ml", line 150, characters 15-1534
Called from Memtrace__Trace.iter.iter_events_of_packet in file "src/trace.ml", line 693, characters 24-71
Called from Memtrace__Trace.iter.iter_packets in file "src/trace.ml", line 737, characters 8-50
Called from Onegraph in file "src/onegraph.re", line 31, characters 0-127

I'd be happy to provide my trace file if there is a janestreet dev that wants to look into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    forwarded-to-js-devsThis report has been forwarded to Jane Street's internal review system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions