RFR: JDK-8302320: AsyncGetCallTrace obtains too few frames in sanity test
David Holmes
dholmes at openjdk.org
Wed Feb 15 07:48:40 UTC 2023
On Wed, 15 Feb 2023 07:10:29 GMT, Johannes Bechberger <duke at openjdk.org> wrote:
>> From `frame_x86.hpp`:
>>
>> // The interpreter and adapters will extend the frame of the caller.
>> // Since oopMaps are based on the sp of the caller before extension
>> // we need to know that value. However in order to compute the address
>> // of the return address we need the real "raw" sp. By convention we
>> // use sp() to mean "raw" sp and unextended_sp() to mean the caller's
>> // original sp.
>>
>> by that definition `unextended_sp` is always > `sp`. If something has violated that definition/convention then we may have bigger problems!
>
> I get the following values for `sp` and `unextended_sp` when running this test case:
>
>
> int sp = 0x7f9f1ec614e0, unextended sp = 0x7f9f1ec614e0
> int sp = 0x7f9f1ec61538, unextended sp = 0x7f9f1ec61548
> int sp = 0x7f9f1ec615a0, unextended sp = 0x7f9f1ec61598 // the assumption fails here
> int sp = 0x7f9f1ec61600, unextended sp = 0x7f9f1ec61608
> int sp = 0x7f9f1ec61670, unextended sp = 0x7f9f1ec61688
> ...
What is the test case? Is it sending signals and then using AGCT? If so then maybe a signal hits when a call is made but before the code has a chance to update unextended_sp?
-------------
PR: https://git.openjdk.org/jdk/pull/12535
More information about the serviceability-dev
mailing list