Windows random EXCEPTION_ACCESS_VIOLATION crash

Ty Young youngty1997 at gmail.com
Tue Jul 21 18:55:19 UTC 2020


On 7/21/20 1:53 PM, Ty Young wrote:
>
> On 7/21/20 12:42 PM, Henry Jen wrote:
>> If you are rolling layout on your own instead of using tools like 
>> jextract, it’s likely the layout of struct is different on Windows as 
>> some type have different size and alignment could be off.
>
>
> Went through structs as well as MethodType/FunctionDescriptor for 
> every function binding. Only mistake was having a FunctionDescriptor 
> with a third long argument instead of an int for a GPU UUID buffer 
> size. Pointer/array/structs all seem good too. Structs use LONGLONG.
>
>
> So, I'm lost here. The only difference between Windows and Linux 
> versions is that, on Windows, it seems like some processes seem to 
> have protected status such as the Windows Display Manager and 
> Samsung's Magician SSD software, which causes NVML and, in turn, my 
> application to bug out[1]. First image is the Windows Display Manager 
> process while the second is everyone's *favorite* digital assistant, 
> Cortana.
>
>

Forgot the link, sorry.


[1] https://imgur.com/a/Cy4AEhM


>
>
>>
>> Cheers,
>> Henry
>>
>>
>>> On Jul 21, 2020, at 10:30 AM, Ty Young <youngty1997 at gmail.com> wrote:
>>>
>>>
>>> On 7/21/20 12:15 PM, Maurizio Cimadamore wrote:
>>>> Looks like a crash in the library itself, so, very likely cause by 
>>>> some issues in the port - perhaps some layout mismatch? Could also 
>>>> be that you have some pre-existing memory corruption issue (e.g. 
>>>> not caused by the port), and that Windows is more likely to trigger 
>>>> a segfault.
>>>
>>> Can't think of any besides signedness. Not sure how memory 
>>> corruption is coming into play either, the application starts the 
>>> same way on the main thread all the time.
>>>
>>>
>>> Are there any tools that can be used to debug this? If not, I can 
>>> try making an FMA memory viewer in JavaFX or something so I can 
>>> easily visualize what's going on I suppose.
>>>
>>>
>>>> Maurizio
>>>>
>>>>
>>>> On 21/07/2020 17:24, Ty Young wrote:
>>>>> I decided to port my application to Windows from Linux since NVML, 
>>>>> Java, and JavaFX are all cross-platform. It was pretty easy except 
>>>>> for a bug in the JDK build process that someone on build-dev 
>>>>> helped me get through and Maven being more strict on Windows than 
>>>>> Linux. There is, however, an issue in that the application 
>>>>> sometimes crashes briefly after showing the GUI with:
>>>>>
>>>>>
>>>>> #
>>>>> # A fatal error has been detected by the Java Runtime Environment:
>>>>> #
>>>>> #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at 
>>>>> pc=0x00007ffd8150efe2, pid=15876, tid=10228
>>>>> #
>>>>> # JRE version: OpenJDK Runtime Environment (16.0) (build 
>>>>> 16-internal+0-adhoc.young.panama-foreign-foreign-abi)
>>>>> # Java VM: OpenJDK 64-Bit Server VM 
>>>>> (16-internal+0-adhoc.young.panama-foreign-foreign-abi, mixed mode, 
>>>>> sharing, tiered, compressed oops, g1 gc, windows-amd64)
>>>>> # Problematic frame:
>>>>> # C  [nvml.dll+0x8efe2]
>>>>>
>>>>>
>>>>> To be crystal clear, there was basically no code changes between 
>>>>> Linux and Windows(I manually specify library pathing for both now, 
>>>>> that's it). I've never seen this crash under Linux and if it 
>>>>> doesn't happen once the GUI first appears, the application will 
>>>>> run just fine[2] for hours. I tested this to make sure it wouldn't 
>>>>> eventually crash. I've attached two of the crash logs as well. 
>>>>> Nothing stands out to me personally. The Linux build I'm using is 
>>>>> older than the Windows build. That's it.
>>>>>
>>>>>
>>>>> Any ideas?
>>>>>
>>>>>
>>>>> [1] https://imgur.com/a/n3KDkot
>>>>>
>>>>> [2] https://imgur.com/a/dykLw6G
>>>>>
>>>>>
>>>>>


More information about the panama-dev mailing list