microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
6.76k stars 4.89k forks source link

Sysvad ComponentizedAudioSample Bugcheck #1140

Open thxkiwi opened 3 months ago

thxkiwi commented 3 months ago

Following the MS instructions SysVAD Virtual Audio Device Driver Sample - Code Samples | Microsoft Learn

Build sysvad.sln (Debug|x64)

audio\sysvad\x64\Debug\package

...setup\devcon\x64\Debug\devcon.exe install .\ComponentizedAudioSample.inf Root\sysvad_ComponentizedAudioSample

bugcheck

Minidump available.

Details follow...

Device Under Test

Edition Windows 11 Pro
Version 23H2
Installed on    ‎2/‎16/‎2023
OS build    22631.3155
Experience  Windows Feature Experience Pack 1000.22684.1000.0

Visual Studio

Microsoft Visual Studio Community 2022
Version 17.9.3
VisualStudio.17.Release/17.9.3+34701.34
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2022   00482-90000-00000-AA643
Microsoft Visual C++ 2022

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.9.199.22661
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.9.199.22661
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.9.199.22661
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Debugging Tools for Windows   10.0.22621.311
Integrates the Windows Debugger functionality (http://go.microsoft.com/fwlink/?linkid=223405) in Visual Studio.

Extensibility Message Bus   1.4.39 (main@e8108eb)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

GitHub Copilot   1.147.0.0 (v1.147.0.0@218a5ecac)
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

GitHub Copilot Agent   1.147.0

IncrediBuild Build Acceleration   1.6.0.7
IncrediBuild effectively reduces compilation and development times by up to 90%.

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.9.0 (b3bca6f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   6.9.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.9.2.2412004+684740676513b3b208d5bd5b7f8786dab8d287b7
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.9.54.7
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.30103.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.9.0-beta.23614.3+a521e1cd420beb56c15faf6836184fadd2b7937a
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Windows Driver Kit   10.0.22621.311
Headers, libraries, and tools needed to develop, debug, and test Windows drivers (msdn.microsoft.com/en-us/windows/hardware/gg487428.aspx)

Xamarin   17.9.0.138 (d17-9@60c2b9b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.9.3.0 (remotes/origin/d17-9@f174974f91)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   13.2.2.0 (d17-5/45b0e14)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: d9a6e87
    Java.Interop: xamarin/java.interop/d17-5@149d70fe
    SQLite: xamarin/sqlite/3.40.1@68c69d8
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

WDK

Name                                         Id                              Version         Source
----------------------------------------------------------------------------------------------------
Windows Driver Kit - Windows 10.0.22621.2428 Microsoft.WindowsWDK.10.0.22621 10.1.22621.2428 winget

Windows-Driver-Samples repo

commit b968cfbed5566a3a9597f5368334beb3b6dad4d2 (HEAD -> main)
Author: JakobL-MSFT <110699333+JakobL-MSFT@users.noreply.github.com>
Date:   Mon Feb 26 08:40:07 2024 -0800

    Merge tools in develop to main (#1128)

    * Merge tools in develop to main

    * Fine tune testenv

Bugcheck Analysis

Microsoft (R) Windows Debugger Version 10.0.22621.2428 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [C:\Windows\Minidump\031224-25093-01.dmp]
Mini Kernel Dump File: Only registers and stack trace are available

Symbol search path is: srv*
Executable search path is: 
Windows 10 Kernel Version 22621 MP (32 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Machine Name:
Kernel base = 0xfffff803`80a1d000 PsLoadedModuleList = 0xfffff803`81630550
Debug session time: Tue Mar 12 15:48:16.378 2024 (UTC - 7:00)
System Uptime: 0 days 15:11:51.350
Loading Kernel Symbols
...............................................................
................................................................
................................................................
................................................................

Loading User Symbols
Loading unloaded module list
..............................
For analysis of this file, run !analyze -v
*** WARNING: Unable to verify timestamp for tabletaudiosample.sys
0: kd> !analyze -v
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

SYSTEM_THREAD_EXCEPTION_NOT_HANDLED_M (1000007e)
This is a very common BugCheck.  Usually the exception address pinpoints
the driver/function that caused the problem.  Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003.  This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG.  This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG.  This will let us see why this breakpoint is
happening.
Arguments:
Arg1: ffffffff80000003, The exception code that was not handled
Arg2: fffff803c87c5c67, The address that the exception occurred at
Arg3: fffffa0b637cf0b8, Exception Record Address
Arg4: fffffa0b637ce8d0, Context Record Address

Debugging Details:
------------------

KEY_VALUES_STRING: 1

    Key  : Analysis.CPU.mSec
    Value: 890

    Key  : Analysis.DebugAnalysisManager
    Value: Create

    Key  : Analysis.Elapsed.mSec
    Value: 7395

    Key  : Analysis.Init.CPU.mSec
    Value: 1093

    Key  : Analysis.Init.Elapsed.mSec
    Value: 44741

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 110

FILE_IN_CAB:  031224-25093-01.dmp

TAG_NOT_DEFINED_202b:  *** Unknown TAG in analysis list 202b

DUMP_FILE_ATTRIBUTES: 0x1808
  Kernel Generated Triage Dump

BUGCHECK_CODE:  7e

BUGCHECK_P1: ffffffff80000003

BUGCHECK_P2: fffff803c87c5c67

BUGCHECK_P3: fffffa0b637cf0b8

BUGCHECK_P4: fffffa0b637ce8d0

EXCEPTION_RECORD:  fffffa0b637cf0b8 -- (.exr 0xfffffa0b637cf0b8)
ExceptionAddress: fffff803c87c5c67 (tabletaudiosample+0x0000000000035c67)
   ExceptionCode: 80000003 (Break instruction exception)
  ExceptionFlags: 00000000
NumberParameters: 1
   Parameter[0]: 0000000000000000

CONTEXT:  fffffa0b637ce8d0 -- (.cxr 0xfffffa0b637ce8d0)
rax=0000000000000000 rbx=ffffa705b6a1b610 rcx=f0d2b09c09330000
rdx=0000000000000001 rsi=fffffa0b637cf658 rdi=ffff800e630d1cf8
rip=fffff803c87c5c67 rsp=fffffa0b637cf2f0 rbp=0000000000000000
 r8=0000000000000008  r9=0000000000000065 r10=ffffa705a48001a0
r11=fffffa0b637cf2e8 r12=000000000000ffff r13=0000000000000000
r14=ffffa705eaafe000 r15=fffffa0b637cf640
iopl=0         nv up ei ng nz ac po cy
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00040297
tabletaudiosample+0x35c67:
fffff803`c87c5c67 cc              int     3
Resetting default scope

BLACKBOXBSD: 1 (!blackboxbsd)

BLACKBOXNTFS: 1 (!blackboxntfs)

BLACKBOXPNP: 1 (!blackboxpnp)

BLACKBOXWINLOGON: 1

CUSTOMER_CRASH_COUNT:  1

PROCESS_NAME:  System

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION}  Breakpoint  A breakpoint has been reached.

EXCEPTION_CODE_STR:  80000003

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_STR:  0x80000003

STACK_TEXT:  
fffffa0b`637cf2f0 fffff803`c87f0ef0     : 00000000`00000001 00000000`00000008 00000000`00000065 00000000`c0000022 : tabletaudiosample+0x35c67
fffffa0b`637cf2f8 00000000`00000001     : 00000000`00000008 00000000`00000065 00000000`c0000022 00000000`00000000 : tabletaudiosample+0x60ef0
fffffa0b`637cf300 00000000`00000008     : 00000000`00000065 00000000`c0000022 00000000`00000000 00000000`00000038 : 0x1
fffffa0b`637cf308 00000000`00000065     : 00000000`c0000022 00000000`00000000 00000000`00000038 00000000`00000000 : 0x8
fffffa0b`637cf310 00000000`c0000022     : 00000000`00000000 00000000`00000038 00000000`00000000 00000000`00000000 : 0x65
fffffa0b`637cf318 00000000`00000000     : 00000000`00000038 00000000`00000000 00000000`00000000 00000001`00000001 : 0xc0000022

SYMBOL_NAME:  tabletaudiosample+35c67

MODULE_NAME: tabletaudiosample

IMAGE_NAME:  tabletaudiosample.sys

STACK_COMMAND:  .cxr 0xfffffa0b637ce8d0 ; kb

BUCKET_ID_FUNC_OFFSET:  35c67

FAILURE_BUCKET_ID:  0x7E_tabletaudiosample!unknown_function

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

FAILURE_ID_HASH:  {eac17e44-0be0-1667-8b83-58305a64ad59}

Followup:     MachineOwner
---------

0: kd> k
 # Child-SP          RetAddr               Call Site
00 fffffa0b`637cf2f0 fffff803`c87c9472     tabletaudiosample!BthHfpDevice::Init+0x6c7 [C:\Users\User\src\ms\windows-driver-samples\audio\sysvad\BthhfpDevice.cpp @ 264] 
01 fffffa0b`637cf480 fffff803`c87cb2fe     tabletaudiosample!CAdapterCommon::BthHfpScoInterfaceArrival+0x232 [C:\Users\User\src\ms\windows-driver-samples\audio\sysvad\common.cpp @ 3051] 
02 fffffa0b`637cf500 fffff803`810e6e63     tabletaudiosample!CAdapterCommon::EvtBthHfpScoBypassInterfaceChange+0x17e [C:\Users\User\src\ms\windows-driver-samples\audio\sysvad\common.cpp @ 3261] 
03 fffffa0b`637cf560 fffff803`810b316c     nt!PnpNotifyDriverCallback+0x8f
04 fffffa0b`637cf610 fffff803`c87cc443     nt!IoRegisterPlugPlayNotification+0x31c
05 fffffa0b`637cf6d0 fffff803`c87c216e     tabletaudiosample!CAdapterCommon::InitBthScoBypass+0x283 [C:\Users\User\src\ms\windows-driver-samples\audio\sysvad\common.cpp @ 3350] 
06 fffffa0b`637cf790 fffff80e`08d2e249     tabletaudiosample!StartDevice+0x29e [C:\Users\User\src\ms\windows-driver-samples\audio\sysvad\adapter.cpp @ 1099] 
07 fffffa0b`637cf820 fffff80e`08d32cc9     portcls!PnpStartDevice+0x159
08 fffffa0b`637cf8a0 fffff803`80c4c860     portcls!EnqueuedIoWorkItemCallback+0x29
09 fffffa0b`637cf8d0 fffff803`80c51f85     nt!IopProcessWorkItem+0x100
0a fffffa0b`637cf940 fffff803`80d24317     nt!ExpWorkerThread+0x155
0b fffffa0b`637cfb30 fffff803`80e38cc4     nt!PspSystemThreadStartup+0x57
0c fffffa0b`637cfb80 00000000`00000000     nt!KiStartSystemThread+0x34