-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
memory leak, possibly in crystals #27083
Comments
comment:1
Actually, I think this is to be expected with
|
comment:2
How is this a memory leak? Why is this a bug? |
comment:3
Replying to @jdemeyer:
It is a little suspicious because the Testing creating and deleting these objects in a loop and then checking if any pile up on the heap using But I think the report had some merit to it in that it pointed out suspicious behaviour that warrants a little further investigation (which found nothing). |
This comment has been minimized.
This comment has been minimized.
comment:4
Martin, it is not because of
Although in this example, it is not a I am also wondering if this is related to #18426. |
comment:5
I do not seem to be able to actually free the memory in the loop mentioned. Nils, can you remind me the code of how to check with |
comment:6
I flopped the direction of the loop to illustrate the problem more. Maybe the |
This comment has been minimized.
This comment has been minimized.
comment:7
Replying to @tscrim:
I only thought so because you can reproduce it also with other
|
comment:8
Replying to @tscrim:
There's a pretty clean example on the ticket #18426 you referenced above and which you reported. That's where I copied the code from when I tried. I actually made a mistake. There does seem to be some leakage, but it seems capped, oddly enough; like there's an LRU cache in place or so.
For me on 8.6, this finds 128 objects. And that number remains constant if I increase the bound 600 above. |
comment:9
Replying to @nbruin:
facepalm
Running this variant
results in
So I agree, there seems to be some sort of LRU cache going on, but no real memory leak. Actually, I have vague recollection of some sort of discussion about doing an LRU cache on sage-devel at some point, but I don't remember the outcome or details. |
comment:10
Replacing Perhaps the thread https://groups.google.com/forum/#!searchin/sage-devel/lru/sage-devel/q5uy_lI11jg/kRWKxvCImwEJ from long ago is relevant? |
comment:11
Oh boy. It would seem that #24954 is responsible for this: indeed it mentions a "128". So yes, there is no memory leak in the code, but after #24954 any test will indeed perceive a leak of something like 128 elements. In fact, with This was exactly why I wasn't happy with #24954. It makes finding memory error that much harder. On the plus side: as this example shows, it does drive home the global nature of |
comment:12
See #24954 indeed. |
comment:13
Let us close this if nobody objects. |
Reviewer: Samuel Lelièvre |
As noticed in #27057:
CC: @tscrim @slel
Component: memleak
Reviewer: Samuel Lelièvre
Issue created by migration from https://trac.sagemath.org/ticket/27083
The text was updated successfully, but these errors were encountered: