Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
RTL
Delphi
Arithmetic
ConvUtils
Date - Time
DateUtils
File Management
Format + Float
Input/Output
Math Unit
Memory, Pointer, Address
Null-terminated strings
Other Classes
Other RTL
Pascal Strings
Regular Expressions
RTL Exceptions
Text Files
Thread support
Typed/Untyped Files
WinAPI
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/RTL/Delphi/Thread support
[ Add a report in this area ]
Report #:
17914
Status:
Closed
(Pulled) TMultiReadExclusiveWriteSynchronizer can deadlock if calls to BeginRead are nested.
Project:
Delphi
Build #:
5.0.5.56
Version:
5.0
Submitted By:
John Kaster
Report Type:
Crash / Data loss / Total failure
Date Reported:
8/11/1999 12:00:00 AM
Severity:
Infrequently encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All versions
Internal Tracking #:
68233
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
10.0.2098.14501
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
TMultiReadExclusiveWriteSynchronizer can deadlock if calls to BeginRead are nested.
Steps to Reproduce:
There seems to be a potential problem with how TMultiReadExclusiveWriteSynchronizer is implemented. If a thread tries to get a read lock (with BeginRead) twice and another thread tries to get a write lock, deadlocks can occur:
- Thread 1 calls BeginRead and gets a read lock
- Thread 2 calls BeginWrite, holds the FLock critical section, then waits INFINE on a signal that the last reader released its readlock
- Thread 1 calls BeginRead again. It waits for the FLock critical section. This is held by Thread 2, which is waiting for Thread 1 to continue...
- Deadlock...
- Run the attached project.
// Note that the ShowMessage is never reached because of the deadlock
Workarounds
None
Attachment
N
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us