XSpeed测试出现SIGSEGV
Opened this issue · 0 comments
环境:LinuxMint 17.1 - 64bit,编译器是缺省安装
测试代码:
static void test_XSpeed_Main (string[] args)
{
ApiManager.QueuePath = @"libQuantBox_Queue.so";
api = ApiManager.CreateApi (@"libQuantBox_XSpeed_Quote.so");
api.Server.BrokerID = "";
api.Server.Address = "tcp://203.86.95.181:10915";
api.User.UserID = "XXXXX";
api.User.Password = "XXX";
api.OnConnectionStatus = OnConnectionStatus;
api.OnRtnDepthMarketData = OnRtnDepthMarketData;
Console.WriteLine ("Connect");
api.Connect ();
Console.WriteLine ("Connect Finished");
Console.ReadKey ();
Console.WriteLine ("Subscribe");
api.Subscribe ("IF1411", "");
Console.WriteLine ("Subscribe Finished");
Console.ReadKey ();
ApiManager.ReleaseApi (api);
Console.WriteLine ("Done");
}
出错现象:
Connect
Connect Finished
11111Initialized
11111Connecting
11111Connected
11111Logining
Native stacktrace:
/usr/bin/cli() [0x4accac]
/usr/bin/cli() [0x42a849]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f2e5a867340]
Debug info from gdb:
11111Disconnected
[New LWP 2850]
[New LWP 2849]
[New LWP 2848]
[New LWP 2847]
[New LWP 2845]
[New LWP 2844]
[New LWP 2843]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f2e5a8663bd in read () from /lib/x86_64-linux-gnu/libpthread.so.0
Id Target Id Frame
8 Thread 0x7f2e57fff700 (LWP 2843) "Finalizer" 0x00007f2e5a865680 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
7 Thread 0x7f2e573ff700 (LWP 2844) "Timer-Scheduler" 0x00007f2e5a863414 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
6 Thread 0x7f2e56d5c700 (LWP 2845) "cli" 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
5 Thread 0x7f2e55cd9700 (LWP 2847) "cli" 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
4 Thread 0x7f2e554d8700 (LWP 2848) "cli" 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
3 Thread 0x7f2e54cd7700 (LWP 2849) "cli" 0x00007f2e5a866ee9 in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
2 Thread 0x7f2e3ffff700 (LWP 2850) "cli" 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
- 1 Thread 0x7f2e5b38a7c0 (LWP 2841) "cli" 0x00007f2e5a8663bd in read () from /lib/x86_64-linux-gnu/libpthread.so.0
Thread 8 (Thread 0x7f2e57fff700 (LWP 2843)):
#0 0x00007f2e5a865680 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x0000000000619238 in mono_sem_wait ()
#2 0x000000000059d02d in ?? ()
#3 0x0000000000582484 in ?? ()
#4 0x000000000061e0b6 in ?? ()
#5 0x00007f2e5a85f182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f2e5a58c00d in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 7 (Thread 0x7f2e573ff700 (LWP 2844)):
#0 0x00007f2e5a863414 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000005f840b in ?? ()
#2 0x000000000060b70b in ?? ()
#3 0x00000000005810ae in ?? ()
#4 0x0000000000581ea9 in ?? ()
#5 0x0000000040dd225d in ?? ()
#6 0x0000000000000000 in ?? ()
Thread 6 (Thread 0x7f2e56d5c700 (LWP 2845)):
#0 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f2e57a43b75 in __gthread_cond_timedwait (__cond=0xef0ad8, __mutex=0xef0ab0, __abs_timeout=0x7f2e56d5bcc0) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8/bits/gthr-default.h:871
#2 0x00007f2e57a44a42 in std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (this=0xef0ad8, __lock=..., __atime=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/condition_variable:160
#3 0x00007f2e57a44795 in std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (this=0xef0ad8, __lock=..., __atime=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/condition_variable:100
#4 0x00007f2e57a444df in std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (this=0xef0ad8, __lock=..., __rtime=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/condition_variable:132
#5 0x00007f2e57a43af9 in CMsgQueue::RunInThread (this=0xef0aa0) at /home/mep/dev/broker/src/QuantBox_XAPI/QuantBox_Queue/MsgQueue.cpp:98
#6 0x00007f2e57a443b3 in CMsgQueue::ProcessThread (lpParam=0xef0aa0) at /home/mep/dev/broker/src/QuantBox_XAPI/QuantBox_Queue/MsgQueue.h:85
#7 0x00007f2e57a463b2 in std::_Bind_simple<void ((CMsgQueue))(CMsgQueue*)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0xf73f10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1731
#8 0x00007f2e57a46365 in std::_Bind_simple<void ((CMsgQueue))(CMsgQueue*)>::operator()() (this=0xf73f10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/functional:1720
#9 0x00007f2e57a4633c in std::thread::_Impl<std::_Bind_simple<void ((CMsgQueue))(CMsgQueue*)> >::_M_run() (this=0xf73ef8) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/thread:115
#10 0x00007f2e577e5bf0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007f2e5a85f182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007f2e5a58c00d in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 5 (Thread 0x7f2e55cd9700 (LWP 2847)):
#0 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f2e56da6ba3 in apr_thread_cond_timedwait () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#2 0x00007f2e56da450b in Condition::wait_time(unsigned long) () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#3 0x00007f2e56d91874 in DataProcThread::run() () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#4 0x00007f2e56da6248 in Thread::thread_proc(apr_thread_t_, void_) () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#5 0x00007f2e56daeedd in dummy_worker () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#6 0x00007f2e5a85f182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f2e5a58c00d in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 4 (Thread 0x7f2e554d8700 (LWP 2848)):
#0 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f2e56da6ba3 in apr_thread_cond_timedwait () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#2 0x00007f2e56da450b in Condition::wait_time(unsigned long) () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#3 0x00007f2e56d9274d in CustomMdProc::run() () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#4 0x00007f2e56da6248 in Thread::thread_proc(apr_thread_t_, void_) () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#5 0x00007f2e56daeedd in dummy_worker () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#6 0x00007f2e5a85f182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f2e5a58c00d in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 3 (Thread 0x7f2e54cd7700 (LWP 2849)):
#0 0x00007f2e5a866ee9 in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000004acd39 in ?? ()
#2 0x000000000042a849 in ?? ()
#3
#4 0x0000000000000000 in ?? ()
#5 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f2e3ffff700 (LWP 2850)):
#0 0x00007f2e5a8637ce in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007f2e56da6ba3 in apr_thread_cond_timedwait () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#2 0x00007f2e56da450b in Condition::wait_time(unsigned long) () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#3 0x00007f2e56d8f465 in HeartBeatTh::run() () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#4 0x00007f2e56da6248 in Thread::thread_proc(apr_thread_t_, void_) () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#5 0x00007f2e56daeedd in dummy_worker () from /home/mep/dev/broker/src/QuantBox_XAPI/bin/Debug/libDFITCMdApi.so
#6 0x00007f2e5a85f182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f2e5a58c00d in clone () from /lib/x86_64-linux-gnu/libc.so.6
Thread 1 (Thread 0x7f2e5b38a7c0 (LWP 2841)):
#0 0x00007f2e5a8663bd in read () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000005f96cd in ?? ()
#2 0x00000000005f2023 in ?? ()
#3 0x0000000040defa6a in ?? ()
#4 0x00007f2e5900deb8 in ?? ()
#5 0x00007f2e5900deb8 in ?? ()
#6 0x00007f2e5900dfe8 in ?? ()
#7 0x0000000000000000 in ?? ()
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries