Overview
| Artifact ID: | 1b8f6ad7cd8377a4596d99a977ffcc867322c865 |
|---|---|
| Ticket: | 9969cf8ca6fa749fa0952186957fd3ac110be5b3
memleak in execute-10.3 |
| User & Date: | dgp on 2014-07-17 03:41:34 |
Changes
- icomment:
Oh boy. Test execute-10.3 came in to test that a crashing scenario in Ticket 3072640 stopped crashing. The leak here appears to be exposing that although things are not crashing, they don't seem to be working properly either. The issue appears to be how to handle execution leave traces for the [yield] command or for other commands like [for] or [while] that can end up yielding due to [yield] in their bodies. When these commands yield, in some sense they are blocking, they are still in progress, and we may sometime later return to them and let them complete and leave at that time. So their leave traces do not fire *yet*. Execution trace implementation creates things for enter traces and destroys them after leave traces. That's why we see a leak. Those commands that never leave, never clean up their execution trace housekeeping. What's strange is that after the [yield], the execution trace appears to still be in effect, now tracing a whole other body of code. In the test execute-8.3, a bit of debug printing will reveal that the command ::t {trace remove execution ::generate enterstep ::t} enterstep is invoked, even though I would not normally think of the [trace remove] being part of [::generate]. The other thing that appears missing is that I would think that when it becomes clear the coro will never be resumed (with [rename coro {}], then we ought to be cleaning up the abandoned trace housekeeping, and that's not happening (thus the leak)). My head hurts. - login: "dgp"
- mimetype: "text/plain"