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

Unify datapath #3819

Merged
merged 101 commits into from
Sep 23, 2023
Merged

Unify datapath #3819

merged 101 commits into from
Sep 23, 2023

Conversation

ami-GS
Copy link
Contributor

@ami-GS ami-GS commented Aug 18, 2023

Description

Unifying windows normal socket and raw (xdp) socket

Testing

adjusting tests

Documentation

Architecture.md and TEST.md

@nibanks nibanks added OS: Windows (User) Area: Performance Area: Core Related to the shared, core protocol logic Area: Lola Related to low latency work labels Sep 20, 2023
if ($UseXdp) {
# Helper for XDP usage
if ($ForBuild) {
$InstallXdpSdk = $true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why skipping installing XdpSdk for build?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ($ForBuild) { below already has $InstallXdpSdk = $true.

@nibanks
Copy link
Member

nibanks commented Sep 20, 2023

Not sure it's related to this PR or not, but it seems stress hit a crash:
https://github.com/microsoft/msquic/actions/runs/6252310697/job/16975704088?pr=3819

==4800==ERROR: AddressSanitizer: access-violation on unknown address 0x01000000013f (pc 0x7ffb4c74f5e3 bp 0x000000000000 sp 0x00a724efde00 T187)
==4800==The signal is caused by a READ memory access.
    #0 0x7ffb4c74f5e2 in CxPlatPoolAlloc D:\a\msquic\msquic\src\inc\quic_platform_winuser.h:430
    #1 0x7ffb4c884db1 in SendDataAlloc D:\a\msquic\msquic\src\platform\datapath_winuser.c:3635
    #2 0x7ffb4c860800 in CxPlatSendDataAlloc D:\a\msquic\msquic\src\platform\datapath_win.c:634
    #3 0x7ffb4c845270 in QuicPacketBuilderPrepare D:\a\msquic\msquic\src\core\packet_builder.c:269
    #4 0x7ffb4c840d18 in QuicPacketBuilderPrepareForControlFrames D:\a\msquic\msquic\src\core\packet_builder.c:572
    #5 0x7ffb4c7f47cb in QuicSendFlush D:\a\msquic\msquic\src\core\send.c:1327
    #6 0x7ffb4c776a7d in QuicConnDrainOperations D:\a\msquic\msquic\src\core\connection.c:7691
    #7 0x7ffb4c7be1ed in QuicWorkerProcessConnection D:\a\msquic\msquic\src\core\worker.c:510
    #8 0x7ffb4c7baf30 in QuicWorkerLoop D:\a\msquic\msquic\src\core\worker.c:668
    #9 0x7ffb4c87e46e in CxPlatRunExecutionContexts D:\a\msquic\msquic\src\platform\platform_worker.c:395
    #10 0x7ffb4c87da45 in CxPlatWorkerThread D:\a\msquic\msquic\src\platform\platform_worker.c:492
    #11 0x7ffb49d9da49  (D:\a\msquic\msquic\artifacts\bin\windows\x64_Debug_schannel\clang_rt.asan_dynamic-x86_64.dll+0x18005da49)
    #12 0x7ffb83ff4ddf  (C:\Windows\System32\KERNEL32.DLL+0x180014ddf)
    #13 0x7ffb8449ec4a  (C:\Windows\SYSTEM32\ntdll.dll+0x18007ec4a)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: access-violation D:\a\msquic\msquic\src\inc\quic_platform_winuser.h:430 in CxPlatPoolAlloc
Thread T187 created by T185 here:
    #0 0x7ffb49d9f118  (D:\a\msquic\msquic\artifacts\bin\windows\x64_Debug_schannel\clang_rt.asan_dynamic-x86_64.dll+0x18005f118)
    #1 0x7ffb4c7bee54 in CxPlatThreadCreate D:\a\msquic\msquic\src\inc\quic_platform_winuser.h:1135
    #2 0x7ffb4c87cf1a in CxPlatWorkersLazyStart D:\a\msquic\msquic\src\platform\platform_worker.c:205
    #3 0x7ffb4c88388a in DataPathInitialize D:\a\msquic\msquic\src\platform\datapath_winuser.c:793
    #4 0x7ffb4c85ca8d in CxPlatDataPathInitialize D:\a\msquic\msquic\src\platform\datapath_win.c:47
    #5 0x7ffb4c722402 in QuicLibraryLazyInitialize D:\a\msquic\msquic\src\core\library.c:678
    #6 0x7ffb4c751868 in MsQuicRegistrationOpen D:\a\msquic\msquic\src\core\registration.c:59
    #7 0x7ff6eaa575ff in RunThread(void *) D:\a\msquic\msquic\src\tools\spin\spinquic.cpp:1331
    #8 0x7ffb49d9da49  (D:\a\msquic\msquic\artifacts\bin\windows\x64_Debug_schannel\clang_rt.asan_dynamic-x86_64.dll+0x18005da49)
    #9 0x7ffb83ff4ddf  (C:\Windows\System32\KERNEL32.DLL+0x180014ddf)
    #10 0x7ffb8449ec4a  (C:\Windows\SYSTEM32\ntdll.dll+0x18007ec4a)

Thread T185 created by T0 here:
    #0 0x7ffb49d9f118  (D:\a\msquic\msquic\artifacts\bin\windows\x64_Debug_schannel\clang_rt.asan_dynamic-x86_64.dll+0x18005f118)
    #1 0x7ff6eaa690a4 in CxPlatThreadCreate D:\a\msquic\msquic\src\inc\quic_platform_winuser.h:1135
    #2 0x7ff6eaa58b46 in start(void) D:\a\msquic\msquic\src\tools\spin\spinquic.cpp:1497
    #3 0x7ff6eaa59810 in main D:\a\msquic\msquic\src\tools\spin\spinquic.cpp:1603
    #4 0x7ff6eaac496b in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    #5 0x7ff6eaac496b in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #6 0x7ffb83ff4ddf  (C:\Windows\System32\KERNEL32.DLL+0x180014ddf)
    #7 0x7ffb8449ec4a  (C:\Windows\SYSTEM32\ntdll.dll+0x18007ec4a)

Copy link
Member

@nibanks nibanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all the tests pass, let's get this merged. Thanks Daiki for all the hard work!

@ami-GS
Copy link
Contributor Author

ami-GS commented Sep 23, 2023

Thanks for review!!

@ami-GS ami-GS merged commit ae3db5c into main Sep 23, 2023
400 checks passed
@ami-GS ami-GS deleted the dev/daiki/unify_datapath_share branch September 23, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Related to the shared, core protocol logic Area: Lola Related to low latency work Area: Performance OS: Windows (User)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants