Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
811e26ff
Commit
811e26ff
authored
Oct 30, 2015
by
Daniele Kruse
Browse files
Fixed memory corruption bug (uncaught exception: CTA vs CASTOR exceptions...)
parent
06257c1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
scheduler/ArchiveJob.cpp
View file @
811e26ff
...
...
@@ -64,12 +64,12 @@ void cta::ArchiveJob::complete() {
// failed
//------------------------------------------------------------------------------
void
cta
::
ArchiveJob
::
failed
(
const
cta
::
exception
::
Exception
&
ex
)
{
//
throw std::runtime_error("cta::ArchiveJob::failed(): not implemented");
throw
std
::
runtime_error
(
"cta::ArchiveJob::failed(): not implemented"
);
}
//------------------------------------------------------------------------------
// retry
//------------------------------------------------------------------------------
void
cta
::
ArchiveJob
::
retry
()
{
//
throw std::runtime_error("cta::ArchiveJob::retry(): not implemented");
throw
std
::
runtime_error
(
"cta::ArchiveJob::retry(): not implemented"
);
}
scheduler/RetrieveJob.cpp
View file @
811e26ff
...
...
@@ -50,12 +50,12 @@ void cta::RetrieveJob::complete() {
// failed
//------------------------------------------------------------------------------
void
cta
::
RetrieveJob
::
failed
()
{
//
throw std::runtime_error("cta::RetrieveJob::failed(): not implemented");
throw
std
::
runtime_error
(
"cta::RetrieveJob::failed(): not implemented"
);
}
//------------------------------------------------------------------------------
// retry
//------------------------------------------------------------------------------
void
cta
::
RetrieveJob
::
retry
()
{
//
throw std::runtime_error("cta::RetrieveJob::retry(): not implemented");
throw
std
::
runtime_error
(
"cta::RetrieveJob::retry(): not implemented"
);
}
tapeserver/castor/tape/tapeserver/daemon/RecallReportPacker.cpp
View file @
811e26ff
...
...
@@ -174,11 +174,42 @@ void RecallReportPacker::WorkerThread::run(){
break
;
}
}
}
catch
(
const
castor
::
exception
::
Exception
&
e
){
}
catch
(
const
castor
::
exception
::
Exception
&
e
){
//we get there because to tried to close the connection and it failed
//either from the catch a few lines above or directly from rep->execute
std
::
stringstream
ssEx
;
ssEx
<<
"Tried to report and got a castor exception, cant do much more. The exception is the following: "
<<
e
.
getMessageValue
();
m_parent
.
m_lc
.
log
(
LOG_ERR
,
ssEx
.
str
());
if
(
m_parent
.
m_watchdog
)
{
m_parent
.
m_watchdog
->
addToErrorCount
(
"Error_clientCommunication"
);
m_parent
.
m_watchdog
->
addParameter
(
log
::
Param
(
"status"
,
"failure"
));
}
}
catch
(
const
cta
::
exception
::
Exception
&
e
){
//we get there because to tried to close the connection and it failed
//either from the catch a few lines above or directly from rep->execute
std
::
stringstream
ssEx
;
ssEx
<<
"Tried to report and got a CTA exception, cant do much more. The exception is the following: "
<<
e
.
getMessageValue
();
m_parent
.
m_lc
.
log
(
LOG_ERR
,
ssEx
.
str
());
if
(
m_parent
.
m_watchdog
)
{
m_parent
.
m_watchdog
->
addToErrorCount
(
"Error_clientCommunication"
);
m_parent
.
m_watchdog
->
addParameter
(
log
::
Param
(
"status"
,
"failure"
));
}
}
catch
(
const
std
::
exception
&
e
){
//we get there because to tried to close the connection and it failed
//either from the catch a few lines above or directly from rep->execute
std
::
stringstream
ssEx
;
ssEx
<<
"Tried to report and got a standard exception, cant do much more. The exception is the following: "
<<
e
.
what
();
m_parent
.
m_lc
.
log
(
LOG_ERR
,
ssEx
.
str
());
if
(
m_parent
.
m_watchdog
)
{
m_parent
.
m_watchdog
->
addToErrorCount
(
"Error_clientCommunication"
);
m_parent
.
m_watchdog
->
addParameter
(
log
::
Param
(
"status"
,
"failure"
));
}
}
catch
(...){
//we get there because to tried to close the connection and it failed
//either from the catch a few lines above or directly from rep->execute
m_parent
.
m_lc
.
log
(
LOG_ERR
,
"tried to report endOfSession(WithError) and got an exception, cant do much more"
);
std
::
stringstream
ssEx
;
ssEx
<<
"Tried to report and got an unknown exception, cant do much more."
;
m_parent
.
m_lc
.
log
(
LOG_ERR
,
ssEx
.
str
());
if
(
m_parent
.
m_watchdog
)
{
m_parent
.
m_watchdog
->
addToErrorCount
(
"Error_clientCommunication"
);
m_parent
.
m_watchdog
->
addParameter
(
log
::
Param
(
"status"
,
"failure"
));
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment