Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
8236177: assert(status == 0) failed: error ETIMEDOUT(60), cond_wait
Extend the assert to cover the new case.
Reviewed-by: dholmes, kbarrett
- Loading branch information
Showing
with
14 additions
and
3 deletions.
-
+6
−3
src/hotspot/os/posix/os_posix.cpp
-
+8
−0
src/hotspot/share/utilities/macros.hpp
|
@@ -1967,7 +1967,8 @@ void os::PlatformEvent::park() { // AKA "down()" |
|
|
while (_event < 0) { |
|
|
// OS-level "spurious wakeups" are ignored |
|
|
status = pthread_cond_wait(_cond, _mutex); |
|
|
assert_status(status == 0, status, "cond_wait"); |
|
|
assert_status(status == 0 MACOS_ONLY(|| status == ETIMEDOUT), |
|
|
status, "cond_wait"); |
|
|
} |
|
|
--_nParked; |
|
|
|
|
@@ -2158,7 +2159,8 @@ void Parker::park(bool isAbsolute, jlong time) { |
|
|
if (time == 0) { |
|
|
_cur_index = REL_INDEX; // arbitrary choice when not timed |
|
|
status = pthread_cond_wait(&_cond[_cur_index], _mutex); |
|
|
assert_status(status == 0, status, "cond_timedwait"); |
|
|
assert_status(status == 0 MACOS_ONLY(|| status == ETIMEDOUT), |
|
|
status, "cond_wait"); |
|
|
} |
|
|
else { |
|
|
_cur_index = isAbsolute ? ABS_INDEX : REL_INDEX; |
|
@@ -2339,7 +2341,8 @@ int os::PlatformMonitor::wait(jlong millis) { |
|
|
return ret; |
|
|
} else { |
|
|
int status = pthread_cond_wait(cond(), mutex()); |
|
|
assert_status(status == 0, status, "cond_wait"); |
|
|
assert_status(status == 0 MACOS_ONLY(|| status == ETIMEDOUT), |
|
|
status, "cond_wait"); |
|
|
return OS_OK; |
|
|
} |
|
|
} |
|
|
|
@@ -404,6 +404,14 @@ |
|
|
#define NOT_LINUX(code) code |
|
|
#endif |
|
|
|
|
|
#ifdef __APPLE__ |
|
|
#define MACOS_ONLY(code) code |
|
|
#define NOT_MACOS(code) |
|
|
#else |
|
|
#define MACOS_ONLY(code) |
|
|
#define NOT_MACOS(code) code |
|
|
#endif |
|
|
|
|
|
#ifdef AIX |
|
|
#define AIX_ONLY(code) code |
|
|
#define NOT_AIX(code) |
|
|