JDK-8033106 : Wrong predicate for checking whether the correct amount of symbol table entries have been processed in G1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u20,9
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-01-29
  • Updated: 2014-07-29
  • Resolved: 2014-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b04Fixed
Related Reports
Relates :  
Description
JDK-8027476 introduced parallel string and symbol table scan. This code includes a check whether the whole string and symbol table were processed or not.

This check for symbol tables uses a predicate used for string table.

E.g.
    guarantee(!_process_strings || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size,
              err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT,
                      SymbolTable::parallel_claimed_index(), _initial_symbol_table_size));

must be changed to

    guarantee(!_process_symbols || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size,
              err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT,
                      SymbolTable::parallel_claimed_index(), _initial_symbol_table_size));

This slipped through because when the symbol table is scanned always, regardless of whether the string table is scanned.
Comments
noreg-hard justification: the current code will never fail with the guarantee mentioned in the description. Testing this would require mocking a complete G1 collector. This bug has been found during review of another issue.
29-01-2014