Skip to content
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

Pub-Proxy-Sub Mode,High frequency sending long message,easy to cause release error after cache application #877

Open
PoincareX opened this issue Apr 19, 2022 · 2 comments

Comments

@PoincareX
Copy link

In the program, the message sending length is more than 4K bytes and the frequency is more than 1 millisecond. After a long time of execution, it is easy to produce abort error.

Viewing the coredump information, it is easy to make mistakes when applying for or releasing the buffer size in the ZMQ API interface zmq_msg_init_size or zmq_msg_close. If the sending frequency remains unchanged, there will be no error when reducing the message length (such as 1K bytes).

Has anyone ever had a similar problem?

@poyea
Copy link
Contributor

poyea commented Apr 19, 2022

Hey there. You'll likely get higher visibility / possible answers on https://github.com/zeromq/libzmq. What's your guess on why this is happening (or what's the specific errors under each case)?

@PoincareX
Copy link
Author

Yes, the program use the libzmq, coredump for 2 examples are as follows:

Example 1:
(gdb) bt
#0 0x080b12bc in zmq::msg_t::data (this=0x7e6eddc) at ../ksm_app/zmq/src/msg.cpp:401
#1 0x0810b9da in zmq_msg_data (msg_=0x7e6eddc) at ../ksm_app/zmq/src/zmq.cpp:666
#2 0x0806be1a in ipc_socket2_send (this=0x8191950, topic_len=45, topic=0x8116ff0, msg_len=4108, msg=0x7e6eea0)

(gdb) info threads
Id Target Id Frame
10 pid 1081387 tid 10 (CONDVAR) 0x01045808 in SyncCondvarWait_r ()
from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3

  • 9 pid 1081387 tid 9 (STOPPED) 0x080b12bc in zmq::msg_t::data (this=0x7e6eddc) at ../ksm_app/zmq/src/msg.cpp:401
    8 pid 1081387 tid 8 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
    from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    7 pid 1081387 tid 7 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
    from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    6 pid 1081387 tid 6 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
    from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    5 pid 1081387 tid 5 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    4 pid 1081387 tid 4 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    3 pid 1081387 tid 3 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    1 pid 1081387 tid 1 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
    from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3

Example 2:
(gdb) bt
#0 0x0106ca40 in generic_memcpy () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
#1 0x08100b00 in zmq::encoder_base_tzmq::v3_1_encoder_t::encode (this=0x8163638, data
=0x7ecff20, size
=1111)
at ../ksm_app/zmq/src/encoder.hpp:119
#2 0x080f09ce in zmq::stream_engine_base_t::out_event (this=0x81a22c0)
at ../ksm_app/zmq/src/stream_engine_base.cpp:358
#3 0x080c44e6 in zmq::poll_t::loop (this=0x814d230) at ../ksm_app/zmq/src/poll.cpp:177
#4 0x080c6ac2 in zmq::worker_poller_base_t::worker_routine (arg_=0x814d230) at ../ksm_app/zmq/src/poller_base.cpp:146
#5 0x080f6832 in thread_routine (arg_=0x814d280) at ../ksm_app/zmq/src/thread.cpp:257
#6 0x010257bc in timer_settime () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
(gdb) info threads
Id Target Id Frame
10 pid 1130533 tid 10 (NANOSLEEP) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
9 pid 1130533 tid 9 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
8 pid 1130533 tid 8 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3

  • 7 pid 1130533 tid 7 (READY) 0x0106ca40 in __generic_memcpy () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    6 pid 1130533 tid 6 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
    from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    5 pid 1130533 tid 5 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    4 pid 1130533 tid 4 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    3 pid 1130533 tid 3 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    2 pid 1130533 tid 2 (STOPPED) 0x01045ba4 in TimerTimeout () from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3
    1 pid 1130533 tid 1 (SIGWAITINFO) 0x01045794 in SignalWaitinfo ()
    from C:\qnx660\target\qnx6\armle-v7\lib\libc.so.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants