bun
bun copied to clipboard
RabbitMQ / amqplib errors (Invalid frame)
I'm trying to send (relatively large) messages through rabbitmq. The code looks like the following:
const connection = await amqplib.connect("amqp://localhost:5672");
const channel = await connection.createChannel();
await channel.assertExchange(EXCHANGE, "fanout");
this.channel.publish(EXCHANGE, "", Buffer.from(someLargeJsonObject));
And on the receiving end
const connection = await amqplib.connect("amqp://localhost:5672");
const channel = await connection.createChannel();
await channel.assertExchange(EXCHANGE, "fanout");
await channel.assertQueue(QUEUE);
await channel.bindQueue(QUEUE, EXCHANGE, "");
channel.consume(QUEUE, (msg) => {
// Some code here, doesn't affect the error
});
The following error occurs for some messages (truncated):
if (rest[size] !== FRAME_END)
throw new Error('Invalid frame');
error: Invalid frame
at parseFrame (/.../node_modules/amqplib/lib/frame.js:59:14)
...
It doesn't happen for all messages sent, and it doesn't happen at all if I send very small messages, e.g. replacing someLargeJsonObject
with just a string "Message"
I haven't been able to test with node as a big part of my application isn't compatible with node (Elysiajs), but I have talked to someone else with nearly identical code who is running node and not experiencing any issues
Originally reported on Discord: RabbitMQ / amqplib errors (Invalid frame)
i have this problem too
Same
Same. Is there any workaround? Is there a way to fall back to Node.JS socket implementation?
We are experiencing the same issue. @robobun , have you found a workaround?
Same issue
Duplicate https://github.com/oven-sh/bun/issues/4791
@nektro,
The other 2 amqplib errors talk about connectivity, this one is with regards to running communication, where (possibily) big messages cause an error. I think this one should stay open.
π sorry about that. ran into the connectivity issue when trying to reproduce and jumped the gun.
we can get around that in the meantime by replacing localhost
with 127.0.0.1
. would you be able to elaborate on what the values for EXCHANGE
and QUEUE
are supposed to be? I have a local rabbitmq
server running through brew
.
Thanks!
These can be any string values. So "foo" and "bar" respectively will work nicely.
I created a minimal application to demonstrate the problem https://github.com/acuminous/amqplib-764. The issue is intermittent, but increasingly more likely the larger the payload ~affects payloads that are over the configurable maximum frame size~. RabbitMQ splits large payloads across multiple frames, and when using Bun, they are getting corrupted, with bytes from the frames appearing to be duplicated and interleaved. As can be seen the example this results in a number of different problems from misidentifying the frame type, to the frame's payload size not matching the size specified in the frame header.
I created a minimal application to demonstrate the problem https://github.com/acuminous/amqplib-764. The issue affects payloads that are over the configurable maximum frame size. In this instance RabbitMQ splits the payloads across multiple frames, and when using Bun, they are getting corrupted. As can be seen the example this results in a number of different problems from misidentifying the frame type, to the frame's payload size not matching the size specified in the frame header.
I have the same problem. When will this issue be fixed
I created a minimal application to demonstrate the problem https://github.com/acuminous/amqplib-764. The issue is intermittent, but increasingly more likely the larger the payload ~affects payloads that are over the configurable maximum frame size~. RabbitMQ splits large payloads across multiple frames, and when using Bun, they are getting corrupted, with bytes from the frames appearing to be duplicated and interleaved. As can be seen the example this results in a number of different problems from misidentifying the frame type, to the frame's payload size not matching the size specified in the frame header.
Confirming I am able to reproduce this in Bun v1.1.13 on macOS arm64.
Debug build:
β― bun-debug index.js 100000
50 | function parseFrame(bin, max) {
51 | var fh = frameHeaderPattern(bin);
52 | if (fh) {
53 | var size = fh.size, rest = fh.rest;
54 | if (size > max) {
55 | throw new Error('Frame size exceeds frame max');
^
error: Frame size exceeds frame max
at parseFrame (/Users/jarred/Desktop/amqplib-764/node_modules/amqplib/lib/frame.js:55:13)
at recvFrame (/Users/jarred/Desktop/amqplib-764/node_modules/amqplib/lib/connection.js:559:17)
at go (/Users/jarred/Desktop/amqplib-764/node_modules/amqplib/lib/connection.js:433:32)
at emit (node:events:270:48)
at emitReadable_ (node:stream:2624:27)
Bun v1.1.13-debug (macOS arm64)
Release build:
β― bun index.js 100000
54 | if (size > max) {
55 | throw new Error('Frame size exceeds frame max');
56 | }
57 | else if (rest.length > size) {
58 | if (rest[size] !== FRAME_END)
59 | throw new Error('Invalid frame');
^
error: Invalid frame
at parseFrame (/Users/jarred/Desktop/amqplib-764/node_modules/amqplib/lib/frame.js:59:15)
at recvFrame (/Users/jarred/Desktop/amqplib-764/node_modules/amqplib/lib/connection.js:559:17)
at go (/Users/jarred/Desktop/amqplib-764/node_modules/amqplib/lib/connection.js:433:32)
at emit (node:events:180:48)
at emitReadable_ (node:stream:1957:27)
Bun v1.1.13 (macOS arm64)
Debug logs:
[CLI] argv: [bun-debug, index.js, 100000]
[SYS] openat(-2, amqplib-764/bunfig.toml) = -1
[SYS] openat(-2, index.js) = 4
[SYS] fstat(4[amqplib-764/index.js]) = 0
[SYS] close(4[amqplib-764/index.js])
[fs] open(/) = fs.Dir{ .fd = 4 }
[fs] readdir(4[/], /) = 19
[fs] open(/Users/) = fs.Dir{ .fd = 5 }
[fs] readdir(5[/Users], /Users/) = 3
[fs] open(/Users/jarred/) = fs.Dir{ .fd = 6 }
[fs] readdir(6[/Users/jarred], /Users/jarred/) = 82
[fs] open() = fs.Dir{ .fd = 7 }
[fs] readdir(7[/Users/jarred/Desktop], ) = 208
[SYS] openat(7[/Users/jarred/Desktop], package.json) = 8
[fs] openat(7[/Users/jarred/Desktop], package.json) = 8[package.json]
[fs] stat(8) = 299
[fs] pread(8, 299) = 299
[SYS] close(8[package.json])
[fs] open(amqplib-764/) = fs.Dir{ .fd = 8 }
[fs] readdir(8[amqplib-764], amqplib-764/) = 8
[SYS] openat(8[amqplib-764], package.json) = 9
[fs] openat(8[amqplib-764], amqplib-764/package.json) = 9[amqplib-764/package.json]
[fs] stat(9) = 257
[fs] pread(9, 257) = 257
[SYS] close(9[amqplib-764/package.json])
[SYS] close(4[/])
[SYS] close(5[/Users])
[SYS] close(6[/Users/jarred])
[SYS] close(7[/Users/jarred/Desktop])
[SYS] close(8[amqplib-764])
[ModuleLoader] transpile(amqplib-764/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/index.js) = 5[amqplib-764/index.js]
[fs] stat(5) = 770
[fs] pread(5, 770) = 770
[SYS] close(5[amqplib-764/index.js])
[fs] open(amqplib-764/node_modules/) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules], amqplib-764/node_modules/) = 15
[fs] open(amqplib-764/node_modules/amqplib) = fs.Dir{ .fd = 7 }
[fs] readdir(7[amqplib-764/node_modules/amqplib], amqplib-764/node_modules/amqplib/) = 13
[SYS] openat(7[amqplib-764/node_modules/amqplib], package.json) = 8
[fs] openat(7[amqplib-764/node_modules/amqplib], amqplib-764/node_modules/amqplib/package.json) = 8[amqplib-764/node_modules/amqplib/package.json]
[fs] stat(8) = 828
[fs] pread(8, 828) = 828
[SYS] close(8[amqplib-764/node_modules/amqplib/package.json])
[SYS] close(5[amqplib-764/node_modules])
[SYS] close(7[amqplib-764/node_modules/amqplib])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/channel_api.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/channel_api.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/channel_api.js) = 5[amqplib-764/node_modules/amqplib/channel_api.js]
[fs] stat(5) = 532
[fs] pread(5, 532) = 532
[SYS] close(5[amqplib-764/node_modules/amqplib/channel_api.js])
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib) = 5
[fs] readdir entry channel.js
[fs] readdir entry callback_model.js
[fs] readdir entry format.js
[fs] readdir entry api_args.js
[fs] readdir entry defs.js
[fs] readdir entry mux.js
[fs] readdir entry credentials.js
[fs] readdir entry connect.js
[fs] readdir entry error.js
[fs] readdir entry codec.js
[fs] readdir entry heartbeat.js
[fs] readdir entry bitset.js
[fs] readdir entry connection.js
[fs] readdir entry frame.js
[fs] readdir entry channel_model.js
[fs] readdir(5, amqplib-764/node_modules/amqplib/lib) = 15
[fs] open(amqplib-764/node_modules/amqplib/lib) = fs.Dir{ .fd = 5 }
[SYS] close(5[amqplib-764/node_modules/amqplib/lib])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/connect.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/connect.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/connect.js) = 5[amqplib-764/node_modules/amqplib/lib/connect.js]
[fs] stat(5) = 5421
[fs] pread(5, 5421) = 5421
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/connect.js])
[fs] open(amqplib-764/node_modules/url-parse) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/url-parse], amqplib-764/node_modules/url-parse/) = 5
[SYS] openat(5[amqplib-764/node_modules/url-parse], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/url-parse], amqplib-764/node_modules/url-parse/package.json) = 7[amqplib-764/node_modules/url-parse/package.json]
[fs] stat(7) = 1271
[fs] pread(7, 1271) = 1271
[SYS] close(7[amqplib-764/node_modules/url-parse/package.json])
[SYS] close(5[amqplib-764/node_modules/url-parse])
[ModuleLoader] transpile(amqplib-764/node_modules/url-parse/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/url-parse/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/url-parse/index.js) = 5[amqplib-764/node_modules/url-parse/index.js]
[fs] stat(5) = 16622
[fs] pread(5, 16622) = 16622
[SYS] close(5[amqplib-764/node_modules/url-parse/index.js])
[fs] open(amqplib-764/node_modules/requires-port) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/requires-port], amqplib-764/node_modules/requires-port/) = 7
[SYS] openat(5[amqplib-764/node_modules/requires-port], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/requires-port], amqplib-764/node_modules/requires-port/package.json) = 7[amqplib-764/node_modules/requires-port/package.json]
[fs] stat(7) = 1127
[fs] pread(7, 1127) = 1127
[SYS] close(7[amqplib-764/node_modules/requires-port/package.json])
[SYS] close(5[amqplib-764/node_modules/requires-port])
[ModuleLoader] transpile(amqplib-764/node_modules/requires-port/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/requires-port/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/requires-port/index.js) = 5[amqplib-764/node_modules/requires-port/index.js]
[fs] stat(5) = 753
[fs] pread(5, 753) = 753
[SYS] close(5[amqplib-764/node_modules/requires-port/index.js])
[fs] open(amqplib-764/node_modules/querystringify) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/querystringify], amqplib-764/node_modules/querystringify/) = 4
[SYS] openat(5[amqplib-764/node_modules/querystringify], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/querystringify], amqplib-764/node_modules/querystringify/package.json) = 7[amqplib-764/node_modules/querystringify/package.json]
[fs] stat(7) = 879
[fs] pread(7, 879) = 879
[SYS] close(7[amqplib-764/node_modules/querystringify/package.json])
[SYS] close(5[amqplib-764/node_modules/querystringify])
[ModuleLoader] transpile(amqplib-764/node_modules/querystringify/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/querystringify/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/querystringify/index.js) = 5[amqplib-764/node_modules/querystringify/index.js]
[fs] stat(5) = 2564
[fs] pread(5, 2564) = 2564
[SYS] close(5[amqplib-764/node_modules/querystringify/index.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/connection.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/connection.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/connection.js) = 5[amqplib-764/node_modules/amqplib/lib/connection.js]
[fs] stat(5) = 21646
[fs] pread(5, 21646) = 21646
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/connection.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/defs.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/defs.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/defs.js) = 5[amqplib-764/node_modules/amqplib/lib/defs.js]
[fs] stat(5) = 137145
[fs] pread(5, 137145) = 137145
[SYS] openat(-2, /Users/jarred/Library/Caches/bun/@t@/2d2e42002a94301d.debug.pile) = 7
[SYS] close(7[/Users/jarred/Library/Caches/bun/@t@/2d2e42002a94301d.debug.pile])
[cache] get("amqplib-764/node_modules/amqplib/lib/defs.js") = 148723 bytes, ignored for debug build
[cache] filename to put into: '/Users/jarred/Library/Caches/bun/@t@/2d2e42002a94301d.debug.pile'
[SYS] openat(7[/Users/jarred/Library/Caches/bun/@t@], .1ff794ea07dafffd-00000000..pile) = 8
[SYS] pwritev(8[/Users/jarred/Library/Caches/bun/@t@/.1ff794ea07dafffd-00000000..pile], 239842) = 239842
[SYS] renameat(7[/Users/jarred/Library/Caches/bun/@t@], .1ff794ea07dafffd-00000000..pile, 7[/Users/jarred/Library/Caches/bun/@t@], 2d2e42002a94301d.debug.pile) = 0
[SYS] close(8[/Users/jarred/Library/Caches/bun/@t@/2d2e42002a94301d.debug.pile])
[SYS] close(7[/Users/jarred/Library/Caches/bun/@t@])
[cache] put() = 148723 bytes
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/defs.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/codec.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/codec.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/codec.js) = 5[amqplib-764/node_modules/amqplib/lib/codec.js]
[fs] stat(5) = 11237
[fs] pread(5, 11237) = 11237
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/codec.js])
[fs] open(amqplib-764/node_modules/buffer-more-ints) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/buffer-more-ints], amqplib-764/node_modules/buffer-more-ints/) = 7
[SYS] openat(5[amqplib-764/node_modules/buffer-more-ints], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/buffer-more-ints], amqplib-764/node_modules/buffer-more-ints/package.json) = 7[amqplib-764/node_modules/buffer-more-ints/package.json]
[fs] stat(7) = 576
[fs] pread(7, 576) = 576
[SYS] close(7[amqplib-764/node_modules/buffer-more-ints/package.json])
[SYS] close(5[amqplib-764/node_modules/buffer-more-ints])
[ModuleLoader] transpile(amqplib-764/node_modules/buffer-more-ints/buffer-more-ints.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/buffer-more-ints/buffer-more-ints.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/buffer-more-ints/buffer-more-ints.js) = 5[amqplib-764/node_modules/buffer-more-ints/buffer-more-ints.js]
[fs] stat(5) = 14078
[fs] pread(5, 14078) = 14078
[SYS] close(5[amqplib-764/node_modules/buffer-more-ints/buffer-more-ints.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/frame.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/frame.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/frame.js) = 5[amqplib-764/node_modules/amqplib/lib/frame.js]
[fs] stat(5) = 3386
[fs] pread(5, 3386) = 3386
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/frame.js])
[fs] open(amqplib-764/node_modules/@acuminous/) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/@acuminous], amqplib-764/node_modules/@acuminous/) = 1
[fs] open(amqplib-764/node_modules/@acuminous/bitsyntax) = fs.Dir{ .fd = 7 }
[fs] readdir(7[amqplib-764/node_modules/@acuminous/bitsyntax], amqplib-764/node_modules/@acuminous/bitsyntax/) = 9
[SYS] openat(7[amqplib-764/node_modules/@acuminous/bitsyntax], package.json) = 8
[fs] openat(7[amqplib-764/node_modules/@acuminous/bitsyntax], amqplib-764/node_modules/@acuminous/bitsyntax/package.json) = 8[amqplib-764/node_modules/@acuminous/bitsyntax/package.json]
[fs] stat(8) = 811
[fs] pread(8, 811) = 811
[SYS] close(8[amqplib-764/node_modules/@acuminous/bitsyntax/package.json])
[SYS] close(5[amqplib-764/node_modules/@acuminous])
[SYS] close(7[amqplib-764/node_modules/@acuminous/bitsyntax])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/index.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/index.js]
[fs] stat(5) = 394
[fs] pread(5, 394) = 394
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/index.js])
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib) = 5
[fs] readdir entry pattern.js
[fs] readdir entry constructor.js
[fs] readdir entry grammar.pegjs
[fs] readdir entry interp.js
[fs] readdir entry parse.js
[fs] readdir entry parser.js
[fs] readdir entry compile.js
[fs] readdir(5, amqplib-764/node_modules/@acuminous/bitsyntax/lib) = 7
[fs] open(amqplib-764/node_modules/@acuminous/bitsyntax/lib) = fs.Dir{ .fd = 5 }
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/lib/parse.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib/parse.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/lib/parse.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/parse.js]
[fs] stat(5) = 818
[fs] pread(5, 818) = 818
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/parse.js])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/lib/pattern.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib/pattern.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/lib/pattern.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/pattern.js]
[fs] stat(5) = 2864
[fs] pread(5, 2864) = 2864
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/pattern.js])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/lib/parser.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib/parser.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/lib/parser.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/parser.js]
[fs] stat(5) = 35219
[fs] pread(5, 35219) = 35219
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/parser.js])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/lib/interp.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib/interp.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/lib/interp.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/interp.js]
[fs] stat(5) = 6019
[fs] pread(5, 6019) = 6019
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/interp.js])
[fs] open(amqplib-764/node_modules/debug) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/debug], amqplib-764/node_modules/debug/) = 4
[SYS] openat(5[amqplib-764/node_modules/debug], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/debug], amqplib-764/node_modules/debug/package.json) = 7[amqplib-764/node_modules/debug/package.json]
[fs] stat(7) = 1454
[fs] pread(7, 1454) = 1454
[SYS] close(7[amqplib-764/node_modules/debug/package.json])
[SYS] close(5[amqplib-764/node_modules/debug])
[SYS] openat(-2, amqplib-764/node_modules/debug/src) = 5
[fs] readdir entry index.js
[fs] readdir entry node.js
[fs] readdir entry common.js
[fs] readdir entry browser.js
[fs] readdir(5, amqplib-764/node_modules/debug/src) = 4
[fs] open(amqplib-764/node_modules/debug/src) = fs.Dir{ .fd = 5 }
[SYS] close(5[amqplib-764/node_modules/debug/src])
[ModuleLoader] transpile(amqplib-764/node_modules/debug/src/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/debug/src/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/debug/src/index.js) = 5[amqplib-764/node_modules/debug/src/index.js]
[fs] stat(5) = 314
[fs] pread(5, 314) = 314
[SYS] close(5[amqplib-764/node_modules/debug/src/index.js])
[ModuleLoader] transpile(amqplib-764/node_modules/debug/src/node.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/debug/src/node.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/debug/src/node.js) = 5[amqplib-764/node_modules/debug/src/node.js]
[fs] stat(5) = 4728
[fs] pread(5, 4728) = 4728
[SYS] close(5[amqplib-764/node_modules/debug/src/node.js])
[fs] open(amqplib-764/node_modules/supports-color) = error.FileNotFound
[fs] open(amqplib-764/node_modules/supports-color) = error.FileNotFound
[fs] open(node_modules/) = fs.Dir{ .fd = 5 }
[fs] readdir(5[node_modules], node_modules/) = 91
[fs] open(node_modules/supports-color) = error.FileNotFound
[SYS] close(5[node_modules])
[fs] open(node_modules/supports-color) = error.FileNotFound
[Resolver] Bust amqplib-764/node_modules/debug/src = true, true
[fs] open(amqplib-764/node_modules/debug/src/) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/debug/src], amqplib-764/node_modules/debug/src/) = 4
[SYS] close(5[amqplib-764/node_modules/debug/src])
[fs] open(amqplib-764/node_modules/supports-color) = error.FileNotFound
[fs] open(amqplib-764/node_modules/supports-color) = error.FileNotFound
[fs] open(node_modules/supports-color) = error.FileNotFound
[fs] open(node_modules/supports-color) = error.FileNotFound
[ModuleLoader] transpile(amqplib-764/node_modules/debug/src/common.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/debug/src/common.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/debug/src/common.js) = 5[amqplib-764/node_modules/debug/src/common.js]
[fs] stat(5) = 6289
[fs] pread(5, 6289) = 6289
[SYS] close(5[amqplib-764/node_modules/debug/src/common.js])
[fs] open(amqplib-764/node_modules/ms) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/ms], amqplib-764/node_modules/ms/) = 4
[SYS] openat(5[amqplib-764/node_modules/ms], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/ms], amqplib-764/node_modules/ms/package.json) = 7[amqplib-764/node_modules/ms/package.json]
[fs] stat(7) = 705
[fs] pread(7, 705) = 705
[SYS] close(7[amqplib-764/node_modules/ms/package.json])
[SYS] close(5[amqplib-764/node_modules/ms])
[ModuleLoader] transpile(amqplib-764/node_modules/ms/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/ms/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/ms/index.js) = 5[amqplib-764/node_modules/ms/index.js]
[fs] stat(5) = 3023
[fs] pread(5, 3023) = 3023
[SYS] close(5[amqplib-764/node_modules/ms/index.js])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/lib/constructor.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib/constructor.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/lib/constructor.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/constructor.js]
[fs] stat(5) = 3842
[fs] pread(5, 3842) = 3842
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/constructor.js])
[fs] open(amqplib-764/node_modules/safe-buffer) = fs.Dir{ .fd = 5 }
[fs] readdir(5[amqplib-764/node_modules/safe-buffer], amqplib-764/node_modules/safe-buffer/) = 5
[SYS] openat(5[amqplib-764/node_modules/safe-buffer], package.json) = 7
[fs] openat(5[amqplib-764/node_modules/safe-buffer], amqplib-764/node_modules/safe-buffer/package.json) = 7[amqplib-764/node_modules/safe-buffer/package.json]
[fs] stat(7) = 783
[fs] pread(7, 783) = 783
[SYS] close(7[amqplib-764/node_modules/safe-buffer/package.json])
[SYS] close(5[amqplib-764/node_modules/safe-buffer])
[ModuleLoader] transpile(amqplib-764/node_modules/safe-buffer/index.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/safe-buffer/index.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/safe-buffer/index.js) = 5[amqplib-764/node_modules/safe-buffer/index.js]
[fs] stat(5) = 1529
[fs] pread(5, 1529) = 1529
[SYS] close(5[amqplib-764/node_modules/safe-buffer/index.js])
[ModuleLoader] transpile(amqplib-764/node_modules/@acuminous/bitsyntax/lib/compile.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/@acuminous/bitsyntax/lib/compile.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/@acuminous/bitsyntax/lib/compile.js) = 5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/compile.js]
[fs] stat(5) = 7943
[fs] pread(5, 7943) = 7943
[SYS] close(5[amqplib-764/node_modules/@acuminous/bitsyntax/lib/compile.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/mux.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/mux.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/mux.js) = 5[amqplib-764/node_modules/amqplib/lib/mux.js]
[fs] stat(5) = 3627
[fs] pread(5, 3627) = 3627
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/mux.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/heartbeat.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/heartbeat.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/heartbeat.js) = 5[amqplib-764/node_modules/amqplib/lib/heartbeat.js]
[fs] stat(5) = 3427
[fs] pread(5, 3427) = 3427
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/heartbeat.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/format.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/format.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/format.js) = 5[amqplib-764/node_modules/amqplib/lib/format.js]
[fs] stat(5) = 948
[fs] pread(5, 948) = 948
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/format.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/bitset.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/bitset.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/bitset.js) = 5[amqplib-764/node_modules/amqplib/lib/bitset.js]
[fs] stat(5) = 3007
[fs] pread(5, 3007) = 3007
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/bitset.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/error.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/error.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/error.js) = 5[amqplib-764/node_modules/amqplib/lib/error.js]
[fs] stat(5) = 673
[fs] pread(5, 673) = 673
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/error.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/credentials.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/credentials.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/credentials.js) = 5[amqplib-764/node_modules/amqplib/lib/credentials.js]
[fs] stat(5) = 1097
[fs] pread(5, 1097) = 1097
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/credentials.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/package.json, json, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/package.json) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/package.json) = 5[amqplib-764/node_modules/amqplib/package.json]
[fs] stat(5) = 828
[fs] pread(5, 828) = 828
[SYS] close(5[amqplib-764/node_modules/amqplib/package.json])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/channel_model.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/channel_model.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/channel_model.js) = 5[amqplib-764/node_modules/amqplib/lib/channel_model.js]
[fs] stat(5) = 8981
[fs] pread(5, 8981) = 8981
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/channel_model.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/channel.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/channel.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/channel.js) = 5[amqplib-764/node_modules/amqplib/lib/channel.js]
[fs] stat(5) = 15138
[fs] pread(5, 15138) = 15138
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/channel.js])
[ModuleLoader] transpile(amqplib-764/node_modules/amqplib/lib/api_args.js, jsx, sync)
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/api_args.js) = 5
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/api_args.js) = 5[amqplib-764/node_modules/amqplib/lib/api_args.js]
[fs] stat(5) = 8940
[fs] pread(5, 8940) = 8940
[SYS] close(5[amqplib-764/node_modules/amqplib/lib/api_args.js])
[STR] Latin1 100000 - UTF8 100000
[STR] Latin1 12 - UTF8 12
[uws] connect(localhost, 5672)
[alloc] new() = src.bun.js.api.bun.dns_resolver.InternalDNS.Request@114d04090
[SYS] FilePoll.init(0x20000ec0810, generation_number=1, fd=6403)
[SYS] register: FilePoll(0x20000ec0810, generation_number=1) machport (6403)
[dns] getaddrinfo(localhost) = cache miss (libinfo)
[Loop] ref 2 + 1 = 3
[SYS] onKQueueEvent: FilePoll(fd=6403, generation_number=1) = poll_machport | machport | one_shot | has_incremented_poll_count | was_ever_registered
[SYS] onUpdate kevent (fd: 6403) InternalDNSRequest
[Socket] onOpen ssl: false
[Listener] markActive
[EventLoop] enter() = 0
[STR] Latin1 8 - UTF8 8
[uws] us_socket_write(*anyopaque@8, 8) = 8
[Socket] write(8, false) = 8
[EventLoop] exit() = 0
[Socket] onData(516)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 516 UTF8 - 516 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[STR] latin1 encode 65531 - 7
[STR] latin1 encode 65524 - 1
[STR] latin1 encode 65519 - 7
[STR] latin1 encode 65511 - 7
[STR] latin1 encode 65504 - 1
[STR] UTF16 6 - UTF8 65499
[STR] latin1 encode 65492 - 8
[STR] latin1 encode 65484 - 1
[STR] latin1 encode 65479 - 15
[STR] latin1 encode 65463 - 11
[STR] latin1 encode 65452 - 1
[STR] latin1 encode 65447 - 35
[STR] latin1 encode 65411 - 12
[STR] latin1 encode 65399 - 1
[STR] latin1 encode 65393 - 18
[STR] latin1 encode 65375 - 1
[STR] latin1 encode 65372 - 26
[STR] latin1 encode 65346 - 1
[STR] latin1 encode 65343 - 10
[STR] latin1 encode 65333 - 1
[STR] latin1 encode 65330 - 22
[STR] latin1 encode 65308 - 1
[STR] latin1 encode 65305 - 18
[STR] latin1 encode 65287 - 1
[STR] latin1 encode 65284 - 28
[STR] latin1 encode 65256 - 1
[STR] latin1 encode 28 - 5
[STR] latin1 encode 6 - 5
[uws] us_socket_write(*anyopaque@8, 322) = 322
[Socket] write(322, false) = 322
[Socket] onData(20)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 20 UTF8 - 20 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[uws] us_socket_write(*anyopaque@8, 20) = 20
[Socket] write(20, false) = 20
[STR] latin1 encode 4 - 1
[uws] us_socket_write(*anyopaque@8, 16) = 16
[Socket] write(16, false) = 16
[Socket] onData(13)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 13 UTF8 - 12 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[alloc] new() = src.bun.js.api.Timer.TimerObject@1211040a0
[TimerObject] 0x1211040a0 ref 1 + 1 = 2
[Loop] ref 3 + 1 = 4
[alloc] new() = src.bun.js.api.Timer.TimerObject@121104100
[TimerObject] 0x121104100 ref 1 + 1 = 2
[STR] toUTF16 13 UTF8 - 12 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@121104160
[TimerObject] 0x121104160 ref 1 + 1 = 2
[EventLoop] enter() = 0
[TimerObject] 0x121104160 ref 2 + 1 = 3
[uws] us_socket_write(*anyopaque@8, 13) = 13
[Socket] write(13, false) = 13
[TimerObject] 0x121104160 deref 3 - 1 = 2
[TimerObject] 0x121104160 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(16)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 16 UTF8 - 15 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[TimerObject] 0x121104160 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@121104160
[STR] latin1 encode 10 - 4
[STR] toUTF16 24 UTF8 - 23 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@121104160
[TimerObject] 0x121104160 ref 1 + 1 = 2
[EventLoop] enter() = 0
[TimerObject] 0x121104160 ref 2 + 1 = 3
[uws] us_socket_write(*anyopaque@8, 24) = 24
[Socket] write(24, false) = 24
[TimerObject] 0x121104160 deref 3 - 1 = 2
[TimerObject] 0x121104160 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(25)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 25 UTF8 - 24 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[TimerObject] 0x121104160 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@121104160
[STR] latin1 encode 6 - 4
[STR] toUTF16 20 UTF8 - 19 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@121204080
[TimerObject] 0x121204080 ref 1 + 1 = 2
[EventLoop] enter() = 0
[TimerObject] 0x121204080 ref 2 + 1 = 3
[uws] us_socket_write(*anyopaque@8, 20) = 20
[Socket] write(20, false) = 20
[TimerObject] 0x121204080 deref 3 - 1 = 2
[TimerObject] 0x121204080 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(16)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 16 UTF8 - 15 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[STR] latin1 encode 6 - 4
[STR] toUTF16 47 UTF8 - 44 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 4096 UTF8 - 4096 UTF16
[STR] toUTF16 1896 UTF8 - 1895 UTF16
[STR] latin1 encode 12 - 7
[STR] toUTF16 26 UTF8 - 25 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@121304080
[TimerObject] 0x121304080 ref 1 + 1 = 2
[EventLoop] enter() = 0
[TimerObject] 0x121304080 ref 2 + 1 = 3
[uws] us_socket_write(*anyopaque@8, 47) = 47
[Socket] write(47, false) = 47
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 4096) = 4096
[Socket] write(4096, false) = 4096
[uws] us_socket_write(*anyopaque@8, 1896) = 1896
[Socket] write(1896, false) = 1896
[uws] us_socket_write(*anyopaque@8, 26) = 26
[Socket] write(26, false) = 26
[TimerObject] 0x121304080 deref 3 - 1 = 2
[TimerObject] 0x121304080 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(12)
[Listener] markActive
[EventLoop] enter() = 0
[TimerObject] 0x121304080 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@121304080
[TimerObject] 0x121204080 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@121204080
[STR] toUTF16 12 UTF8 - 11 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[alloc] new() = src.bun.js.api.Timer.TimerObject@121404080
[TimerObject] 0x121404080 ref 1 + 1 = 2
[STR] latin1 encode 19 - 14
[uws] us_socket_write(*anyopaque@8, 33) = 33
[Socket] write(33, false) = 33
[EventLoop] enter() = 0
[TimerObject] 0x121404080 ref 2 + 1 = 3
[TimerObject] 0x121404080 deref 3 - 1 = 2
[TimerObject] 0x121404080 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(12)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 12 UTF8 - 11 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[TimerObject] 0x1211040a0 deref 2 - 1 = 1
[Loop] unref 4 - 1 = 3
[TimerObject] 0x121104100 deref 2 - 1 = 1
[Socket] end(0 args)
[Socket] onClose
[Loop] sub 1 - 1 = 0
[Listener] markActive
[EventLoop] enter() = 1
[Listener] markInactive
[EventLoop] exit() = 1
[Listener] markInactive
[uws] us_socket_context_close(105553124704256)
[STR] Latin1 12 - UTF8 12
[uws] connect(localhost, 5672)
[dns] getaddrinfo(localhost) = cache hit
[Loop] ref 4 + 1 = 5
[Socket] onOpen ssl: false
[Listener] markActive
[EventLoop] enter() = 0
[TimerObject] 0x121404080 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@121404080
[STR] Latin1 8 - UTF8 8
[uws] us_socket_write(*anyopaque@8, 8) = 8
[Socket] write(8, false) = 8
[EventLoop] exit() = 0
[Socket] onData(516)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 516 UTF8 - 516 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[STR] latin1 encode 65531 - 7
[STR] latin1 encode 65524 - 1
[STR] latin1 encode 65519 - 7
[STR] latin1 encode 65511 - 7
[STR] latin1 encode 65504 - 1
[STR] UTF16 6 - UTF8 65499
[STR] latin1 encode 65492 - 8
[STR] latin1 encode 65484 - 1
[STR] latin1 encode 65479 - 15
[STR] latin1 encode 65463 - 11
[STR] latin1 encode 65452 - 1
[STR] latin1 encode 65447 - 35
[STR] latin1 encode 65411 - 12
[STR] latin1 encode 65399 - 1
[STR] latin1 encode 65393 - 18
[STR] latin1 encode 65375 - 1
[STR] latin1 encode 65372 - 26
[STR] latin1 encode 65346 - 1
[STR] latin1 encode 65343 - 10
[STR] latin1 encode 65333 - 1
[STR] latin1 encode 65330 - 22
[STR] latin1 encode 65308 - 1
[STR] latin1 encode 65305 - 18
[STR] latin1 encode 65287 - 1
[STR] latin1 encode 65284 - 28
[STR] latin1 encode 65256 - 1
[STR] latin1 encode 28 - 5
[STR] latin1 encode 6 - 5
[uws] us_socket_write(*anyopaque@8, 322) = 322
[Socket] write(322, false) = 322
[Socket] onData(20)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 20 UTF8 - 20 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[uws] us_socket_write(*anyopaque@8, 20) = 20
[Socket] write(20, false) = 20
[STR] latin1 encode 4 - 1
[uws] us_socket_write(*anyopaque@8, 16) = 16
[Socket] write(16, false) = 16
[Socket] onData(13)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 13 UTF8 - 12 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[alloc] new() = src.bun.js.api.Timer.TimerObject@121404080
[TimerObject] 0x121404080 ref 1 + 1 = 2
[Loop] ref 4 + 1 = 5
[alloc] new() = src.bun.js.api.Timer.TimerObject@1214040e0
[TimerObject] 0x1214040e0 ref 1 + 1 = 2
[STR] toUTF16 13 UTF8 - 12 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@121404140
[TimerObject] 0x121404140 ref 1 + 1 = 2
[EventLoop] enter() = 0
[TimerObject] 0x121404140 ref 2 + 1 = 3
[uws] us_socket_write(*anyopaque@8, 13) = 13
[Socket] write(13, false) = 13
[TimerObject] 0x121404140 deref 3 - 1 = 2
[TimerObject] 0x121404140 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(16)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 16 UTF8 - 15 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[STR] latin1 encode 6 - 4
[STR] toUTF16 20 UTF8 - 19 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@1214041a0
[TimerObject] 0x1214041a0 ref 1 + 1 = 2
[EventLoop] enter() = 0
[TimerObject] 0x1214041a0 ref 2 + 1 = 3
[uws] us_socket_write(*anyopaque@8, 20) = 20
[Socket] write(20, false) = 20
[TimerObject] 0x1214041a0 deref 3 - 1 = 2
[TimerObject] 0x1214041a0 deref 2 - 1 = 1
[EventLoop] exit() = 0
[Socket] onData(14280)
[TimerObject] 0x121404140 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@121404140
[TimerObject] 0x1214041a0 deref 1 - 1 = 0
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@1214041a0
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 14280 UTF8 - 14282 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[Socket] onData(85977)
[Listener] markActive
[EventLoop] enter() = 0
[STR] toUTF16 85977 UTF8 - 85996 UTF16
[Listener] markInactive
[EventLoop] exit() = 0
[STR] toUTF16 85977 UTF8 - 85996 UTF16
[SYS] openat(-2, amqplib-764/node_modules/amqplib/lib/frame.js) = 9
[fs] openat([invalid_fd], amqplib-764/node_modules/amqplib/lib/frame.js) = 9[amqplib-764/node_modules/amqplib/lib/frame.js]
[fs] stat(9) = 3386
[fs] pread(9, 3386) = 3386
[SYS] close(9[amqplib-764/node_modules/amqplib/lib/frame.js])
[STR] latin1 encode 12 - 7
[STR] toUTF16 26 UTF8 - 25 UTF16
[alloc] new() = src.bun.js.api.Timer.TimerObject@121504080
[TimerObject] 0x121504080 ref 1 + 1 = 2
Can you tell me if this problem can be fixed in time?
It will be
θΏε°ζ―
I have used bun in a production environment. We are currently waiting for this issue to be fixed. I hope it's fixed soon. Thank you, brother.
By leveraging the readable-stream
package and using bun patch
, I was able to have @cressie176's repository working. Working example in mathieu-bour/amqplib-764. The following commands now pass:
bun index.js 50000
OK
bun index.js 200000
OK
Here is the patch:
diff --git a/lib/connection.js b/lib/connection.js
index 1c58ac5f04bdecc23123fa70cbd07f464787233e..cb24a0951629f752ba3c1b53bf6a6cecdcc01db7 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -10,9 +10,7 @@ var frame = require('./frame');
var HEARTBEAT = frame.HEARTBEAT;
var Mux = require('./mux').Mux;
-var Duplex =
- require('stream').Duplex ||
- require('readable-stream/duplex');
+var Duplex = require('readable-stream').Duplex;
var EventEmitter = require('events');
var Heart = require('./heartbeat').Heart;
@@ -22,8 +20,7 @@ var inspect = require('./format').inspect;
var BitSet = require('./bitset').BitSet;
var fmt = require('util').format;
-var PassThrough = require('stream').PassThrough ||
- require('readable-stream/passthrough');
+var PassThrough = require('readable-stream').PassThrough;
var IllegalOperationError = require('./error').IllegalOperationError;
var stackCapture = require('./error').stackCapture;
diff --git a/test/frame.js b/test/frame.js
index 53551afc016a419e8ef3f2e36d9f47385d4e51dd..ad3eb25e0b4e1ab57041fe76e32aac832683050e 100644
--- a/test/frame.js
+++ b/test/frame.js
@@ -6,9 +6,8 @@ var fail = require('./util').fail;
var connection = require('../lib/connection');
var Frames = connection.Connection;
var HEARTBEAT = require('../lib/frame').HEARTBEAT;
-var Stream = require('stream');
-var PassThrough = Stream.PassThrough ||
- require('readable-stream/passthrough');
+var Stream = require('readable-stream');
+var PassThrough = Stream.PassThrough;
var defs = require('../lib/defs');
diff --git a/test/mux.js b/test/mux.js
index b785ac0563c727bfa7567a97c2461924695f95b6..a9daef74da3897356262f523b9ec041a3b14b650 100644
--- a/test/mux.js
+++ b/test/mux.js
@@ -2,8 +2,7 @@
var assert = require('assert');
var Mux = require('../lib/mux').Mux;
-var PassThrough = require('stream').PassThrough ||
- require('readable-stream/passthrough');
+var PassThrough = require('readable-stream').PassThrough;
var latch = require('./util').latch;
var schedule = require('./util').schedule;
diff --git a/test/util.js b/test/util.js
index 0cc8122d6b481ff013ab89227638505d17da8d0d..69c0de7d994c9814f4e33de9d68422b272ffa435 100644
--- a/test/util.js
+++ b/test/util.js
@@ -2,9 +2,7 @@
var crypto = require('crypto');
var Connection = require('../lib/connection').Connection;
-var PassThrough =
- require('stream').PassThrough ||
- require('readable-stream/passthrough');
+var PassThrough = require('readable-stream').PassThrough;
var defs = require('../lib/defs');
var assert = require('assert');
It is of course far from ideal and should be considered as a workaround for [email protected] + [email protected] only. This patch clearly shows that the errors is related by the stream
package though.
@Jarred-Sumner any thoughts?
Any ETA on this? I have to consider whether to temporarily move a service that is failing on big rabbitmq payloads to node or just wait for a fix on bun depending on the ETA.
The issue has been opened for almost a year.
Thanks @mathieu-bour, your fix worked for me!
By leveraging the
readable-stream
package and usingbun patch
, I was able to have @cressie176's repository working. Working example in mathieu-bour/amqplib-764. The following commands now pass:bun index.js 50000 OK bun index.js 200000 OK
Here is the patch: diff --git a/lib/connection.js b/lib/connection.js index 1c58ac5f04bdecc23123fa70cbd07f464787233e..cb24a0951629f752ba3c1b53bf6a6cecdcc01db7 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -10,9 +10,7 @@ var frame = require('./frame'); var HEARTBEAT = frame.HEARTBEAT; var Mux = require('./mux').Mux;
-var Duplex =
- require('stream').Duplex ||
- require('readable-stream/duplex'); +var Duplex = require('readable-stream').Duplex; var EventEmitter = require('events'); var Heart = require('./heartbeat').Heart;
@@ -22,8 +20,7 @@ var inspect = require('./format').inspect;
var BitSet = require('./bitset').BitSet; var fmt = require('util').format; -var PassThrough = require('stream').PassThrough ||
- require('readable-stream/passthrough'); +var PassThrough = require('readable-stream').PassThrough; var IllegalOperationError = require('./error').IllegalOperationError; var stackCapture = require('./error').stackCapture;
diff --git a/test/frame.js b/test/frame.js index 53551afc016a419e8ef3f2e36d9f47385d4e51dd..ad3eb25e0b4e1ab57041fe76e32aac832683050e 100644 --- a/test/frame.js +++ b/test/frame.js @@ -6,9 +6,8 @@ var fail = require('./util').fail; var connection = require('../lib/connection'); var Frames = connection.Connection; var HEARTBEAT = require('../lib/frame').HEARTBEAT; -var Stream = require('stream'); -var PassThrough = Stream.PassThrough ||
- require('readable-stream/passthrough'); +var Stream = require('readable-stream'); +var PassThrough = Stream.PassThrough;
var defs = require('../lib/defs');
diff --git a/test/mux.js b/test/mux.js index b785ac0563c727bfa7567a97c2461924695f95b6..a9daef74da3897356262f523b9ec041a3b14b650 100644 --- a/test/mux.js +++ b/test/mux.js @@ -2,8 +2,7 @@
var assert = require('assert'); var Mux = require('../lib/mux').Mux; -var PassThrough = require('stream').PassThrough ||
- require('readable-stream/passthrough'); +var PassThrough = require('readable-stream').PassThrough;
var latch = require('./util').latch; var schedule = require('./util').schedule; diff --git a/test/util.js b/test/util.js index 0cc8122d6b481ff013ab89227638505d17da8d0d..69c0de7d994c9814f4e33de9d68422b272ffa435 100644 --- a/test/util.js +++ b/test/util.js @@ -2,9 +2,7 @@
var crypto = require('crypto'); var Connection = require('../lib/connection').Connection; -var PassThrough =
- require('stream').PassThrough ||
- require('readable-stream/passthrough'); +var PassThrough = require('readable-stream').PassThrough; var defs = require('../lib/defs'); var assert = require('assert'); It is of course far from ideal and should be considered as a workaround for [email protected] + [email protected] only. This patch clearly shows that the errors is related by the
stream
package though.@Jarred-Sumner any thoughts?
I don't understand how i can use this patch. Could you explain please ? Will be it applied in next version of Bun ?
It is of course far from ideal and should be considered as a workaround for [email protected] + [email protected] only. This patch clearly shows that the errors is related by the
stream
package though.@Jarred-Sumner any thoughts?
I don't understand how i can use this patch. Could you explain please ? Will be it applied in next version of Bun ?
Well, create a dir patches
in your project and the file [email protected]
in it. Then put the code from the comment above there, and that might work idk.