cc32d9 / eos_zmq_plugin

ZeroMQ plugin for EOS.io nodeos
50 stars 28 forks source link

Segmentation fault #6

Open ramtej opened 5 years ago

ramtej commented 5 years ago

Hi,

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

Environment:

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::variablesmap const&) ()

Best Regards, Jiri / EOS Germany

nodeos_strace.log

ramtej commented 5 years ago

Update:

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

cc32d9 commented 5 years ago

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 commented 5 years ago

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
ramtej commented 5 years ago

Thank you. Can reproduce it.

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