-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
msgpackr unpack throws undefined symbol error #12754
Comments
Duplicate of #4290 |
Thank you (missed that sorry) |
Your code sample actually works fine for me on macOS and on a Linux ARM VM. msgpackr claims to work on Deno and Bun. I think it must be crashing on your system for a reason other than missing V8 API support so I'm gonna reopen this. |
Sorry, I'd mistyped your reproduction. I can reproduce a segfault which occurs if |
I've implemented this overload of |
What version of Bun is running?
1.1.20+ae1948925
What platform is your computer?
Linux 6.8.0-1004-raspi aarch64 aarch64
What steps can reproduce the bug?
When using the msgpackr module, specifically unpack, bun crashes. On a RPi4, it crashes with an illegal instruction error; on a RPI5 it gives a segfault. Runs fine under nodejs. Some quick test code:
`const { pack, unpack } = require ('msgpackr');
var msgpack = require ('msgpack5')();
let sendMsg = {"t":"ce","p":{"cmd":"getdevices","username":"test","domain":"dummy.com","appletId":"dm","filter":"{"domain": {"$in":["au.net","au.ft.net","au.swarm.net","be.dev.net","be.ft.net","be.swarm.net","ci.net","ft.net","qa.net","us.dev.net","us.ft.net","us.swarm.net"]},"fields":["_id","dId","domain","status","dto","connection","nwRegion","nwIPAddress","queuedMessages","country","agentRevision","xt"]}"}};
console.log('send: ' + JSON.stringify(sendMsg));
let packed = pack(sendMsg);
console.log('packed: ' + JSON.stringify(packed));
let rcvMsg = {};
rcvMsg = msgpack.decode(packed);
console.log('works with both: ' + JSON.stringify(rcvMsg));
rcvMsg = unpack(packed);
console.log('works nodejs, fails bun: ' + JSON.stringify(rcvMsg));`
What is the expected behavior?
We expect the msgpackr unpack to take the packed binary buffer and return the original JSON object.
What do you see instead?
On RPi4, the unpack call returns:
bun: symbol lookup error: /opt/iotransit/lib/bun/node_modules/msgpackr-extract/build/Release/extract.node: undefined symbol: _ZN2v85Array3NewEPNS_7IsolateEPNS_5LocalINS_5ValueEEEm
On RPi5, the unpack causes a segfault:
`============================================================
Bun v1.1.20 (ae19489) Linux arm64
Linux Kernel v6.8.0 | glibc v2.39
Args: "bun" "run" "testMsgpack.js"
Features: jsc
Builtins: "bun:main" "detect-libc" "node:assert" "node:buffer" "node:events" "node:fs" "node:module" "node:os" "node:path" "node:stream" "node:string_decoder" "node:url" "node:util" "node:util/types"
Elapsed: 124ms | User: 98ms | Sys: 36ms
RSS: 1.07GB | Peak: 74.46MB | Commit: 1.07GB | Faults: 0
panic(main thread): Segmentation fault at address 0xED200001C05
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
`
Additional information
No response
The text was updated successfully, but these errors were encountered: