Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pony_os_peername crash #4439

Open
SeanTAllen opened this issue Sep 7, 2023 · 0 comments
Open

pony_os_peername crash #4439

SeanTAllen opened this issue Sep 7, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"

Comments

@SeanTAllen
Copy link
Member

SeanTAllen commented Sep 7, 2023

This one happened on Windows while doing some other testing. This is probably going to be hard to track down.

The failure happened during a net/Broadcast test. Release version of the stdlib. Using release runtime.

pony_os_peername is only used in TCPConnection/remote_address.

Nothing in the TCP tests called remote_address and I hadn't modified them to call it.

backtrace:

2023-09-05T07:56:32.9481536Z * thread #7, stop reason = Exception 0xc0000005 encountered at address 0x7ff6e3a7cb1b: Access violation reading location 0x000001d8
2023-09-05T07:56:32.9482605Z     frame #0: 0x00007ff6e3a7cb1b stdlib-release.exe`pony_os_peername + 4319260
2023-09-05T07:56:32.9483304Z stdlib-release.exe`pony_os_peername:
2023-09-05T07:56:32.9484078Z ->  0x7ff6e3a7cb1b <+4319260>: movq   0x18(%rdi,%rax), %rdx
2023-09-05T07:56:32.9484591Z     0x7ff6e3a7cb20 <+4319265>: movq   (%rdi,%rax), %rcx
2023-09-05T07:56:32.9485426Z     0x7ff6e3a7cb24 <+4319269>: callq  0x7ff6e3659156            ; pony_active_schedulers + 240
2023-09-05T07:56:32.9486122Z     0x7ff6e3a7cb29 <+4319274>: incl   %ebx
2023-09-05T07:56:32.9487178Z Process 6484 launched: 'D:\a\ponyc\ponyc\build\release\stdlib-release.exe' (x86_64)
2023-09-05T07:56:32.9487690Z (lldb) frame variable
2023-09-05T07:56:32.9488341Z (lldb) register read
2023-09-05T07:56:32.9489181Z General Purpose Registers:
2023-09-05T07:56:32.9489892Z        rax = 0x0000000000000000
2023-09-05T07:56:32.9490729Z        rbx = 0x0000000000000001
2023-09-05T07:56:32.9491418Z        rcx = 0x0000000000000000
2023-09-05T07:56:32.9492258Z        rdx = 0x0000000000000000
2023-09-05T07:56:32.9492919Z        rdi = 0x00000000000001C0
2023-09-05T07:56:32.9493716Z        rsi = 0x0000000000000002
2023-09-05T07:56:32.9494533Z        rbp = 0x00000000FFFFFFFF
2023-09-05T07:56:32.9495264Z        rsp = 0x000000DA3DAFF8C0
2023-09-05T07:56:32.9496119Z         r8 = 0x000000DA3DAFF858
2023-09-05T07:56:32.9496850Z         r9 = 0x00000000FFFFFFFF
2023-09-05T07:56:32.9500119Z        r10 = 0x0000000000000000
2023-09-05T07:56:32.9500575Z        r11 = 0x0000000000000246
2023-09-05T07:56:32.9501671Z        r12 = 0x0000000000000000
2023-09-05T07:56:32.9502454Z        r13 = 0x0000000000000000
2023-09-05T07:56:32.9503001Z        r14 = 0x000000DA3DAFFBE0
2023-09-05T07:56:32.9503293Z        r15 = 0x0000000000000000
2023-09-05T07:56:32.9504340Z        rip = 0x00007FF6E3A7CB1B  stdlib-release.exe`pony_os_peername + 4319260
2023-09-05T07:56:32.9504785Z     eflags = 0b0000000000000000000000000000000000000000000000010000001000010001
2023-09-05T07:56:32.9505602Z        eax = 0x00000000
2023-09-05T07:56:32.9506230Z        ebx = 0x00000001
2023-09-05T07:56:32.9507101Z        ecx = 0x00000000
2023-09-05T07:56:32.9508395Z        edx = 0x00000000
2023-09-05T07:56:32.9509246Z        edi = 0x000001C0
2023-09-05T07:56:32.9510028Z        esi = 0x00000002
2023-09-05T07:56:32.9510777Z        ebp = 0xFFFFFFFF
2023-09-05T07:56:32.9511474Z        esp = 0x3DAFF8C0
2023-09-05T07:56:32.9512292Z        r8d = 0x3DAFF858
2023-09-05T07:56:32.9512953Z        r9d = 0xFFFFFFFF
2023-09-05T07:56:32.9513785Z       r10d = 0x00000000
2023-09-05T07:56:32.9514512Z       r11d = 0x00000246
2023-09-05T07:56:32.9515232Z       r12d = 0x00000000
2023-09-05T07:56:32.9515980Z       r13d = 0x00000000
2023-09-05T07:56:32.9516780Z       r14d = 0x3DAFFBE0
2023-09-05T07:56:32.9517563Z       r15d = 0x00000000
2023-09-05T07:56:32.9518356Z         ax = 0x0000
2023-09-05T07:56:32.9519133Z         bx = 0x0001
2023-09-05T07:56:32.9519859Z         cx = 0x0000
2023-09-05T07:56:32.9520654Z         dx = 0x0000
2023-09-05T07:56:32.9521417Z         di = 0x01C0
2023-09-05T07:56:32.9522188Z         si = 0x0002
2023-09-05T07:56:32.9522994Z         bp = 0xFFFF
2023-09-05T07:56:32.9523700Z         sp = 0xF8C0
2023-09-05T07:56:32.9524658Z        r8w = 0xF858
2023-09-05T07:56:32.9525421Z        r9w = 0xFFFF
2023-09-05T07:56:32.9526115Z       r10w = 0x0000
2023-09-05T07:56:32.9526885Z       r11w = 0x0246
2023-09-05T07:56:32.9527644Z       r12w = 0x0000
2023-09-05T07:56:32.9528421Z       r13w = 0x0000
2023-09-05T07:56:32.9529104Z       r14w = 0xFBE0
2023-09-05T07:56:32.9529914Z       r15w = 0x0000
2023-09-05T07:56:32.9530620Z         ah = 0x00
2023-09-05T07:56:32.9531538Z         bh = 0x00
2023-09-05T07:56:32.9532484Z         ch = 0x00
2023-09-05T07:56:32.9533478Z         dh = 0x00
2023-09-05T07:56:32.9534377Z         al = 0x00
2023-09-05T07:56:32.9535541Z         bl = 0x01
2023-09-05T07:56:32.9538637Z         cl = 0x00
2023-09-05T07:56:32.9539980Z         dl = 0x00
2023-09-05T07:56:32.9540938Z        dil = 0xC0
2023-09-05T07:56:32.9543017Z        sil = 0x02
2023-09-05T07:56:32.9543887Z        bpl = 0xFF
2023-09-05T07:56:32.9545067Z        spl = 0xC0
2023-09-05T07:56:32.9546877Z        r8l = 0x58
2023-09-05T07:56:32.9548382Z        r9l = 0xFF
2023-09-05T07:56:32.9549078Z       r10l = 0x00
2023-09-05T07:56:32.9549769Z       r11l = 0x46
2023-09-05T07:56:32.9550485Z       r12l = 0x00
2023-09-05T07:56:32.9551188Z       r13l = 0x00
2023-09-05T07:56:32.9551866Z       r14l = 0xE0
2023-09-05T07:56:32.9552685Z       r15l = 0x00
2023-09-05T07:56:32.9553269Z 
2023-09-05T07:56:32.9554218Z (lldb) bt all
2023-09-05T07:56:32.9554913Z   thread #1
2023-09-05T07:56:32.9555744Z     frame #0: 0x00007ffaacd60714 ntdll.dll`NtDelayExecution + 20
2023-09-05T07:56:32.9556519Z     frame #1: 0x00007ffaacd17f4a ntdll.dll`RtlDelayExecution + 42
2023-09-05T07:56:32.9557369Z     frame #2: 0x00007ffaaa605d2b KernelBase.dll`SwitchToThread + 27
2023-09-05T07:56:32.9558127Z     frame #3: 0x00007ffaac3a083a ws2_32.dll`WahCreateHandleContextTable + 1418
2023-09-05T07:56:32.9558923Z     frame #4: 0x00007ffaac3a1116 ws2_32.dll`WahEnumerateHandleContexts + 262
2023-09-05T07:56:32.9559763Z     frame #5: 0x00007ffaac3a1230 ws2_32.dll`WSACleanup + 240
2023-09-05T07:56:32.9560706Z     frame #6: 0x00007ff6e3a85a0c stdlib-release.exe`pony_os_peername + 4355853
2023-09-05T07:56:32.9561409Z     frame #7: 0x00007ff6e39a03b6 stdlib-release.exe`pony_os_peername + 3416247
2023-09-05T07:56:32.9562725Z     frame #8: 0x00007ff6e3a75370 stdlib-release.exe`__scrt_common_main_seh [inlined] invoke_main at exe_common.inl:288
2023-09-05T07:56:32.9563450Z     frame #9: 0x00007ff6e3a7534e stdlib-release.exe`__scrt_common_main_seh at exe_common.inl:288
2023-09-05T07:56:32.9564486Z     frame #10: 0x00007ffaaba24de0 kernel32.dll`BaseThreadInitThunk + 16
2023-09-05T07:56:32.9564872Z     frame #11: 0x00007ffaacd3ec4b ntdll.dll`RtlUserThreadStart + 43
2023-09-05T07:56:32.9565580Z   thread #3
2023-09-05T07:56:32.9566060Z     frame #0: 0x00007ffaacd63be4 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
2023-09-05T07:56:32.9566632Z     frame #1: 0x00007ffaacccb77f ntdll.dll`RtlInitializeResource + 2415
2023-09-05T07:56:32.9567700Z     frame #2: 0x00007ffaaba24de0 kernel32.dll`BaseThreadInitThunk + 16
2023-09-05T07:56:32.9568691Z     frame #3: 0x00007ffaacd3ec4b ntdll.dll`RtlUserThreadStart + 43
2023-09-05T07:56:32.9569414Z   thread #2
2023-09-05T07:56:32.9570293Z     frame #0: 0x00007ffaacd63be4 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
2023-09-05T07:56:32.9571406Z     frame #1: 0x00007ffaacccb77f ntdll.dll`RtlInitializeResource + 2415
2023-09-05T07:56:32.9572271Z     frame #2: 0x00007ffaaba24de0 kernel32.dll`BaseThreadInitThunk + 16
2023-09-05T07:56:32.9573005Z     frame #3: 0x00007ffaacd3ec4b ntdll.dll`RtlUserThreadStart + 43
2023-09-05T07:56:32.9573692Z   thread #8
2023-09-05T07:56:32.9574650Z     frame #0: 0x00007ffaacd63be4 ntdll.dll`NtWaitForWorkViaWorkerFactory + 20
2023-09-05T07:56:32.9575452Z     frame #1: 0x00007ffaacccb77f ntdll.dll`RtlInitializeResource + 2415
2023-09-05T07:56:32.9576236Z     frame #2: 0x00007ffaaba24de0 kernel32.dll`BaseThreadInitThunk + 16
2023-09-05T07:56:32.9577086Z     frame #3: 0x00007ffaacd3ec4b ntdll.dll`RtlUserThreadStart + 43
2023-09-05T07:56:32.9577998Z * thread #7, stop reason = Exception 0xc0000005 encountered at address 0x7ff6e3a7cb1b: Access violation reading location 0x000001d8
2023-09-05T07:56:32.9578826Z   * frame #0: 0x00007ff6e3a7cb1b stdlib-release.exe`pony_os_peername + 4319260
2023-09-05T07:56:32.9579509Z     frame #1: 0x00007ff6e3a80cd6 stdlib-release.exe`pony_os_peername + 4336087
2023-09-05T07:56:32.9580098Z     frame #2: 0x00007ffaacddde34 ntdll.dll`RtlSetIoCompletionCallback + 1060
2023-09-05T07:56:32.9586704Z     frame #3: 0x00007ffaacccb8e8 ntdll.dll`RtlInitializeResource + 2776
2023-09-05T07:56:32.9587364Z     frame #4: 0x00007ffaaba24de0 kernel32.dll`BaseThreadInitThunk + 16
2023-09-05T07:56:32.9587937Z     frame #5: 0x00007ffaacd3ec4b ntdll.dll`RtlUserThreadStart + 43
2023-09-05T07:56:32.9588542Z (lldb) quit 1
2023-09-05T07:56:33.0804005Z Test suites run: 2, num failed: 1
2023-09-05T07:56:33.0867017Z Test suites failed: (stdlib-release)
@SeanTAllen SeanTAllen added help wanted Extra attention is needed bug Something isn't working needs investigation This needs to be looked into before its "ready for work" labels Sep 7, 2023
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Sep 7, 2023
@SeanTAllen SeanTAllen removed the discuss during sync Should be discussed during an upcoming sync label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"
Projects
None yet
Development

No branches or pull requests

2 participants