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

node debug -p fails #5903

Closed
julien51 opened this issue Jul 25, 2013 · 6 comments
Closed

node debug -p fails #5903

julien51 opened this issue Jul 25, 2013 · 6 comments

Comments

@julien51
Copy link

Hello,

We have a stuck node.js process. We suspect it may be due to some kind of infinite loop somwhere. Since we have no idea where to look it up, we tried using node debug -p . No luck:

# node debug -p 13974
connecting.............There was an internal error in Node's debugger. Please report this bug.
connect ECONNREFUSED
Error: connect ECONNREFUSED
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)

The output makes me think that the node debug process can't connect to our process precisely because our event loop is stuck. Could that be the case?
In another thread, @davepacheco indicates that this should not be a problem:

That's not a problem. We modified Node back in the 0.4 days to support opening the debugger port even if the Node program itself is stuck in an infinite loop, and V8 is able to evaluate expressions in this context.

Can someone clarify things? Why are we unable to connect to our "stuck" node.js process? Any idea on how to debug that? (we're on debian... so all tools requiring us to use Solaris won't do :()

@bnoordhuis
Copy link
Member

Did you start process 13974 in debug mode? If not, what happens when you send it a SIGUSR1 to activate the debugger?

@trevnorris
Copy link

What version of Node are you using? Can you explain the general purpose of what the process is supposed to be working on? What's the CPU usage on that PID?

@faridnsh
Copy link

Just a simple infinite loop is enough to replicate this:

while (true) {}

@jasnell
Copy link
Member

jasnell commented May 28, 2015

@trevnorris @bnoordhuis ... any reason to keep this one open?

@bnoordhuis
Copy link
Member

I'm fairly sure this is fixed in io.js. Don't know about joyent/node.

@jasnell
Copy link
Member

jasnell commented May 28, 2015

An initial quick test on v0.12 doesn't show any connection error but things are still less than useful. It's worth investigating further.

gibfahn pushed a commit to ibmruntimes/node that referenced this issue Apr 15, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
gibfahn pushed a commit to ibmruntimes/node that referenced this issue Apr 27, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
richardlau pushed a commit to ibmruntimes/node that referenced this issue May 16, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
gibfahn pushed a commit to ibmruntimes/node that referenced this issue May 25, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
gibfahn pushed a commit to ibmruntimes/node that referenced this issue May 25, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
utterstep pushed a commit to lutik-inc/node that referenced this issue Jun 1, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
richardlau pushed a commit to ibmruntimes/node that referenced this issue Jun 17, 2016
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: nodejs#5903
PR-URL: nodejs/node#6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
@Trott Trott closed this as completed Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants