Skip to content

stderr maxBuffer exceeded #47

Closed
Closed

Description

@davidcheung

Problem

CI failure due to maxBuffer exceeded

Reason

when running DEBUG=* (which jenkins do) in a child_process
the child gets overwhelmed by globalization :(

Possible solution

  1. Exclude strong-globalize's debug messages from Jenkins like we do for mocha
    something like DEBUG=*,-mocha,-strong-globalize
  2. Increase maxBuffer size (for lb-ng tests), since Users are unlikely to generate their lb-ng with DEBUG=* it should solve this problem too

See http://ci.strongloop.com/job/loopback-sdk-angular-cli/label=ubuntu-4/2385/console

1) generates "lbServices" module with app.restApiRoot url
Thu, 11 Aug 2016 21:20:16 GMT test --EXECFILE["/usr/local/bin/node" "/mnt/jenkins/workspace/loopback-sdk-angular-cli/e13f9a50/bin/lb-ng.js" "-m" "a-module-name" "/mnt/jenkins/workspace/loopback-sdk-angular-cli/e13f9a50/test/fixtures/app.js"]--
Thu, 11 Aug 2016 21:20:18 GMT test --FAILED--
Error: stderr maxBuffer exceeded
    at Socket.<anonymous> (child_process.js:285:14)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at Pipe.onread (net.js:536:20)
---------------------------------------------
    at Object.exports.execFile (child_process.js:296:9)
    at exports.exec (child_process.js:111:18)
    at promisified (eval at makeNodePromisifiedEval (/mnt/jenkins/workspace/loopback-sdk-angular-cli/e13f9a50/node_modules/bluebird/js/main/promisify.js:198:12), <anonymous>:3:246)
    at runLbNg (/mnt/jenkins/workspace/loopback-sdk-angular-cli/e13f9a50/test/lb-ng.test.js:91:12)
    at Context.<anonymous> (/mnt/jenkins/workspace/loopback-sdk-angular-cli/e13f9a50/test/lb-ng.test.js:44:12)
    at callFn (/mnt/jenkins/workspace/loopback-sdk-angular-cli/e13f9a50/

Activity

  1. self-assigned this
    on Aug 11, 2016
  2. davidcheung commented on Aug 12, 2016

    @davidcheung
    ContributorAuthor

    so it appears that CI is failing for angular-cli is because of strong-globalize’s debug msgs http://ci.strongloop.com/job/loopback-sdk-angular-cli/2393/label=amazon-6/consoleFull
    we spawn child_process, and amount of debug msg from strong-globalize is very high(when called from an outside module, because the loopback's globalize debug will go into the same stderr)
    which causes stderr buffer to exceed.

  3. davidcheung commented on Aug 12, 2016

    @davidcheung
    ContributorAuthor

    @rmg @bajtos @Setogit any thoughts on how to combat this.

  4. bajtos commented on Aug 15, 2016

    @bajtos
    Member

    I would personally exclude DEBUG env var from the environment provided to the child processes.

  5. davidcheung commented on Aug 16, 2016

    @davidcheung
    ContributorAuthor

    fixed in #50

  6. rmg commented on Aug 16, 2016

    @rmg
    Member

    CI only sets DEBUG in the second run of the tests, which means they are failing for some other reason before DEBUG is set. I suspect this PR would have passed with just the --timeout change by itself.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions