Skip to content

Bus error since 4.0.4 on a Raspberry Pi #137

@merdok

Description

@merdok

Hi,

the recent update (4.0.4) is causing my nodejs app to crash, i am using https://www.npmjs.com/package/websocket as a dependency to connect to a websocket endpoint, which has this package as dependency.
I was tracking down the issue and found out that the "Bus error" happens during the mask function here https://github.com/theturtle32/WebSocket-Node/blob/master/lib/WebSocketFrame.js#L265

source = <Buffer 7b 22 69 64 22 3a 22 62 61 63 30 33 38 30 36 30 30 30 31 22 2c 22 74 79 70 65 22 3a 22 72 65 71 75 65 73 74 22 2c 22 75 72 69 22 3a 22 73 73 61 70 3a ... 37 more bytes>
mask = <Buffer 48 29 6e 2b>
output = <Buffer 81 d7 48 29 6e 2b 00 00 08 94 21 02 01 00 00 00 88 0f 00 00 2c 00 00 00 88 90 21 02 68 ad 21 02 73 65 74 4e 6f 44 65 6c 61 79 21 02 00 00 00 00 94 3d ... 43 more bytes>
offset = 6
length =87

I have no idea what you changed in version 4.0.4 but when i rollback to version 4.0.3 then it still works.
As far as I understand that some build c program is called to execute those functions faster but apparently it is now broken on some machines. I am running on a Raspberry Pi:
Linux raspberrypi 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l GNU/Linux

Can you tell me what the issue here is, and how to fix this? Can it be that the latest update broke this package for raspberry pi devices?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions