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

Prebuild process sometimes hangs #44

Open
asakusuma opened this issue Aug 29, 2018 · 0 comments
Open

Prebuild process sometimes hangs #44

asakusuma opened this issue Aug 29, 2018 · 0 comments

Comments

@asakusuma
Copy link
Owner

When adding a prebuild script that runs during prepare and uses ember-rollup/src/prebuild, calling rollup.preBuild() sometimes hangs indefinitely. The workaround is to manually call process.exit(0);. I added a console.log(process._getActiveHandles()); to debug. Here is the output. It appears that the hanging may be related to a broccoli-babel-transpiler/lib/worker.js process hanging on.

[ WriteStream {
    connecting: false,
    _hadError: false,
    _handle: 
     TTY {
       bytesRead: 0,
       _externalStream: [External],
       fd: 10,
       writeQueueSize: 0,
       owner: [Circular],
       onread: [Function: onread] },
    _parent: null,
    _host: null,
    _readableState: 
     ReadableState {
       objectMode: false,
       highWaterMark: 16384,
       buffer: [Object],
       length: 0,
       pipes: null,
       pipesCount: 0,
       flowing: null,
       ended: false,
       endEmitted: false,
       reading: false,
       sync: true,
       needReadable: false,
       emittedReadable: false,
       readableListening: false,
       resumeScheduled: false,
       destroyed: false,
       defaultEncoding: 'utf8',
       awaitDrain: 0,
       readingMore: false,
       decoder: null,
       encoding: null },
    readable: false,
    domain: null,
    _events: 
     { end: [Object],
       finish: [Function: onSocketFinish],
       _socketEnd: [Function: onSocketEnd] },
    _eventsCount: 3,
    _maxListeners: undefined,
    _writableState: 
     WritableState {
       objectMode: false,
       highWaterMark: 16384,
       finalCalled: false,
       needDrain: false,
       ending: false,
       ended: false,
       finished: false,
       destroyed: false,
       decodeStrings: false,
       defaultEncoding: 'utf8',
       length: 0,
       writing: false,
       corked: 0,
       sync: false,
       bufferProcessing: false,
       onwrite: [Function: bound onwrite],
       writecb: null,
       writelen: 0,
       bufferedRequest: null,
       lastBufferedRequest: null,
       pendingcb: 0,
       prefinished: false,
       errorEmitted: false,
       bufferedRequestCount: 0,
       corkedRequestsFree: [Object] },
    writable: true,
    allowHalfOpen: false,
    _bytesDispatched: 652,
    _sockname: null,
    _writev: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: null,
    _server: null,
    columns: 297,
    rows: 89,
    _type: 'tty',
    fd: 2,
    _isStdio: true,
    destroySoon: [Function: destroy],
    _destroy: [Function],
    [Symbol(asyncId)]: 2,
    [Symbol(bytesRead)]: 0 },
  WriteStream {
    connecting: false,
    _hadError: false,
    _handle: 
     TTY {
       bytesRead: 0,
       _externalStream: [External],
       fd: 12,
       writeQueueSize: 0,
       owner: [Circular],
       onread: [Function: onread] },
    _parent: null,
    _host: null,
    _readableState: 
     ReadableState {
       objectMode: false,
       highWaterMark: 16384,
       buffer: [Object],
       length: 0,
       pipes: null,
       pipesCount: 0,
       flowing: null,
       ended: false,
       endEmitted: false,
       reading: false,
       sync: true,
       needReadable: false,
       emittedReadable: false,
       readableListening: false,
       resumeScheduled: false,
       destroyed: false,
       defaultEncoding: 'utf8',
       awaitDrain: 0,
       readingMore: false,
       decoder: null,
       encoding: null },
    readable: false,
    domain: null,
    _events: 
     { end: [Object],
       finish: [Function: onSocketFinish],
       _socketEnd: [Function: onSocketEnd],
       drain: [Function: ondrain],
       error: [Function: onerror],
       close: [Function: cleanup] },
    _eventsCount: 6,
    _maxListeners: undefined,
    _writableState: 
     WritableState {
       objectMode: false,
       highWaterMark: 16384,
       finalCalled: false,
       needDrain: false,
       ending: false,
       ended: false,
       finished: false,
       destroyed: false,
       decodeStrings: false,
       defaultEncoding: 'utf8',
       length: 0,
       writing: false,
       corked: 0,
       sync: false,
       bufferProcessing: false,
       onwrite: [Function: bound onwrite],
       writecb: null,
       writelen: 0,
       bufferedRequest: null,
       lastBufferedRequest: null,
       pendingcb: 1,
       prefinished: false,
       errorEmitted: false,
       bufferedRequestCount: 0,
       corkedRequestsFree: [Object] },
    writable: true,
    allowHalfOpen: false,
    _bytesDispatched: 19,
    _sockname: null,
    _writev: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: null,
    _server: null,
    columns: 297,
    rows: 89,
    _type: 'tty',
    fd: 1,
    _isStdio: true,
    destroySoon: [Function: destroy],
    _destroy: [Function],
    [Symbol(asyncId)]: 6,
    [Symbol(bytesRead)]: 0 },
  ReadStream {
    connecting: false,
    _hadError: false,
    _handle: 
     TTY {
       bytesRead: 0,
       _externalStream: [External],
       fd: 13,
       writeQueueSize: 0,
       owner: [Circular],
       onread: [Function: onread],
       reading: false },
    _parent: null,
    _host: null,
    _readableState: 
     ReadableState {
       objectMode: false,
       highWaterMark: 0,
       buffer: [Object],
       length: 0,
       pipes: null,
       pipesCount: 0,
       flowing: null,
       ended: false,
       endEmitted: false,
       reading: false,
       sync: false,
       needReadable: true,
       emittedReadable: false,
       readableListening: false,
       resumeScheduled: false,
       destroyed: false,
       defaultEncoding: 'utf8',
       awaitDrain: 0,
       readingMore: false,
       decoder: null,
       encoding: null },
    readable: true,
    domain: null,
    _events: 
     { end: [Object],
       finish: [Function: onSocketFinish],
       _socketEnd: [Function: onSocketEnd],
       pause: [Function] },
    _eventsCount: 4,
    _maxListeners: undefined,
    _writableState: 
     WritableState {
       objectMode: false,
       highWaterMark: 0,
       finalCalled: false,
       needDrain: false,
       ending: false,
       ended: false,
       finished: false,
       destroyed: false,
       decodeStrings: false,
       defaultEncoding: 'utf8',
       length: 0,
       writing: false,
       corked: 0,
       sync: true,
       bufferProcessing: false,
       onwrite: [Function: bound onwrite],
       writecb: null,
       writelen: 0,
       bufferedRequest: null,
       lastBufferedRequest: null,
       pendingcb: 0,
       prefinished: false,
       errorEmitted: false,
       bufferedRequestCount: 0,
       corkedRequestsFree: [Object] },
    writable: false,
    allowHalfOpen: false,
    _bytesDispatched: 0,
    _sockname: null,
    _writev: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: null,
    _server: null,
    isRaw: false,
    isTTY: true,
    fd: 0,
    [Symbol(asyncId)]: 7,
    [Symbol(bytesRead)]: 0 },
  ChildProcess {
    domain: null,
    _events: 
     { internalMessage: [Function],
       message: [Function],
       error: [Function: onError],
       exit: [Function] },
    _eventsCount: 4,
    _maxListeners: undefined,
    _closesNeeded: 2,
    _closesGot: 0,
    connected: true,
    signalCode: null,
    exitCode: null,
    killed: false,
    spawnfile: '/Users/akusuma/.nvm/versions/node/v8.4.0/bin/node',
    _handle: Process { owner: [Circular], onexit: [Function], pid: 11904 },
    spawnargs: 
     [ '/Users/akusuma/.nvm/versions/node/v8.4.0/bin/node',
       '/Users/akusuma/Library/Caches/Yarn/v2/.tmp/24ef67e63a7ecfe54d3c09de0563c299.60b4689dcea4c4e039ac02c4d7d31ca0474b654d.prepare/node_modules/broccoli-babel-transpiler/lib/worker.js' ],
    pid: 11904,
    stdin: null,
    stdout: null,
    stderr: null,
    stdio: [ null, null, null, null ],
    channel: 
     Pipe {
       bytesRead: 1897,
       _externalStream: [External],
       fd: 14,
       writeQueueSize: 0,
       buffering: false,
       onread: [Function],
       sockets: [Object] },
    _channel: [Getter/Setter],
    _handleQueue: null,
    _pendingMessage: null,
    send: [Function],
    _send: [Function],
    disconnect: [Function],
    _disconnect: [Function],
    ready: true },
  Pipe {
    bytesRead: 1897,
    _externalStream: [External],
    fd: 14,
    writeQueueSize: 0,
    buffering: false,
    onread: [Function],
    sockets: { got: {}, send: {} } },
  ChildProcess {
    domain: null,
    _events: 
     { internalMessage: [Function],
       message: [Function],
       error: [Function: onError],
       exit: [Function] },
    _eventsCount: 4,
    _maxListeners: undefined,
    _closesNeeded: 2,
    _closesGot: 0,
    connected: true,
    signalCode: null,
    exitCode: null,
    killed: false,
    spawnfile: '/Users/akusuma/.nvm/versions/node/v8.4.0/bin/node',
    _handle: Process { owner: [Circular], onexit: [Function], pid: 11905 },
    spawnargs: 
     [ '/Users/akusuma/.nvm/versions/node/v8.4.0/bin/node',
       '/Users/akusuma/Library/Caches/Yarn/v2/.tmp/24ef67e63a7ecfe54d3c09de0563c299.60b4689dcea4c4e039ac02c4d7d31ca0474b654d.prepare/node_modules/broccoli-babel-transpiler/lib/worker.js' ],
    pid: 11905,
    stdin: null,
    stdout: null,
    stderr: null,
    stdio: [ null, null, null, null ],
    channel: 
     Pipe {
       bytesRead: 4006,
       _externalStream: [External],
       fd: 15,
       writeQueueSize: 0,
       buffering: false,
       onread: [Function],
       sockets: [Object] },
    _channel: [Getter/Setter],
    _handleQueue: null,
    _pendingMessage: null,
    send: [Function],
    _send: [Function],
    disconnect: [Function],
    _disconnect: [Function],
    ready: true },
  Pipe {
    bytesRead: 4006,
    _externalStream: [External],
    fd: 15,
    writeQueueSize: 0,
    buffering: false,
    onread: [Function],
    sockets: { got: {}, send: {} } },
  ChildProcess {
    domain: null,
    _events: 
     { internalMessage: [Function],
       message: [Function],
       error: [Function: onError],
       exit: [Function] },
    _eventsCount: 4,
    _maxListeners: undefined,
    _closesNeeded: 2,
    _closesGot: 0,
    connected: true,
    signalCode: null,
    exitCode: null,
    killed: false,
    spawnfile: '/Users/akusuma/.nvm/versions/node/v8.4.0/bin/node',
    _handle: Process { owner: [Circular], onexit: [Function], pid: 11906 },
    spawnargs: 
     [ '/Users/akusuma/.nvm/versions/node/v8.4.0/bin/node',
       '/Users/akusuma/Library/Caches/Yarn/v2/.tmp/24ef67e63a7ecfe54d3c09de0563c299.60b4689dcea4c4e039ac02c4d7d31ca0474b654d.prepare/node_modules/broccoli-babel-transpiler/lib/worker.js' ],
    pid: 11906,
    stdin: null,
    stdout: null,
    stderr: null,
    stdio: [ null, null, null, null ],
    channel: 
     Pipe {
       bytesRead: 2435,
       _externalStream: [External],
       fd: 17,
       writeQueueSize: 0,
       buffering: false,
       onread: [Function],
       sockets: [Object] },
    _channel: [Getter/Setter],
    _handleQueue: null,
    _pendingMessage: null,
    send: [Function],
    _send: [Function],
    disconnect: [Function],
    _disconnect: [Function],
    ready: true },
  Pipe {
    bytesRead: 2435,
    _externalStream: [External],
    fd: 17,
    writeQueueSize: 0,
    buffering: false,
    onread: [Function],
    sockets: { got: {}, send: {} } },
  Timer {
    '0': [Function: listOnTimeout],
    _list: 
     TimersList {
       _idleNext: [Circular],
       _idlePrev: [Circular],
       _timer: [Circular],
       _unrefed: false,
       msecs: 1000,
       nextTick: false } } ]
asakusuma added a commit to ember-spaniel/ember-spaniel that referenced this issue Aug 29, 2018
asakusuma added a commit to ember-spaniel/ember-spaniel that referenced this issue Aug 29, 2018
* Move to yarn and upgrade build dependencies
* Prebuild spaniel (had to work around asakusuma/ember-rollup#44)
* Drop support for node 4 and 6
* Release 0.5.0
* Add nuke script
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

1 participant