-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better annotate interprocess_exception #3
Better annotate interprocess_exception #3
Conversation
A new Pull Request was created by @Dr15Jones (Chris Jones) for branch cms/v1.80.0. @cmsbuild, @smuzaffar, @aandvalenzuela, @iarspider can you please review it and eventually sign? Thanks. |
@smuzaffar I compiled all CMSSW code that includes |
@@ -310,7 +310,7 @@ class managed_open_or_create_impl | |||
//File existing when trying to create, but non-existing when | |||
//trying to open, and tried MaxCreateOrOpenTries times. Something fishy | |||
//is happening here and we can't solve it | |||
throw interprocess_exception(error_info(corrupted_error)); | |||
throw interprocess_exception(error_info(corrupted_error), "file exists when create but not when open"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw interprocess_exception(error_info(corrupted_error), "file exists when create but not when open"); | |
throw interprocess_exception(error_info(corrupted_error), "do_create_else_open: file exists when trying to create, but not when trying to open"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the other cases where you mention the function name explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -1,4 +1,4 @@ | |||
////////////////////////////////////////////////////////////////////////////// | |||
///////////////////////////////////////////////////////////////////////////// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this could be avoided ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -100,13 +100,13 @@ inline bool semaphore_open | |||
default: | |||
{ | |||
error_info err(other_error); | |||
throw interprocess_exception(err); | |||
throw interprocess_exception(err, "semaphore_open unknown type"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw interprocess_exception(err, "semaphore_open unknown type"); | |
throw interprocess_exception(err, "semaphore_open: unknown type"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
} | ||
|
||
//Check for error | ||
if(handle == BOOST_INTERPROCESS_POSIX_SEM_FAILED){ | ||
throw interprocess_exception(error_info(errno)); | ||
throw interprocess_exception(error_info(errno),"semaphore_open sem_open failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw interprocess_exception(error_info(errno),"semaphore_open sem_open failed"); | |
throw interprocess_exception(error_info(errno),"semaphore_open: sem_open failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -148,7 +148,7 @@ inline void semaphore_init(sem_t *handle, unsigned int initialCount) | |||
//In the future, a successful call might be required to return 0. | |||
if(ret == -1){ | |||
error_info err = system_error_code(); | |||
throw interprocess_exception(err); | |||
throw interprocess_exception(err, "semaphore_unlink sem_init failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw interprocess_exception(err, "semaphore_unlink sem_init failed"); | |
throw interprocess_exception(err, "semaphore_init: sem_init failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
0dcaab1
to
777347c
Compare
Pull request #3 was updated. |
Avoid case where exception message is just "boost::interprocess_exception::library_error"
777347c
to
fc6a197
Compare
Pull request #3 was updated. |
One thing of note is from looking at the code, it looks like the message |
test parameters:
|
please test |
+externals |
This pull request is fully signed and it will be integrated in one of the next cms/v1.80.0 IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
The IBs with the external generator process are periodically failing with the unhelpful error message
That message happens when
boost::interprocess_exception
constructor is passed an error_info that is set to 0 AND the constructor is not passed aconst char*
. I went and modified all the places our code might reach a function that callsboost::interprocess_exception
and forces it to also pass aconst char*
saying why the exception is being thrown.Hopefully this will help track down the problems we see ever so often.