Closed jaideep329 closed 1 month ago
This is not a bug. In non-native mode, memray
only tracks Python stack frames so if the allocation happens in a thread that doesn't have any Python code above it it will not be resolved and will be shown as ???
. When you pass --native
then memray activates machinery that allows it to resolve the native location for that and therefore it doesn't show ???
anymore.
If you want to do this with memray attach
you can do memray attach --native
.
If you think there is still something here and you want us to investigate further, you need to provide a self-contained reproducer
Is there an existing issue for this?
Current Behavior
Im trying to debug memory leak for a Django application which uses gunicorn. The process runs inside docker container. When i run
memray attach <pid>
, i do not see any memory allocations, just one entry with???
:When i add
-- native
to the command, then i am able to see the allocations but not without it:Expected Behavior
Im able to see memory allocations properly in live mode using
memray attach <pid>
on my mac(running using gunicorn as well) which look something like:I was expecting a similar view for my production environment.
Steps To Reproduce
I'm running the gunicorn processes inside a docker container running with base python image from AWS(public.ecr.aws/ews-network/python:3.9.20230614). When i run
memray attach <pid>
on any gunicorn worker process i see no memory allocations being made, i just see a single entry with???
.Memray Version
1.13.4
Python Version
3.9
Operating System
Linux
Anything else?
No response