Skip to content

Debugging across http requests throws exception #3682

Description

@willm

Hi,

I hope this is the right place to post this, but I think I've found an issue with node debug.

Given this code in test.js:

var http = require('https');
http.get('https://nodejs.org', function (res) {
    debugger;
}).on('error', function (e) {
    throw e;
});
node debug test.js                                                                                                               20 ↵
< Debugger listening on port 5858
debug> . ok
break in test/t.js:1
> 1 var http = require('https');
  2     http.get('https://nodejs.org', function (res) {
  3         debugger;
debug> c
break in test/t.js:3
  1 var http = require('https');
  2     http.get('https://nodejs.org', function (res) {
> 3         debugger;
  4     }).on('error', function (e) {
debug> repl
Press Ctrl + C to leave debug repl
> res
< iojs: ../src/util-inl.h:196: TypeName* node::Unwrap(v8::Local<v8::Object>) [with TypeName = node::TLSWrap]: Assertion `(object->InternalFieldCount()) > (0)' failed.
program terminated

I think this should be allowing me to inspect the res object. Not sure if this is a node or V8 issue though. I'm running node 4.0.0 on Ubuntu 14.04.3 LTS

node --version
v4.0.0

Activity

  1. added
    tlsIssues and PRs related to the tls subsystem.
    on Nov 5, 2015
  2. bnoordhuis commented on Nov 6, 2015

    @bnoordhuis
    Member

    Is it possible that you have an older iojs binary on your PATH? The iojs: in the assert message is suspicious.

  3. willm commented on Nov 6, 2015

    @willm
    Author

    It's possible (I use n to manage multiple node/iojs versions). So I tried to mitigate this using the node:4.0.0 docker image and still get an error, but no mention of iojs.

    node debug test.js
    < Debugger listening on port 5858
    debug> . ok
    break in /test.js:1
    > 1 var http = require('https');
      2 http.get('https://nodejs.org', function (res) {
      3     debugger;
    debug> c
    break in /test.js:3
      1 var http = require('https');
      2 http.get('https://nodejs.org', function (res) {
    > 3     debugger;
      4 }).on('error', function (e) {
      5     throw e;
    debug> repl
    Press Ctrl + C to leave debug repl
    > res
    < node: ../src/util-inl.h:196: TypeName* node::Unwrap(v8::Local<v8::Object>) [with TypeName = node::TLSWrap]: Assertion `(object->InternalFieldCount()) > (0)' failed.
    program terminated
    
  4. reopened this on Nov 6, 2015
  5. Fishrock123 commented on Nov 6, 2015

    @Fishrock123
    Contributor

    It's possible v4.0.0 had a missed error message somewhere, @willm can I get you to try v4.2.2?

  6. willm commented on Nov 6, 2015

    @willm
    Author

    Same issue with 4.2.2, it seems to go way back (I also tried 0.10.40)

    node debug test.js 
    < Debugger listening on port 5858
    debug> . ok
    break in /test.js:1
    > 1 var http = require('https');
      2 http.get('https://nodejs.org', function (res) {
      3     debugger;
    debug> c
    break in /test.js:3
      1 var http = require('https');
      2 http.get('https://nodejs.org', function (res) {
    > 3     debugger;
      4 }).on('error', function (e) {
      5     throw e;
    debug> repl
    Press Ctrl + C to leave debug repl
    > res
    < node: ../src/util-inl.h:196: TypeName* node::Unwrap(v8::Local<v8::Object>) [with TypeName = node::TLSWrap]: Assertion `(object->InternalFieldCount()) > (0)' failed.
    program terminated
    debug> 
    (^C again to quit)
    debug> 
    root@499efe4fee8e:/# node -v
    v4.2.2
    
  7. Fishrock123 commented on Nov 6, 2015

    @Fishrock123
    Contributor
  8. srl295 commented on Jan 9, 2016

    @srl295
    Member

    Is this nodejs/node-v0.x-archive#9028 ? because that's also reproducible on v5.1.0
    > process.binding('crypto').Connection.prototype
    --> crash

  9. willm commented on Jan 9, 2016

    @willm
    Author

    It looks like it could well be the case. I've tested all the versions and can confirm that the regression happened in 0.11.14 (0.11.13 works fine)

  10. YouriT commented on Mar 2, 2016

    @YouriT

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions