Skip to content
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

src: do not leak NodeTraceStateObserver #25180

Closed

Conversation

@addaleax
Copy link
Member

commented Dec 22, 2018

This would otherwise be reported as a memory leak by automated tools.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.
@joyeecheung

This comment has been minimized.

Copy link
Member

commented Dec 22, 2018

The crashes look relevant?

assert.js:86
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ 'SIGILL'
- null
    at ChildProcess.CheckNoSignalAndErrorCodeOne (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/parallel/test-tracing-no-crash.js:7:10)
    at ChildProcess.<anonymous> (/data/iojs/build/workspace/node-test-commit-linuxone/nodes/rhel72-s390x/test/common/index.js:373:15)
    at ChildProcess.emit (events.js:188:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
@@ -235,6 +237,7 @@ static struct {
// Destroy tracing after the platform (and platform threads) have been
// stopped.
tracing_agent_.reset(nullptr);
trace_state_observer_.reset(nullptr);

This comment has been minimized.

Copy link
@joyeecheung

joyeecheung Dec 22, 2018

Member

Should we call controller->RemoveTraceStateObserver(trace_state_observer_.get()) here? (It's currently run in OnTraceEnabled but it may not be ever enabled?)

This comment has been minimized.

Copy link
@addaleax

addaleax Dec 22, 2018

Author Member

I’m not sure, but does the controller still exist at this point?

@addaleax

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2018

@joyeecheung Thanks for pointing out the failures – afaict it was a double free for the cases where the tracing observer was enabled and cleaned up after itself. It might be nice to keep that behaviour, but I don’t think it’s important…

@addaleax

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2018

@addaleax

This comment has been minimized.

Copy link
Member Author

commented Dec 26, 2018

Landed in b4145b8

@addaleax addaleax closed this Dec 26, 2018

@addaleax addaleax deleted the addaleax:platform-trace-observer-memleak branch Dec 26, 2018

addaleax added a commit that referenced this pull request Dec 26, 2018
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: #25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos added a commit that referenced this pull request Jan 1, 2019
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: #25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: nodejs#25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Apr 17, 2019
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: #25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BethGriggs added a commit that referenced this pull request Apr 28, 2019
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: #25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
BethGriggs added a commit that referenced this pull request May 10, 2019
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: #25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
MylesBorins added a commit that referenced this pull request May 16, 2019
src: do not leak NodeTraceStateObserver
This would otherwise be reported as a memory leak by automated tools.

PR-URL: #25180
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.