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

Socket-child can be left orphaned on parent crash #40

Closed
Julusian opened this issue Dec 3, 2018 · 2 comments
Closed

Socket-child can be left orphaned on parent crash #40

Julusian opened this issue Dec 3, 2018 · 2 comments

Comments

@Julusian
Copy link
Member

Julusian commented Dec 3, 2018

  • I'm submitting a ...
    [*] bug report

  • Summary
    I appear to have had another possible occurrence of Socket-child can be left orphaned on parent crash #30. I noticed my cpu fan running pretty high and turns out I have 2 atem-connections still open and maxing out a core each.

  • Other information
    Running v0.8.0
    I had playout-gateway crash a couple of times on me earlier on today, this could have been caused by that, but the stack trace is unrelated

I found I could attach a debugger to the process (https://hackernoon.com/debugging-node-without-restarting-processes-bd5d5c98f200), and the console is being flooded with:

warning.js:18 (node:8448) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'emit' of undefined
    at log (/home/julus/Projects/tv-automation-playout-gateway/node_modules/atem-connection/dist/lib/atemSocketChild.js:80:14)
    at Object.onFailedAttempt (/home/julus/Projects/tv-automation-playout-gateway/node_modules/atem-connection/dist/lib/atemUtil.js:74:21)
    at Promise.resolve.then.then.error (/home/julus/Projects/tv-automation-playout-gateway/node_modules/p-retry/index.js:44:14)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

warning.js:18 (node:8448) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 30132)

And a cpu profile: CPU-20181203T211452.zip
I cant think of anything else I can look at to get more info

@Abrahamic-God
Copy link
Contributor

I feel pretty silly about not putting uncaughtException and unhandledRejection handlers on the child process. It should absolutely abort and exit with an error code when either of those happen.

@Julusian
Copy link
Member Author

Julusian commented Jun 6, 2019

I havent seen this in a while, so I assume those fixes worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants