Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

node 0.10.30 interaction with pm2-interface hangs. OK with node 0.10.29 #8154

Closed
rragan opened this issue Aug 13, 2014 · 6 comments
Closed

Comments

@rragan
Copy link

rragan commented Aug 13, 2014

This is a reduced case from a larger piece of code that hangs with 100% cpu usage by node when pm2 is not installed. The setInterval runs once (usually) and then things hang up at 100% cpu. If pm2 is installed, the code does not hang or if node 0.10.29 and earlier are used it does not hang.

var ipm2 = require('pm2-interface')();
var interval = setInterval( function () {
        console.log("FIRED");
    }, 500);

I'm not deliberately trying to use pm2-interface when pm2 is not installed but my code is auto-detecting to see if pm2 is being used or the cluster2 module. The ipm2 line is at the top of the module and is unconditionally executed so I can avoid the problem by moving the line so the execution only happens if pm2 is around. Nevertheless, I wanted to report this because I don't know what changed in node 0.10.30 and whatever did it may pop up in other circumstances since it worked fine in 0.10.29 and earlier. I also reported it to the pm2-interface repo issues.

@trevnorris
Copy link

Sorry. I'd put this on the mailing list. Better chance of getting a response there.

@misterdjules
Copy link

@rragan There was an issue introduced by 0.10.30 that makes timers with non-integer timeouts hang the process. While it doesn't seem that you use timers with non-integer timeouts, the symptoms are pretty similar. See issues #8065 and #8068.

A fix for this problem (see #8073) was merged in the v0.10 branch. Could you please try to reproduce the problem with this branch and let us know how it goes?

@rragan
Copy link
Author

rragan commented Aug 13, 2014

I built master branch and the problem is fixed. Seems like the timer change helped whatever was going on.

Thanks, Rich

From: Julien Gilli [mailto:[email protected]]
Sent: Wednesday, August 13, 2014 8:31 AM
To: joyent/node
Cc: Ragan, Richard
Subject: Re: [node] node 0.10.30 interaction with pm2-interface hangs. OK with node 0.10.29 (#8154)

@rraganhttps://github.com/rragan There was an issue introduced by 0.10.30 that makes timers with non-integer timeouts hang the process. While it doesn't seem that you use timers with non-integer timeouts, the symptoms are pretty similar. See issues #8065#8065 and #8068#8068.

A fix for this problem (see #8073#8073) was merged in the v0.10 branch. Could you please try to reproduce the problem with this branch and let us know how it goes?


Reply to this email directly or view it on GitHubhttps://github.com//issues/8154#issuecomment-52064660.

@misterdjules
Copy link

@rragan The master branch never had this issue. The issue was introduced on the v0.10 branch, from which the 0.10.x releases are made. To test if the fix on the v0.10 branch fixes your specific issue, you would have to checkout the v0.10 branch, not master. If you have some time to test that it would be great. Thank you!

@rragan
Copy link
Author

rragan commented Aug 13, 2014

Built again with branch v0.10 and the problem no longer shows up.

@misterdjules
Copy link

@rragan Thank you for looking into that!

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

No branches or pull requests

3 participants