zeromq.js
zeromq.js copied to clipboard
Receive a SIGSEGV(Address boundary error) while executing Proxy example code.
Describe the bug I've done some modification of this example(code is pasted under Reproducing section):
http://zeromq.github.io/zeromq.js/classes/proxy.html
Then execute it. After about 20s, there is a segment fault error:
fish: './node_modules/.bin/ts-node ./l…' terminated by signal SIGSEGV (Address boundary error)
Reproducing
hacksign@XSignLaptop [09:56:49] : ~/Code/blogstation/blog-station
>> ./node_modules/.bin/ts-node ./libmq/zmq-proxy.ts
fish: './node_modules/.bin/ts-node ./l…' terminated by signal SIGSEGV (Address boundary error)
hacksign@XSignLaptop [09:57:22] : ~/Code/blogstation/blog-station
>> cat ./libmq/zmq-proxy.ts
import { Proxy, Router, Dealer } from 'zeromq';
const proxy = new Proxy(new Router, new Dealer)
proxy.frontEnd.bind("tcp://*:5559")
.then(
() => proxy.backEnd.bind("tcp://*:5560").then(
() => {}
)
).then(
() => proxy.run()
);
Still got same error, after modified like this:
import { Proxy, Router, Dealer } from 'zeromq';
const proxy = new Proxy(new Router, new Dealer)
proxy.frontEnd.bind("tcp://*:5559")
.then(
() => proxy.backEnd.bind("tcp://*:5560").then(
() => {}
).then(
() => proxy.run() // avoid async problems....
)
);
Expected behavior The process keep running until terminated manually.
Tested on
- OS:
Archlinux 5.8.12-arch1-1
- ZeroMQ.js version: [e.g. 5.1.0, 6.0.0-beta.2]
"zeromq": "^6.0.0-beta.6"
- Node version:
v14.13.0