eos_zmq_plugin icon indicating copy to clipboard operation
eos_zmq_plugin copied to clipboard

Segmentation fault

Open ghost opened this issue 7 years ago • 4 comments

Hi,

I wanted to use the zmq plugin for some analytics but got a segmentation fault.

Environment:

  • Ubuntu 18.04
  • EOSIO latest / git head ( > v1.5.1)

GDB Output:

_gdb --args ./nodeos --disable-replay-opts --hard-replay-blockchain --data-dir /mnt/hdd1/crypto/eos.mainnet/data --plugin eosio::zmq_plugin .. .. (gdb) r Starting program: /home/jj/projects/lcc/analytics/eos/modules/nodeos/bin/nodeos --disable-replay-opts --replay-blockchain --hard-replay-blockchain --data-dir /mnt/hdd1/crypto/eos.mainnet/data --plugin eosio::zmq_plugin [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff50bd700 (LWP 3168)] [New Thread 0x7ffff48bc700 (LWP 3169)] info 2018-12-15T17:25:34.235 thread-0 zmq_plugin.cpp:648 plugin_initialize ] Binding to ZMQ PUSH socket tcp://127.0.0.1:5556

Thread 1 "nodeos" received signal SIGSEGV, Segmentation fault. 0x0000000000fd4f66 in eosio::zmq_plugin::plugin_initialize(boost::program_options::variables_map const&) ()_

Best Regards, Jiri / EOS Germany

nodeos_strace.log

ghost avatar Dec 15 '18 17:12 ghost

Update:

nodeos --version - 1.5.x // Segmentation fault nodeos --version - 1.4.5 // working well

ramtej avatar Dec 15 '18 18:12 ramtej

1.5.1 and the current develop branch work fine for me:

"server_version_string": "v1.5.1-84-g45cd5686c"
Ubuntu 18.04.1 LTS

cc32d9 avatar Dec 17 '18 15:12 cc32d9

Found the problem: when you specify the plugin in command line, it overrides the standard plugin initialization sequence. As ZMQ plugin depends on chain plugin, the chain plugin has to be loaded first. This works:

/usr/local/eosio/bin/nodeos --plugin eosio::chain_plugin  --plugin eosio::zmq_plugin

cc32d9 avatar Dec 17 '18 16:12 cc32d9

Thank you. Can reproduce it.

Additional note: the chain_plugin must be defined BEFORE the zmq_plugin on the command line.

ramtej avatar Dec 17 '18 16:12 ramtej