RFR: 8285835: SIGSEGV in PhaseIdealLoop::build_loop_late_post_work
Vladimir Kozlov
kvn at openjdk.org
Fri Oct 28 17:51:25 UTC 2022
On Thu, 27 Oct 2022 23:14:11 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> EA does not adjust NSR (not_scalar_replaceable) state for referenced allocations.
> In the test case object A is NSR because it merges with NULL object. But this state is not propagated to allocations it references. As result other allocations are marked scalar replaceable and related Load node is moved above guarding condition (where A object is checked for NULL).
> EA should propagate NSR state.
>
> Thanks to @rwestrel who provided reproducer test case.
>
> Testing tier1-4, xcomp, stress.
I ran replay and jar files from Tobias's example and looked on EA outputs. I found Allocation which was not marked NSR:
3310 Allocate === 4539 2045 2046 386 1 (...) [[ ... ]] rawptr:NotNull ( int:>=0, java/lang/Object:NotNull *, bool, top, bool ) Lucene90DocValuesProducer::getNumericValues @ bci:141 (line 647) Lucene90DocValuesProducer::getSortedNumeric @ bci:53 (line 1300) Lucene90DocValuesProducer::getSortedNumeric @ bci:19 (line 1287) AssertingDocValuesFormat$AssertingDocValuesProducer::getSortedNumeric @ bci:45 (line 270) PerFieldDocValuesFormat$FieldsReader::getSortedNumeric @ bci:27 (line 346) CodecReader::getSortedNumericDocValues @ bci:24 (line 176) DocValues::getSortedNumeric @ bci:2 (line 295) RangeFacetCounts::count @ bci:52 (line 122) !jvms: DirectMonotonicReader::getInstance @ bci:4 (line 101) Lucene90DocValuesProducer::getSortedNumeric @ bci:47 (line 1298) Lucene90DocValuesProducer::getSortedNumeric @ bci:19 (line 1287) AssertingDocValuesFormat$AssertingDocValuesProducer::getSortedNumeric @ bci:45 (line 270) PerFieldDocValuesFormat$FieldsReader::getSortedNumeric @ bci:27 (line 346) Co
decReader::getSortedNumericDocValues @ bci:24 (line 176) DocValues::getSortedNumeric @ bci:2 (line 295) RangeFacetCounts::count @ bci:52 (line 122)
LocalVar(491) [ 3310P [ 2056 ]] 3313 Proj === 3310 [[ 4542 2056 ]] #5 !jvms: DirectMonotonicReader::getInstance @ bci:14 (line 102) Lucene90DocValuesProducer::getSortedNumeric @ bci:47 (line 1298) Lucene90DocValuesProducer::getSortedNumeric @ bci:19 (line 1287) AssertingDocValuesFormat$AssertingDocValuesProducer::getSortedNumeric @ bci:45 (line 270) PerFieldDocValuesFormat$FieldsReader::getSortedNumeric @ bci:27 (line 346) CodecReader::getSortedNumericDocValues @ bci:24 (line 176) DocValues::getSortedNumeric @ bci:2 (line 295) RangeFacetCounts::count @ bci:52 (line 122)
2056 CheckCastPP === 3312 3313 [[ ... ]] #org/apache/lucene/codecs/lucene90/Lucene90DocValuesProducer$15:NotNull:exact * Oop:org/apache/lucene/codecs/lucene90/Lucene90DocValuesProducer$15:NotNull:exact * !jvms: String::compareTo @ bci:5 (line 141) TreeMap::getEntry @ bci:37 (line 350) TreeMap::get @ bci:2 (line 279) PerFieldDocValuesFormat$FieldsReader::getSortedNumeric @ bci:8 (line 345) CodecReader::getSortedNumericDocValues @ bci:24 (line 176) DocValues::getSortedNumeric @ bci:2 (line 295) RangeFacetCounts::count @ bci:52 (line 122)
This allocation is also listed in bad dominators output.
After fix the the replay passed and the allocation is marked as NSR:
JavaObject(59) NoEscape(NoEscape) is NSR. is stored into field with NSR base
JavaObject(59) NoEscape(NoEscape) NSR [ 6054F 6052F 6055F 6556F 6537F 2723F 5743F 2807F 5645F [ 3313 2056 6291 6290 5740 5642 4937 4776 3732 3549 2542 2336 2547 2341 ]] 3310 Allocate === 4539 2045 2046 386 1 (2717 4540 761 1 1 772 773 758 774 775 776 777 1 1 1 1 1 1 1 1 1 1 1 778 773 1 1 1 1 1 1 1 1 779 1 1 1 1 1 780 781 1 833 1 1 780 1 1 2047 3308 1 1 1 ) [[ 5280 4367 3075 6056 2054 3313 ]] rawptr:NotNull ( int:>=0, java/lang/Object:NotNull *, bool, top, bool ) Lucene90DocValuesProducer::getNumericValues @ bci:141 (line 647) Lucene90DocValuesProducer::getSortedNumeric @ bci:53 (line 1300) Lucene90DocValuesProducer::getSortedNumeric @ bci:19 (line 1287) AssertingDocValuesFormat$AssertingDocValuesProducer::getSortedNumeric @ bci:45 (line 270) PerFieldDocValuesFormat$FieldsReader::getSortedNumeric @ bci:27 (line 346) CodecReader::getSortedNumericDocValues @ bci:24 (line 176) DocValues::getSortedNumeric @ bci:2 (line 295) RangeFacetCounts::count @ bci:52 (line 122) !jvms: DirectMon
otonicReader::getInstance @ bci:4 (line 101) Lucene90DocValuesProducer::getSortedNumeric @ bci:47 (line 1298) Lucene90DocValuesProducer::getSortedNumeric @ bci:19 (line 1287) AssertingDocValuesFormat$AssertingDocValuesProducer::getSortedNumeric @ bci:45 (line 270) PerFieldDocValuesFormat$FieldsReader::getSortedNumeric @ bci:27 (line 346) CodecReader::getSortedNumericDocValues @ bci:24 (line 176) DocValues::getSortedNumeric @ bci:2 (line 295) RangeFacetCounts::count @ bci:52 (line 122)
-------------
PR: https://git.openjdk.org/jdk/pull/10894
More information about the hotspot-compiler-dev
mailing list