RFR: 8247351: [aarch64] NullPointerException during stack walking (clhsdb "where -a")
Nick Gasson
ngasson at openjdk.java.net
Wed Jul 14 02:35:17 UTC 2021
On Tue, 13 Jul 2021 17:49:40 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> Running the jtreg test serviceability/sa/ClhsdbWhere.java with -Xcomp
>> -XX:-TieredCompilation fails with the following exception:
>>
>> Error: java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.getJLongAt(long)" because "valueAddr" is null
>> java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.getJLongAt(long)" because "valueAddr" is null
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.CompiledVFrame.createStackValue(CompiledVFrame.java:270)
>> at jdk.hotspot.agent/sun.jvm.hotspot.runtime.CompiledVFrame.getLocals(CompiledVFrame.java:107)
>> at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTMLForJavaStackTrace(HTMLGenerator.java:1937)
>> at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$43.doit(CommandProcessor.java:1573)
>> at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2090)
>> at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2060)
>>
>> The oop map for the frame being inspected is:
>>
>> ScopeDesc(pc=0x0000ffff8957e000 offset=140):
>> jdk.test.lib.apps.LingeredApp::steadyState at 7 (line 536)
>> Locals
>> - l0: empty
>> - l1: reg rfp [58],oop
>> - l2: empty
>> Monitor stack
>> - @0: monitor{reg rfp [58],oop,stack[16]}
>>
>> But RegisterMap::getLocation() returns a null Address for register
>> 58 (=RFP).
>>
>> This patch fixes two problems: the fp VMReg value used in
>> AARCH64Frame::updateMapWithSavedLink should be 29<<1 not 29 because a
>> VMReg has two slots in a 64-bit VM. The other bug is that
>> RegisterMap::setLocation and getLocation calculate the long
>> locationValid mask using (1 << (i % locationValidTypeSize)) where i and
>> locationValidTypeSize are both int. We need to do this calculation as a
>> long if i % locationValidTypeSize can be > 32. There's no failure on
>> x86_64 because that only has 16 integer registers.
>
> This looks like a dup of [https://bugs.openjdk.java.net/browse/JDK-8247351](JDK-8247351). If so, please close this CR out as a dup and target this PR to JDK-8247351.
Thanks @plummercj . I think I did something wrong with the /issue commands and now I ended up with the JBS line in the commit message duplicated. Not sure how to fix that...
-------------
PR: https://git.openjdk.java.net/jdk/pull/4737
More information about the serviceability-dev
mailing list