Open ligurio opened 1 year ago
Patch prepared by Max fixes the problem:
diff --git a/tools/memprof/parse.lua b/tools/memprof/parse.lua
index d865267b..a932f290 100644
--- a/tools/memprof/parse.lua
+++ b/tools/memprof/parse.lua
@@ -179,9 +179,7 @@ local function parse_event(reader, events, symbols)
assert(parser, "Bad aevent "..aevent)
- parser.parse(reader, asource, events[parser.evname], events.heap, symbols)
-
- return true
+ return pcall(parser.parse, reader, asource, events[parser.evname], events.heap, symbols)
end
function M.parse(reader, symbols)
diff --git a/tools/utils/bufread.lua b/tools/utils/bufread.lua
index 34bae9a6..100f771d 100644
--- a/tools/utils/bufread.lua
+++ b/tools/utils/bufread.lua
@@ -62,7 +62,7 @@ end
function M.read_octet(reader)
if not _read_stream(reader, 1) then
- return nil
+ error('corrupted stream')
end
local oct = reader._buf[reader._pos]
Important: this is a fast and ugly fix, so it should be reconsidered thoroughly.
Bug description
During investigation of #9283 I've recorded memory profile and recording was stopped by crashed Tarantool. memprof cannot parse such profile.
Tarantool Enterprise 3.0.0-alpha3-35-g5d1e03a
Steps to reproduce
see orginal steps in https://github.com/tarantool/tarantool/issues/9283#issuecomment-1777022897
Actual behavior
memprof cannot parse profile
Expected behavior
memprof is able to parse profile