jzmq 3.1.0崩溃&我们的Java应用程序崩溃在PUB / SUB原型运行

时间:2017-12-06 01:07:02

标签: java zeromq

问题说明

我们的应用程序使用Java绑定ZMQ,使用Pub-Sub模型。子程序间歇性但频繁地崩溃,错误跟踪(在崩溃期间生成的核心转储中看到)指向ZMQ崩溃。

问题出现在我们的生产中,负载很高。

环境

版本:jzmq(3.1.0) 操作系统:Linux

最小测试代码/重现问题的步骤

将jzmq(3.1.0)与Pub-Sub模型一起使用。继续从Pub发送消息一段时间。

实际结果是什么? (包括断言消息和调用堆栈,如果适用)

ZMQ崩溃并发出以下消息。

核心转储痕迹:

崩溃 1

0 0x00002b0169da7fc5 in raise () from /lib64/libc.so.6
1 0x00002b0169da9a70 in abort () from /lib64/libc.so.6
2 0x00002b0190f1dce9 in zmq::zmq_abort (errmsg_=0x4409 <Address 0x4409 out of bounds>) at err.cpp:76 
3 0x00002b0190f344c8 in zmq::stream_engine_t::write (this=, data_=, size_=) at stream_engine.cpp:517
4 0x00002b0190f34709 in zmq::stream_engine_t::out_event (this=0x1865cbf0) at stream_engine.cpp:275
5 0x00002b0190f1d3ba in zmq::epoll_t::loop (this=0x2b017f34d490) at epoll.cpp:158
6 0x00002b0190f3b28c in thread_routine (arg_=0x2b017f34d500) at thread.cpp:83
7 0x00002b016974783d in start_thread () from /lib64/libpthread.so.0
8 0x00002b0169e4d19d in clone () from /lib64/libc.so.6

崩溃 2

0 0x00002b121f0444bb in memcpy () from /lib64/libc.so.6
1 0x00002b12420f5a02 in zmq::encoder_base_tzmq::v1_encoder_t::get_data (this=0x1cdd1110, data_=0x1cafc958, size_=0x1cafc960, offset_=0x0) at encoder.hpp:117
2 0x00002b12420e86f2 in zmq::stream_engine_t::out_event (this=0x1cafc910) at stream_engine.cpp:261
3 0x00002b12420e1202 in zmq::session_base_t::read_activated (this=0x1cafcb50, pipe_=0x1be54720) at session_base.cpp:264
4 0x00002b12420d27e9 in zmq::io_thread_t::in_event (this=) at io_thread.cpp:75
5 0x00002b12420d13da in zmq::epoll_t::loop (this=0x2b1234fea0b0) at epoll.cpp:162
6 0x00002b12420ef28c in thread_routine (arg_=0x2b1234fea120) at thread.cpp:83
7 0x00002b121e99883d in start_thread () from /lib64/libpthread.so.0
8 0x00002b121f09e19d in clone () from /lib64/libc.so.6
(gdb) bt

崩溃 3

0 0x00002b10f9bcdfc5 in raise () from /lib64/libc.so.6
1 0x00002b10f9bcfa70 in abort () from /lib64/libc.so.6
2 0x00002b1124d92ce9 in zmq::zmq_abort (errmsg_=0x3d41 <Address 0x3d41 out of bounds>) at err.cpp:76
3 0x00002b1124da94c8 in zmq::stream_engine_t::write (this=, data_=, size_=) at stream_engine.cpp:517
4 0x00002b1124da9709 in zmq::stream_engine_t::out_event (this=0x8adb440) at stream_engine.cpp:275
5 0x00002b1124d923ba in zmq::epoll_t::loop (this=0x2b111c2cf500) at epoll.cpp:158
6 0x00002b1124db028c in thread_routine (arg_=0x2b111c2cf570) at thread.cpp:83
7 0x00002b10f956d83d in start_thread () from /lib64/libpthread.so.0
8 0x00002b10f9c7319d in clone () from /lib64/libc.so.6

预期结果是什么?

它应该继续运行,没有任何崩溃。

我们是否应该转移到基于libzmq 4.1.7的Jeromq(https://github.com/zeromq/jeromq) - 因为最新版本会修复这些问题吗?

你能建议/帮我解决这个问题吗?

0 个答案:

没有答案