memray icon indicating copy to clipboard operation
memray copied to clipboard

Native C++ trace flamegraph error

Open xty438307820 opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

No response

Expected Behavior

No response

Steps To Reproduce

when I use --native to start my program, I get the bin, I try to use memray flamegraph to convert, I get

⚠ This capture file is large and may take a long time to process ⚠

Next time, consider using the --aggregate option to memray run to reduce the size of the file. Check https://bloomberg.github.io/memray/run.html#aggregated-capture-files for more information.

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/root/server_trunk_cn/lib/python3.11/site-packages/memray/main.py", line 6, in sys.exit(main()) ^^^^^^ File "/root/server_trunk_cn/lib/python3.11/site-packages/memray/commands/init.py", line 138, in main arg_values.entrypoint(arg_values, parser) File "/root/server_trunk_cn/lib/python3.11/site-packages/memray/commands/common.py", line 304, in run self.write_report( File "/root/server_trunk_cn/lib/python3.11/site-packages/memray/commands/common.py", line 203, in write_report reporter = self.reporter_factory( ^^^^^^^^^^^^^^^^^^^^^^ File "/root/server_trunk_cn/lib/python3.11/site-packages/memray/reporters/flamegraph.py", line 359, in from_snapshot return cls._from_any_snapshot( ^^^^^^^^^^^^^^^^^^^^^^^ File "/root/server_trunk_cn/lib/python3.11/site-packages/memray/reporters/flamegraph.py", line 288, in _from_any_snapshot tuple(record.hybrid_stack_trace()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/memray/_memray.pyx", line 351, in memray._memray.AllocationRecord.hybrid_stack_trace File "src/memray/_memray.pyx", line 260, in memray._memray.hybrid_stack_trace AssertionError

what the reason? thank you

Memray Version

1.14.0

Python Version

3.11

Operating System

Linux

Anything else?

No response

xty438307820 avatar Sep 25 '24 08:09 xty438307820

Unfortunately without the code that you are running and a description of how to make it run we cannot do much on our side as we cannot reproduce this.

could you please give us a minimal reproducer?

pablogsal avatar Sep 25 '24 16:09 pablogsal

Closing as without a reproducer we cannot investigate

pablogsal avatar Mar 08 '25 02:03 pablogsal