Skip to content

Commit

Permalink
Fixing lock held during suspension in papi counter component
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Heller committed Jan 12, 2018
1 parent 2bff68d commit 26c15e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/performance_counters/papi/server/papi.cpp
Expand Up @@ -213,6 +213,10 @@ namespace hpx { namespace performance_counters { namespace papi { namespace serv
// convert event name to code and check availability
{
std::lock_guard<papi_counter_base::mutex_type> lk(this->get_global_mtx());
// papi_call might throw, leading to potential "lock held while
// suspending thread" errors. At this point, it is safe to ignore
// the lock.
hpx::util::ignore_all_while_checking il;

papi_call(PAPI_event_name_to_code(
const_cast<char *>(cpe.countername_.c_str()),
Expand Down

0 comments on commit 26c15e2

Please sign in to comment.