GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — iojs.exe randomly terminates on Windows · Issue #1512 · nodejs/node

iojs.exe randomly terminates on Windows #1512

New issue
Copy link
New issue
Copy link
Closed
Closed
iojs.exe randomly terminates on Windows#1512
Copy link
Labels
c++Issues and PRs that require attention from people who are familiar with C++.confirmed-bugIssues and PRs for confirmed bugs.windowsIssues and PRs related to the Windows platform.

Description

@alexlamsl
alexlamsl
opened on Apr 23, 2015
Issue body actions

The iojs.exe process in question is running one of http and https servers.

The problem seems to occur if a separate iojs process is running, and is subsequently terminated, e.g. manually by pressing Ctrl+C within a Command Prompt window, then the aforementioned process would terminate as well, whether it is running in the background or in (a separate) Command Prompt window.

Activity

Next
  1. Fishrock123 commented on Apr 23, 2015

    @Fishrock123
    Fishrock123
    on Apr 23, 2015
    Contributor
    More actions

    @alexlamsl can you give us any other info? io.js and windows versions? Memory usage?

  2. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    Sorry @Fishrock123 - mistyped TAB then Enter and submitted a mostly empty comment above (=.=")

  3. Fishrock123
    added
    windowsIssues and PRs related to the Windows platform.
    on Apr 23, 2015
  4. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    When the iojs process terminates unexpected, most of the time there isn't any output to stdin or stderr - so far only once have I see the following output:

    Assertion failed: (req_.data) == (this), file c:\workspace\iojs+release\nodes\iojs-win2008r2-release-x64\src\req-wrap-inl.h, line 29
    

    I have encountered this issue on io.js 1.7.1 and 1.8.1 - I have not tried any earlier versions.

  5. Fishrock123 commented on Apr 23, 2015

    @Fishrock123
    Fishrock123
    on Apr 23, 2015
    Contributor
    More actions

    @alexlamsl does it happen if you have any two iojs processes running and quite one, or only when one is running http?

  6. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    In addition, as I first suspected this issue might have something to do with https, I ran other iojs processes to continuously hit the first process via https. It ran fine after churning through ~50GB of data in both occasions (takes about 3 hours), then only when I press Ctrl+C on the tester process would I get the original process to terminate.

    I tried running the tester process on a separate PC over the network, and cannot reproduce this problem so far.

  7. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    Under normal circumstances, the https process would run in the background forever, and every now and then some scheduled iojs process would run to perform some http requests to external resources (NOT to the background https process), and they are expected to exit gracefully.

    I suspect there might be occasions when those schedule processes terminate in an erroneous condition, and triggers this random termination behaviour on the https process.

  8. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    Running just iojs (the prompt mode?) and press Ctrl+C twice to quite does not trigger the https process to terminate.

  9. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    Something else that is probably irrelevant as well - when I listen to clientError events in an attempt to debug, I get these every now and then:

    { [Error: Parse Error] bytesParsed: 0, code: 'HPE_INVALID_METHOD' }
    { _connecting: false,
      _hadError: false,
      _handle: null,
      _parent: null,
      _host: null,
      _readableState:
       { objectMode: false,
         highWaterMark: 16384,
         buffer: [],
         length: 0,
         pipes: null,
         pipesCount: 0,
         flowing: true,
         ended: false,
         endEmitted: false,
         reading: true,
         sync: false,
         needReadable: true,
         emittedReadable: false,
         readableListening: false,
         defaultEncoding: 'utf8',
         ranOut: false,
         awaitDrain: 0,
         readingMore: true,
         decoder: null,
         encoding: null,
         resumeScheduled: false },
      readable: false,
      domain: null,
      _events:
       { end: [ [Object], [Function: socketOnEnd] ],
         finish: [Function: onSocketFinish],
         _socketEnd: [Function: onSocketEnd],
         drain: [ [Function: ondrain], [Function: socketOnDrain] ],
         timeout: [Function],
         error: [Function: socketOnError],
         close: [Function: serverSocketCloseListener],
         data: [Function: socketOnData],
         connect: { [Function: g] listener: [Function] } },
      _eventsCount: 9,
      _maxListeners: undefined,
      _writableState:
       { objectMode: false,
         highWaterMark: 16384,
         needDrain: false,
         ending: false,
         ended: false,
         finished: false,
         decodeStrings: false,
         defaultEncoding: 'utf8',
         length: 0,
         writing: false,
         corked: 0,
         sync: true,
         bufferProcessing: false,
         onwrite: [Function],
         writecb: null,
         writelen: 0,
         bufferedRequest: null,
         lastBufferedRequest: null,
         pendingcb: 0,
         prefinished: false,
         errorEmitted: true },
      writable: false,
      allowHalfOpen: true,
      destroyed: true,
      bytesRead: 38,
      _bytesDispatched: 0,
      _pendingData: null,
      _pendingEncoding: '',
      server:
       { domain: null,
         _events:
          { request: [Function],
            connection: [Function: connectionListener],
            clientError: [Object] },
         _eventsCount: 3,
         _maxListeners: undefined,
         _connections: 0,
         _handle:
          { fd: -1,
            reading: false,
            owner: [Circular],
            onread: null,
            onconnection: [Function: onconnection],
            writeQueueSize: 0 },
         _usingSlaves: false,
         _slaves: [],
         _unref: false,
         allowHalfOpen: true,
         pauseOnConnect: false,
         httpAllowHalfOpen: false,
         timeout: 120000,
         _connectionKey: '6::::80' },
      _idleTimeout: -1,
      _idleNext: null,
      _idlePrev: null,
      _idleStart: 4540549,
      parser:
       { '0': [Function: parserOnHeaders],
         '1': [Function: parserOnHeadersComplete],
         '2': [Function: parserOnBody],
         '3': [Function: parserOnMessageComplete],
         _headers: [],
         _url: '',
         socket: [Circular],
         incoming: null,
         maxHeaderPairs: 2000,
         onIncoming: [Function: parserOnIncoming] },
      _paused: false,
      read: [Function],
      _consuming: true }
    
  10. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    Memory usage is around 60~250MB, on a machine that has 64GB, running Windows Server 2012 R2

  11. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    If I were to run 3 tester processes simultaneously on the same machine as the https process, quitting one of them would trigger this issue.

    However, the other 2 tester processes would continue to run, albeit not being able to connect to anything obviously, as the https process has (unexpectedly) terminated.

  12. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    I just tried forceful termination of iojs processes which I spawn and does not use http - does not reproduce this issue.

  13. alexlamsl commented on Apr 23, 2015

    @alexlamsl
    alexlamsl
    on Apr 23, 2015
    Author
    More actions

    @Fishrock123 any other combination of tests you would like me to try?

    I will try and see if I can narrow something down over the weekend - but without any console output, I find a bit hard to even give an educated guess atm.

  14. silverwind commented on Apr 24, 2015

    @silverwind
    silverwind
    on Apr 24, 2015
    Contributor
    More actions

    Just a wild guess, but could you remove the node.exe hardlink and rename iojs.exe to node.exe and check if it still occurs?

    I once had a similar issue on Linux with a node process backgrounded through the shell, and launching another node would terminate the first. Launching the second process with iojs did not kill it.

  15. alexlamsl commented on Apr 25, 2015

    @alexlamsl
    alexlamsl
    on Apr 25, 2015
    Author
    More actions

    @silverwind on Windows, iojs.exe and node.exe looks like two byte-by-byte identical files (as opposed to hardlinks)

    Anyway, I tried removing node.exe, then renaming iojs.exe to node.exe, then run the tests:

    // leave this one running
    // https server that does fs.createReadStream(...).pipe(response)
    > node .
    
    
    // run for ~5 mins, then Ctrl+C
    // hits first server with 10 simultaneous, continuous https requests
    // ~400req/s, ~20MB/s
    > node test.js
    

    Problem still persists (in that the first process sometimes terminates, and when it does it may print an assertion error).

    Assertion failed: (req_.data) == (this), file c:\workspace\iojs+release\nodes\iojs-win2008r2-release-x64\src\req-wrap-inl.h, line 29
    
  16. 49 remaining items

  17. mathiask88 commented on May 5, 2015

    @mathiask88
    mathiask88
    on May 5, 2015
    Contributor
    More actions

    @indutny I cherrypicked your commit, rebuilt and the server is still crashing but due to an other error HEAP[iojs.exe]: HEAP: Free Heap block 000000C5AD74CA50 modified at 000000C5AD74CA98 after it was freed

  18. silverwind commented on May 5, 2015

    @silverwind
    silverwind
    on May 5, 2015
    Contributor
    More actions

    @mathiask88 you were using the patch for latest libuv master, https://gist.github.com/saghul/52677dba652ab8e78051 is for the version io.js uses (#1563).

  19. indutny commented on May 5, 2015

    @indutny
    indutny
    on May 5, 2015
    Member
    More actions

    Will try figure it out today on io.js level. I think that df28a73 should work after some tweaking.

  20. mathiask88 commented on May 5, 2015

    @mathiask88
    mathiask88
    on May 5, 2015
    Contributor
    More actions

    @silverwind Ah, ok thanks. Then I did everything right ;) However with the libuv patch this problem seems to be gone.

  21. silverwind commented on May 5, 2015

    @silverwind
    silverwind
    on May 5, 2015
    Contributor
    More actions

    I think @saghul intends to include the original fix for libuv/libuv#339 in libuv 1.5.0 (#1563 (comment)), maybe it' best to wait on that before applying more 'hacks'. 😉

  22. silverwind commented on May 5, 2015

    @silverwind
    silverwind
    on May 5, 2015
    Contributor
    More actions

    And it landed: libuv/libuv@f880023.

  23. bnoordhuis
    added a commit that references this issue on May 6, 2015

    deps: update libuv to 1.5.0

    04cc03b
  24. bnoordhuis commented on May 6, 2015

    @bnoordhuis
    bnoordhuis
    on May 6, 2015
    Member
    More actions

    Should be fixed by 04cc03b. Closing, holler if I should reopen it.

  25. bnoordhuis
    closed this as completedon May 6, 2015
  26. silverwind commented on May 6, 2015

    @silverwind
    silverwind
    on May 6, 2015
    Contributor
    More actions

    I verified my test case again, seems to be fixed for real this time.

  27. alexlamsl commented on May 8, 2015

    @alexlamsl
    alexlamsl
    on May 8, 2015
    Author
    More actions

    Verified on iojs 2.0.1. Thanks everyone!

  28. Fishrock123
    added 2 commits that reference this issue on May 19, 2015

    stream_base: dispatch reqs in the stream impl

    c5d7c7e

    deps: update libuv to 1.5.0

    8651ecc
  29. reverofevil commented on Jan 19, 2016

    @reverofevil
    reverofevil
    on Jan 19, 2016
    More actions

    @silverwind Nah, you didn't.

    Assertion failed: (consumed_) == (false), file c:\workspace\iojs+release\nodes\w
    in2008r2-release-x64\src\stream_base.h, line 203
    

    Node 5.0.0

  30. alexlamsl commented on Jan 19, 2016

    @alexlamsl
    alexlamsl
    on Jan 19, 2016
    Author
    More actions

    @polkovnikov-ph I believe you are hitting a different bug - may be file a new issue to track it?

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

    c++Issues and PRs that require attention from people who are familiar with C++.confirmed-bugIssues and PRs for confirmed bugs.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.