Details
-
Bug
-
Resolution: Fixed
-
P3
-
11.0.3, 13, 14
-
b25
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8246408 | 13.0.4 | David Buck | P3 | Resolved | Fixed | b04 |
JDK-8234618 | 11.0.7-oracle | David Buck | P3 | Resolved | Fixed | b01 |
JDK-8237343 | 11.0.7 | David Buck | P3 | Resolved | Fixed | b01 |
Description
While observing a loop while using -verbose option it would seem that a destructor call
in the iterator constructor causes wait_until_no_readers to go into an infinite loop.
On analysis the issue seems to be in file src/hotspot/share/logging/logOutputList.cpp
The issue is due to invoking of destructor in iterator constructor due to creation of
an object in the following code:
Iterator iterator(LogLevelType level = LogLevel::Last) {
increase_readers();
return Iterator(this, _level_start[level]);
}
Again, when the object is destroyed, the destructor is called again.
Due to this the _active_readers count becomes negative and wait_until_no_readers
goes into infinite loop.
void LogOutputList::wait_until_no_readers() const {
OrderAccess::storeload();
while (_active_readers != 0) {
// Busy wait
}
}
in the iterator constructor causes wait_until_no_readers to go into an infinite loop.
On analysis the issue seems to be in file src/hotspot/share/logging/logOutputList.cpp
The issue is due to invoking of destructor in iterator constructor due to creation of
an object in the following code:
Iterator iterator(LogLevelType level = LogLevel::Last) {
increase_readers();
return Iterator(this, _level_start[level]);
}
Again, when the object is destroyed, the destructor is called again.
Due to this the _active_readers count becomes negative and wait_until_no_readers
goes into infinite loop.
void LogOutputList::wait_until_no_readers() const {
OrderAccess::storeload();
while (_active_readers != 0) {
// Busy wait
}
}
Attachments
Issue Links
- backported by
-
JDK-8234618 infinite loop in LogOutputList::wait_until_no_readers()
- Resolved
-
JDK-8237343 infinite loop in LogOutputList::wait_until_no_readers()
- Resolved
-
JDK-8246408 infinite loop in LogOutputList::wait_until_no_readers()
- Resolved
- relates to
-
JDK-8234779 Provide idiom for declaring classes noncopyable
- Resolved
-
JDK-8234691 Potential double-free in ParallelSPCleanupTask constructor
- Resolved