Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
c2c5a48c
Commit
c2c5a48c
authored
11 years ago
by
Elvin Alin Sindrilaru
Browse files
Options
Downloads
Patches
Plain Diff
XROOTD: Catch exception which lead to a deadlock when object could not be read from
the socket in the SendAsyncRequest method
parent
02ec1c2d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xrootd/XrdxCastorClient.cpp
+14
-3
14 additions, 3 deletions
xrootd/XrdxCastorClient.cpp
with
14 additions
and
3 deletions
xrootd/XrdxCastorClient.cpp
+
14
−
3
View file @
c2c5a48c
...
...
@@ -195,8 +195,19 @@ XrdxCastorClient::SendAsyncRequest(const std::string& userId,
// it to the map. This is fine as the request is processed only after we get the ack.
mMutexMaps
.
Lock
();
// -->
// Wait for acknowledgment
castor
::
IObject
*
obj
=
sock
.
readObject
();
try
{
// Wait for acknowledgment
castor
::
IObject
*
obj
=
sock
.
readObject
();
}
catch
(
castor
::
exceptio
::
Communication
e
)
{
mMutexMaps
.
UnLock
();
// <--
e
.
getMessage
()
<<
"Reading object from the socket failed"
;
delete
elem
;
throw
e
;
}
castor
::
MessageAck
*
ack
=
dynamic_cast
<
castor
::
MessageAck
*>
(
obj
);
if
(
0
==
ack
)
...
...
@@ -338,7 +349,7 @@ XrdxCastorClient::GetResponse(const std::string& userId,
// i.e. with responses for other requests
gettimeofday
(
&
current
,
NULL
);
if
(
current
.
tv_sec
-
start
.
tv_sec
>
wait_time
)
if
(
current
.
tv_sec
-
start
.
tv_sec
>
=
wait_time
)
{
xcastor_debug
(
"waited for maximum amount of time"
);
elem
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment