Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit "eb764efe1" (rxpath: fix broken TCP connections on Windows Server) fixed TCP performance on Windows Server 2019 / 2022, but causes BSOD in mrxsmb.sys driver when running on ARM64 (reproduced on Windows 10 and 11). SYSTEM_THREAD_EXCEPTION_NOT_HANDLED_M (1000007e) 5: kd> kn # Child-SP RetAddr Call Site 00 fffff302`14353430 fffff803`12bc4a20 nt!KeBugCheck2+0x234 01 fffff302`14353a10 fffff803`1280e538 nt!PspSystemThreadStartup$filt$0+0x58 02 fffff302`14353a20 fffff803`12a67dcc nt!_C_ExecuteExceptionFilter+0x38 03 fffff302`14353a80 fffff803`1280cf34 nt!_C_specific_handler+0xcc 04 fffff302`14353ae0 fffff803`12905d48 nt!RtlpExecuteHandlerForException+0x14 05 fffff302`14353b00 fffff803`12877fd4 nt!RtlDispatchException+0x2e8 06 fffff302`14354160 fffff803`1287856c nt!KiDispatchException+0x3f4 07 fffff302`14354650 fffff803`128c07d0 nt!KiDispatchExceptionOnExceptionStack+0xc4 08 fffff302`14354680 fffff803`12803c00 nt!KiSynchronousException+0xd0 09 fffff302`14354770 fffff803`1280285c nt!KzSynchronousException+0x24 0a fffff302`143547d0 fffff803`17009adc nt!KiArm64ExceptionVectors+0x5c 0b fffff302`14354b40 fffff803`170e1ff8 ndis!ndisValidOid+0x24 0c fffff302`14354b40 fffff803`1700957c ndis!ndisMiniportOidIoctl+0x128 0d fffff302`14354cc0 fffff803`12856160 ndis!ndisDeviceControlHandler+0x17c 0e fffff302`14354d50 fffff803`12d3ce38 nt!IofCallDriver+0x30 0f fffff302`14354d80 fffff803`12d3e390 nt!IopSynchronousServiceTail+0x170 10 fffff302`14354e10 fffff803`12d49d3c nt!IopXxxControlFile+0x658 11 fffff302`14355070 fffff803`1280c460 nt!NtDeviceIoControlFile+0x2c 12 fffff302`143550a0 fffff803`1280bf60 nt!KiSystemServiceCopyEnd+0x38 13 fffff302`14355110 fffff802`d88d7248 nt!KiServiceInternal+0x60 14 fffff302`14355470 fffff802`d88d6f28 mrxsmb!MRxSmbQueryLbfoTeamCapability+0x1d8 15 fffff302`143555c0 fffff803`17175754 mrxsmb!MRxSmbIPv4AddressChangeHandler+0x108 16 fffff302`143558c0 fffff803`17382228 NETIO!NsiParameterChange+0x244 17 fffff302`14355970 fffff803`17335564 tcpip!IppNotifyAddressChangeAtPassive+0x2d8 18 fffff302`14355a90 fffff803`1716f63c tcpip!IppCompartmentNotificationWorker+0x74 19 fffff302`14355ac0 fffff803`1285a56c NETIO!NetiopIoWorkItemRoutine+0x7c 1a fffff302`14355b20 fffff803`12980604 nt!IopProcessWorkItem+0xec 1b fffff302`14355b80 fffff803`128fa300 nt!ExpWorkerThread+0x114 1c fffff302`14355d50 fffff803`1280be4c nt!PspSystemThreadStartup+0x50 1d fffff302`14355d90 00000000`00000000 nt!KiStartSystemThread+0x24 There are no tap-windows6 calls in this stack trace, but certain code change in commit "eb764efe1" causes mrxsmb/ndis to bugcheck. Note that this does _not_ happen on x64. The problematic change seems to be passing NDIS_RECEIVE_FLAGS_RESOURCES to NdisMIndicateReceiveNetBufferLists() in IndicateReceivePacket(). This code deals with DHCP / IPv6 ND. The bug check doesn't happen if this flag is omitted in IndicateReceivePacket(). The reason why that flag was introduced is to process write requests in place and not to pend them, which causes performance degradation (see longer explanation in commit eb764ef. However, IndicateReceivePacket() mostly deals with DHCP packets, which are generated within the driver and are quire rare comparison to normal data channel traffic, so partially reverting that commit (removing NDIS_RECEIVE_FLAGS_RESOURCES and bringing back handling "in-flight" packets) should not affect performance. The root cause of bugcheck remains unknown since NDIS and mrxsmb are closed- source and to my understanding tap-windows6 does nothing wrong in regards to using NDIS_RECEIVE_FLAGS_RESOURCES flag and this is ARM64 specific issue. In any case, I think that this fix/workaround is good enough. Signed-off-by: Lev Stipakov <[email protected]>
- Loading branch information