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

Write Timing Crash #192

Closed
splitice opened this issue Feb 11, 2020 · 4 comments
Closed

Write Timing Crash #192

splitice opened this issue Feb 11, 2020 · 4 comments
Labels

Comments

@splitice
Copy link

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at writeAfterEnd (_stream_writable.js:253:14)
    at WriteStream.Writable.write (_stream_writable.js:302:5)
    at dataHandler (/home/splitice/x4bdynmit/node_modules/express-fileupload/lib/tempFileHandler.js:24:19)
    at FileStream.<anonymous> (/home/splitice/x4bdynmit/node_modules/express-fileupload/lib/processMultipart.js:76:7)
    at FileStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:308:12)
    at readableAddChunk (_stream_readable.js:289:11)
    at FileStream.Readable.push (_stream_readable.js:223:10)
    at PartStream.onData (/home/splitice/x4bdynmit/node_modules/busboy/lib/types/multipart.js:223:28)
    at PartStream.emit (events.js:210:5)
Emitted 'error' event on WriteStream instance at:
    at errorOrDestroy (internal/streams/destroy.js:107:12)
    at writeAfterEnd (_stream_writable.js:255:3)
    at WriteStream.Writable.write (_stream_writable.js:302:5)
    [... lines matching original stack trace ...]
    at PartStream.onData (/home/splitice/x4bdynmit/node_modules/busboy/lib/types/multipart.js:223:28)

It appears that it's possible for dataHandler to get called after cleanup, perhaps a check would be a good idea?

@wbulot
Copy link

wbulot commented Feb 16, 2020

I have an app with pretty high upload traffic and I have the same error regularly.
I don't know exactly when it happens.

@RomanBurunkov
Copy link
Collaborator

@splitice , do you have a particular steps how to reproduce that issue?

@RomanBurunkov
Copy link
Collaborator

Add flag for this.
Should be resolved in 1.1.7-alpha.2.

@splitice
Copy link
Author

splitice commented Apr 6, 2020

@RomanBurunkov Regarding steps to reproduce it is a race condition. I'm not sure you could create such a thing.

You could however stress test it and get it to occur I suspect.

What can be said for sure is that if you run a site with real world traffic this occurs regularly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants