Skip to content

Node 10.14.x Regression in parsing of binary upgrade response body #24958

Closed
@shellscape

Description

@shellscape
  • Version: 10.14.1
  • Platform: MacOS 10.13.2
  • Subsystem: (Docker > ubuntu:xenial)

It appears that the v10.14.x version range introduces a regression which was resolved by #17806. This gist can consistently reproduce the error: https://gist.github.com/shellscape/2020916f92be5d61f4d411fb6d2bce61

Note that stepping back down to any 10.x version lower than 10.14.0 does not reproduce the error. We've spun up brand new containers to verify the issue was isolated to 10.14.x. The same containers (config) from scratch with 10.13.x are completely fine. And have verified this on three different machines (both Windows and Mac OS), in different geographic locations (U.S., Brazil, New Zealand).

This was noticed with use of the websockets/ws module. The immediate error stack produced:

  RangeError: Invalid WebSocket frame: RSV1 must be clear

  Receiver.getInfo (node_modules/ws/lib/receiver.js:168:14)
  Receiver.startLoop (node_modules/ws/lib/receiver.js:121:22)
  Receiver._write (node_modules/ws/lib/receiver.js:69:10)
  Socket.socketOnData (node_modules/ws/lib/websocket.js:816:35)

And the subsequent stack produced is:

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
      at writeAfterEnd (_stream_writable.js:243:12)
      at Socket.Writable.write (_stream_writable.js:291:5)
      at Sender.sendFrame (/node_modules/ws/lib/sender.js:404:20)
      at Sender.doClose (/node_modules/ws/lib/sender.js:141:10)
      at Sender.close (/node_modules/ws/lib/sender.js:128:12)
      at WebSocket.close (/node_modules/ws/lib/websocket.js:215:18)
      at Receiver.receiverOnConclude (/node_modules/ws/lib/websocket.js:695:32)
      at Receiver.emit (events.js:182:13)
      at Receiver.controlMessage (/node_modules/ws/lib/receiver.js:436:14)
      at Receiver.getData (/node_modules/ws/lib/receiver.js:330:42)

Both, when traced to the best of my ability, point back to the same problem as described in #17806.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions