-
Notifications
You must be signed in to change notification settings - Fork 402
Failed to write output header #731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately I cannot reproduce this in my side. This is quite surprising and probably is pointing to the filesystem and not memray/src/memray/_memray/tracking_api.cpp Line 576 in 262ca2a
and we are doing this: memray/src/memray/_memray/record_writer.cpp Lines 353 to 366 in 262ca2a
Do you feel confident enough to compile memray yourself and use lldb to follow where under |
Wild guess: perhaps the filesystem has filled up, or you're out of disk quota... |
My disk has plenty available disk space so I don't think that is the issue.
I was able to compile memray but I have no clue how to do lldb. |
The error occurs in # Start LLDB with memray
lldb -- python3 -m memray run ....
# Set breakpoints (you can add more functions like writeHeaderCommon)
(lldb) b StreamingRecordWriter::writeHeader
# Run
(lldb) run
# When the first breakpoint hits, step through the code
(lldb) n
# If you reach writeHeaderCommon or other functions, step into it
(lldb) s The error is likely happening either in the If you find this to difficult and you can indeed compile memray, just add a lot of Let us know what you find! |
fwiw I'm also getting this on a Linux system (the Perlmutter supercomputer at NERSC), "SUSE Linux Enterprise Server 15 SP5". I'm running it inside a Shifter (docker-like) container. No quota issues (3 GB of quota available - I'm using 47/50 GB) Ahh: if I get it to write to /tmp/memray.out, it works. On the home filesystem, it fails like this:
|
My lldb attempt was not very successful - I guess I need to build it with debugging symbols or something...
But honestly, since it works writing to The filesystem is this weird thing that's maybe custom to NERSC: "/global/u1 on /dvs_rw/u1 type dvs" |
Ah, and what sort of filesystem is used for the home directory? That strongly suggests that it's some feature that we rely on that the filesystem doesn't support. It might be instructive to run: strace -o strace.out -s 1024 python -m memray run -fo output.bin -c pass and then just share the |
gdb maybe slightly more enlightening (I just git cloned the repo in the running directory, thus the complaints that the source file is newer than the binary... I just pip installed memray)
|
Good suggestion, @godlygeek -- here's strace.out |
Looking at the strace output, we can see the exact point of failure in memray's execution: first, a call to |
Makes sense. It's always nice if error messages can include detail on why a thing failed, rather than just reporting the failure. Thanks for the debugging help. |
Yeah I agree. We should at least invest into more logging arround errors in genneral 👍 Will open a new issue |
Strange. This works for me as well. It appears as if I need more admin privileges to run lldb which I should get hopefully later today. |
Don’t worry check the previous discussion about what the problem is |
I've opened #748 to have Memray support falling back to a slower but more portable path that should work on non-POSIX filesystems like the ones you're each working on. In the meantime, it seems like writing your capture files to |
Is there an existing issue for this?
Current Behavior
I have a file
hello.py
that just containsprint("hello world")
. I get the following errorThis occurs with any python file I attempt.
Expected Behavior
I expected it to run and create a binary file.
Steps To Reproduce
hello.py
that just containsprint("hello world")
.Memray Version
1.16.0
Python Version
3.12, 3.13
Operating System
macOS
Anything else?
This is on MacOS 12.6.2 on a Intel i7-6700K CPU.
The text was updated successfully, but these errors were encountered: