Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 646510 Details for
Bug 874192
Deadlock in Qpid client if connection heartbeat is missed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Quick patch to prevent deadlock
bz874192.patch (text/plain), 1.49 KB, created by
Jason Dillaman
on 2012-11-16 18:24:01 UTC
(
hide
)
Description:
Quick patch to prevent deadlock
Filename:
MIME Type:
Creator:
Jason Dillaman
Created:
2012-11-16 18:24:01 UTC
Size:
1.49 KB
patch
obsolete
>diff --git a/qpid/cpp/src/qpid/sys/Timer.cpp b/qpid/cpp/src/qpid/sys/Timer.cpp >index 83d1a52..76aa394 100644 >--- a/qpid/cpp/src/qpid/sys/Timer.cpp >+++ b/qpid/cpp/src/qpid/sys/Timer.cpp >@@ -56,6 +56,7 @@ bool TimerTask::prepareToFire() { > Monitor::ScopedLock l(stateMonitor); > if (state != CANCELLED) { > state = CALLING; >+ callingThread = qpid::sys::Thread::current(); > return true; > } else { > return false; >@@ -68,6 +69,7 @@ void TimerTask::fireTask() { > > void TimerTask::finishFiring() { > Monitor::ScopedLock l(stateMonitor); >+ callingThread = qpid::sys::Thread(); > if (state != CANCELLED) { > state = WAITING; > stateMonitor.notifyAll(); >@@ -90,8 +92,10 @@ void TimerTask::restart() { > > void TimerTask::cancel() { > Monitor::ScopedLock l(stateMonitor); >- while (state == CALLING) { >- stateMonitor.wait(); >+ if ((state == CALLING) && (callingThread != qpid::sys::Thread::current())) { >+ while (state == CALLING) { >+ stateMonitor.wait(); >+ } > } > state = CANCELLED; > } >diff --git a/qpid/cpp/src/qpid/sys/Timer.h b/qpid/cpp/src/qpid/sys/Timer.h >index 5731b8d..1b2d9c5 100644 >--- a/qpid/cpp/src/qpid/sys/Timer.h >+++ b/qpid/cpp/src/qpid/sys/Timer.h >@@ -49,6 +49,7 @@ class TimerTask : public RefCounted { > Duration period; > AbsTime nextFireTime; > qpid::sys::Monitor stateMonitor; >+ qpid::sys::Thread callingThread; > enum {WAITING, CALLING, CANCELLED} state; > > bool prepareToFire(); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 874192
:
640226
|
646451
| 646510 |
648218