memray: Fail to run in macOS 19

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I would like to use memray, however it doesn’t work at all on my system.

# test_memray.py
import numpy as np 
x = np.zeros(100)

Running this file with the command python -m memray run test_memray.py yields an immediate seg. fault:

Writing profile results into memray-test_memray.py.44886.bin
zsh: segmentation fault  python -m memray run test_memray.py

Though a file does get written, no recording is done; the result of memray summary memray*.bin yields:

⠋ Calculating high watermark... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   Memray ERROR: Failed to process memory record
⠋ Processing allocation records... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--Memray ERROR: Failed to process memory record
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃                                                           ┃     <Total ┃      Total ┃            ┃ Own Memory ┃ Allocati… ┃
┃ Location                                                  ┃    Memory> ┃   Memory % ┃ Own Memory ┃          % ┃     Count ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━┩
└───────────────────────────────────────────────────────────┴────────────┴────────────┴────────────┴────────────┴───────────┘

I tried the previous versions of memray as well, at least back to 1.9.0, and none of the versions seem to work

Expected Behavior

Any of the demonstrated behavior in the documentation

Steps To Reproduce

  1. Make any python file
  2. Run memray run ... on the python file
  3. Observe the seg fault

Memray Version

1.12.0

Python Version

3.11

Operating System

macOS

Anything else?

======================================== System Information ======================================== System: Darwin Node Name: MacBook-Pro-8.local Release: 19.6.0 Version: Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT 2021; root:xnu-6153.141.43~1/RELEASE_X86_64 Machine: x86_64 Processor: i386

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (13 by maintainers)

Most upvoted comments

It works 😃, everything seems to be fine now, have run a couple benchmarks to be sure.

Closing this issue. Thank you for your expediency

Awesome! If you want to use your version I suggest that you recompile memray without the debug options so you don’t run a slow version

Leave the issue open for now as we still need to fix it on our side