SIGSEGV in pthread_join() from /lib64/libpthread.so.0

221 views
Skip to first unread message

Andy

unread,
Apr 13, 2017, 7:13:47 AM4/13/17
to fix8 support
Hi

I am new to fix8.  I am following the document and testing fix8 test programs.

I tried running these 2 commands.

hftest -sol server
hftest -l client -p 500000 -u 50000 -c coro_hf_client.xml


I got a "Segmentation fault" on the server side, after I typed "x" on client side to exit the program.

$ ./hftest -sol server
Threaded mode.
Session(1) finished.
Segmentation fault (core dumped)


Here's the stack dump.
(gdb) where
#0  0x0000003099a08143 in pthread_join () from /lib64/libpthread.so.0
#1  0x0000000000421786 in FIX8::_f8_threadcore::join (this=this@entry=0xbb44b0, timeoutInMs=timeoutInMs@entry=0) at ../include/fix8/thread.hpp:129
#2  0x00000000004299bb in FIX8::_f8_threadcore::~_f8_threadcore (this=0xbb44b0, __in_chrg=<optimized out>) at ../include/fix8/thread.hpp:110
#3  FIX8::f8_thread<FIX8::AsyncSocket<FIX8::Message*> >::~f8_thread (this=0xbb44b0, __in_chrg=<optimized out>) at ../include/fix8/thread.hpp:285
#4  FIX8::AsyncSocket<FIX8::Message*>::~AsyncSocket (this=0xbb43b8, __in_chrg=<optimized out>) at ../include/fix8/connection.hpp:77
#5  FIX8::FIXWriter::~FIXWriter (this=0xbb43b8, __in_chrg=<optimized out>) at ../include/fix8/connection.hpp:354
#6  FIX8::Connection::~Connection (this=0xbb4170, __in_chrg=<optimized out>) at ../include/fix8/connection.hpp:545
#7  0x0000000000429bc1 in FIX8::ServerConnection::~ServerConnection (this=0xbb4170, __in_chrg=<optimized out>) at ../include/fix8/connection.hpp:749
#8  FIX8::ServerConnection::~ServerConnection (this=0xbb4170, __in_chrg=<optimized out>) at ../include/fix8/connection.hpp:749
#9  FIX8::SessionInstance<hf_session_server>::~SessionInstance (this=0xb17e20, __in_chrg=<optimized out>) at ../include/fix8/sessionwrapper.hpp:655
#10 0x0000000000429ca6 in FIX8::SessionInstance<hf_session_server>::~SessionInstance (this=0xb17e20, __in_chrg=<optimized out>) at ../include/fix8/sessionwrapper.hpp:707
#11 0x00000000004302b6 in std::default_delete<FIX8::SessionInstanceBase>::operator() (this=<optimized out>, __ptr=0xb17e20) at /app/sysmmbuild/gcc-5.2.0/include/c++/5.2.0/bits/unique_ptr.h:76
#12 main (argc=<optimized out>, argv=<optimized out>) at /app/sysmmbuild/gcc-5.2.0/include/c++/5.2.0/bits/unique_ptr.h:236


Anyone encountered this, and share some advices?


Thanks,
Andy

Howard Davidson

unread,
Apr 14, 2017, 3:35:24 AM4/14/17
to fix8 support
Hi Andy

I've been experimenting with various flavours (fastflow, tbb, tbbmalloc,.. ), library patches around session stop/tread joins and threaded/pipelined mode and I am struggling to find full resolution of issues around Session::stop(), especially with ReliableClientSession.

I wonder if these issues (segv, unhandled throw on writer/reader thread join, or hang on shutdown on blocking io call) are resolved in the pro version. There are some clues on this group, the fix8-developer one, and in the code that suggests issues with Session::stop are known, and potentially addressed in the commercial copy of this library.

Cheers
Howard

dakka

unread,
Apr 14, 2017, 3:39:17 AM4/14/17
to fix8 support
These issues have been resolved in Fix8Pro, the commercial version.
/dakka

gunjan.m...@gmail.com

unread,
Apr 11, 2018, 5:23:05 PM4/11/18
to fix8 support
The issue occurs due to join with thread id 0, this occurs because the thread is not initialized due to some reason(in my case it was due to the fact that my model was not pipeline). Anyway add 0 check for thread id in the join function and it will work fine.

Victor Kovalevich

unread,
Apr 19, 2018, 12:36:53 PM4/19/18
to fix8 support
Hi,

It looks like the issue i have run into.
Please take a look at
https://groups.google.com/forum/#!topic/fix8-support/Y-e0kBeGL-M
https://groups.google.com/forum/#!topic/fix8-support/DJxdJDDgHKk

Sincerely,
Victor Kovalevich
Reply all
Reply to author
Forward
0 new messages