[ 
https://issues.apache.org/jira/browse/QPID-8512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17415926#comment-17415926
 ] 

Ivan Sudakov edited comment on QPID-8512 at 9/16/21, 7:12 AM:
--------------------------------------------------------------

The same problem exists on Windows 7, but my program crashes on shutdown only 
in release build
 On Fedora 31, the program hangs for a minute on shutdown and then exits 
normally

Windows 7 - qpid-cpp-1.38.0

Fedora 31:

qpid-cpp-client-devel-1.39.0-5.fc31.x86_64 
 qpid-cpp-client-1.39.0-5.fc31.x86_64

valgrind --tool=helgrind tells:
{code:java}
// ==38026== Possible data race during read of size 1 at 0x88290E0 by thread #4 
==38026== Locks held: none ==38026==    at 0x77C0E31: 
qpid::sys::Poller::wait(qpid::sys::Duration) (in 
/usr/lib64/libqpidcommon.so.2.0.0) ==38026==    by 0x77C1906: 
qpid::sys::Poller::run() (in /usr/lib64/libqpidcommon.so.2.0.0) ==38026==    by 
0x77B778D: ??? (in /usr/lib64/libqpidcommon.so.2.0.0) ==38026==    by 
0x484076D: mythread_wrapper (hg_intercepts.c:387) ==38026==    by 0x48904E1: 
start_thread (in /usr/lib64/libpthread-2.30.so) ==38026==    by 0x50396C2: 
clone (in /usr/lib64/libc-2.30.so) ==38026==   ==38026=={code}
// This conflicts with a previous write of size 1 by thread #1 ==38026== Locks 
held: 1, at address 0x7615FF0 ==38026==    at 0x77BFFF0: 
qpid::sys::Poller::shutdown() (in /usr/lib64/libqpidcommon.so.2.0.0) ==38026==  
  by 0x75C3EB5: ??? (in /usr/lib64/libqpidclient.so.2.0.0) ==38026==    by 
0x4F76E86: __run_exit_handlers (in /usr/lib64/libc-2.30.so) ==38026==    by 
0x4F7703F: exit (in /usr/lib64/libc-2.30.so) ==38026==    by 0x4F5F1A9: (below 
main) (in /usr/lib64/libc-2.30.so)

 


was (Author: isudakov):
The same problem exists on Windows 7, but my program crashes on shutdown only 
in release build
 On Fedora 31, the program hangs for a minute on shutdown and then exits 
normally

Windows 7 - qpid-cpp-1.38.0

Fedora 31:

qpid-cpp-client-devel-1.39.0-5.fc31.x86_64 
 qpid-cpp-client-1.39.0-5.fc31.x86_64

valgrind --tool=helgrind tells:
{code:java}
//==38026== Possible data race during read of size 1 at 0x88290E0 by thread #4 
==38026== Locks held: none ==38026==    at 0x77C0E31: 
qpid::sys::Poller::wait(qpid::sys::Duration) (in 
/usr/lib64/libqpidcommon.so.2.0.0) ==38026==    by 0x77C1906: 
qpid::sys::Poller::run() (in /usr/lib64/libqpidcommon.so.2.0.0) ==38026==    by 
0x77B778D: ??? (in /usr/lib64/libqpidcommon.so.2.0.0) ==38026==    by 
0x484076D: mythread_wrapper (hg_intercepts.c:387) ==38026==    by 0x48904E1: 
start_thread (in /usr/lib64/libpthread-2.30.so) ==38026==    by 0x50396C2: 
clone (in /usr/lib64/libc-2.30.so) ==38026==   ==38026=={code}
This conflicts with a previous write of size 1 by thread #1 ==38026== Locks 
held: 1, at address 0x7615FF0 ==38026==    at 0x77BFFF0: 
qpid::sys::Poller::shutdown() (in /usr/lib64/libqpidcommon.so.2.0.0) ==38026==  
  by 0x75C3EB5: ??? (in /usr/lib64/libqpidclient.so.2.0.0) ==38026==    by 
0x4F76E86: __run_exit_handlers (in /usr/lib64/libc-2.30.so) ==38026==    by 
0x4F7703F: exit (in /usr/lib64/libc-2.30.so) ==38026==    by 0x4F5F1A9: (below 
main) (in /usr/lib64/libc-2.30.so)

 

> QPID threads hang on shutdown
> -----------------------------
>
>                 Key: QPID-8512
>                 URL: https://issues.apache.org/jira/browse/QPID-8512
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>         Environment: QPID 0.8 on SuSE Linux Enterprise Server 15 (SLES), 
> Service Pack 2 (SP2) (SLES 15 SP2)
>            Reporter: Karthik
>            Priority: Major
>
> QPID Threads in the client hang on shutdown. This issue seems to specifically 
> occur in SLES 15 SP2 (SuSE Linux Service Pack 2). It was working fine on SLES 
> 15 SP1 and older versions like SLES11, 12 etc. 
> QPID Client/Broker Version: 0.8
> On debugging into the QPID code, observed that the hang occurs in this 
> function and in the ::epoll_wait call.
> *Code-Reference*:
>  {{*qpid/sys/epoll/EpollPoller.cpp*}}
> {{Poller::Event Poller::wait(Duration timeout) {}}
> {{           .}}{{..}}
> {{      *int rc = ::epoll_wait(impl->epollFd, &epe, 1, timeoutMs);*}}
> {{      ...}}
> {{}}}
>  
> Thread backtrace on shutdown which hang:
>  {{Thread }}{{8}} {{(Thread }}{{0x7fffe27fc700}} {{(LWP }}{{29944}}{{)):}}
>  {{#}}{{0}}  {{0x00007ffff2dff126}} {{in epoll_pwait () from 
> /lib64/libc.so.}}{{6}}
>  {{#}}{{1}}  {{0x00007ffff5abc461}} {{in qpid::sys::Poller::wait 
> (}}{{this}}{{=}}{{0x6eb230}}{{, timeout=...) at 
> qpid/sys/epoll/EpollPoller.cpp:}}{{568}}
>  {{#}}{{2}}  {{0x00007ffff5abcf31}} {{in qpid::sys::Poller::run 
> (}}{{this}}{{=}}{{0x6eb230}}{{) at qpid/sys/epoll/EpollPoller.cpp:}}{{518}}
>  {{#}}{{3}}  {{0x00007ffff5ab3caa}} {{in qpid::sys::(anonymous 
> namespace)::runRunnable (p=}}{{0x6}}{{) at qpid/sys/posix/Thread.cpp:}}{{35}}
>  {{#}}{{4}}  {{0x00007ffff77b44f9}} {{in start_thread () from 
> /lib64/libpthread.so.}}{{0}}
>  {{#}}{{5}}  {{0x00007ffff2dfefbf}} {{in clone () from /lib64/libc.so.}}{{6}}
>   
>  {{Thread }}{{3}} {{(Thread }}{{0x7ffff1681700}} {{(LWP }}{{29939}}{{)):}}
>  {{#}}{{0}}  {{0x00007ffff2dff126}} {{in epoll_pwait () from 
> /lib64/libc.so.}}{{6}}
>  {{#}}{{1}}  {{0x00007ffff5abc461}} {{in qpid::sys::Poller::wait 
> (}}{{this}}{{=}}{{0x6eb230}}{{, timeout=...) at 
> qpid/sys/epoll/EpollPoller.cpp:}}{{568}}
>  {{#}}{{2}}  {{0x00007ffff5abcf31}} {{in qpid::sys::Poller::run 
> (}}{{this}}{{=}}{{0x6eb230}}{{) at qpid/sys/epoll/EpollPoller.cpp:}}{{518}}
>  {{#}}{{3}}  {{0x00007ffff5ab3caa}} {{in qpid::sys::(anonymous 
> namespace)::runRunnable (p=}}{{0x6}}{{) at qpid/sys/posix/Thread.cpp:}}{{35}}
>  {{#}}{{4}}  {{0x00007ffff77b44f9}} {{in start_thread () from 
> /lib64/libpthread.so.}}{{0}}
>  {{#}}{{5}}  {{0x00007ffff2dfefbf}} {{in clone () from /lib64/libc.so.}}{{6}}
>   
>  {{Thread }}{{1}} {{(Thread }}{{0x7ffff7fb97c0}} {{(LWP }}{{29842}}{{)):}}
>  {{#}}{{0}}  {{0x00007ffff77b58bd}} {{in pthread_join () from 
> /lib64/libpthread.so.}}{{0}}
>  {{#}}{{1}}  {{0x00007ffff5ab3db3}} {{in qpid::sys::Thread::join 
> (}}{{this}}{{=<optimized out>) at qpid/sys/posix/Thread.cpp:}}{{70}}
>  {{#}}{{2}}  {{0x00007ffff5716b09}} {{in qpid::client::(anonymous 
> namespace)::IOThread::~IOThread (}}{{this}}{{=}}{{0x7ffff597b6a0}} 
> {{<qpid::client::(anonymous namespace)::theIO()::io>, __in_chrg=<optimized 
> out>) at qpid/client/ConnectionImpl.cpp:}}{{140}}
>  {{#}}{{3}}  {{0x00007ffff2d3f138}} {{in __run_exit_handlers () from 
> /lib64/libc.so.}}{{6}}
>  {{#}}{{4}}  {{0x00007ffff2d3f18a}} {{in exit () from /lib64/libc.so.}}{{6}}
>  {{#}}{{5}}  {{0x00007ffff2d27351}} {{in __libc_start_main () from 
> /lib64/libc.so.}}{{6}}
>  {{#}}{{6}}  {{0x000000000040f179}} {{in _start () at 
> ../sysdeps/x86_64/elf/start.S:}}{{113}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to