Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-17361

ReactOS fails to boot properly with audio stack from XP/2003

    XMLWordPrintable

Details

    Description

      How to reproduce:

      1. Install ReactOS as usually.
      2. Install AC97 VirtualBox driver from Rapps as usually, with twice installing via Device manager and reboot.
      3. Replace the following drivers onto versions from XP/2003: ks.sys, portcls.sys, swenum.sys, sysaudio.sys, wdmaud.sys.
      4. Reboot again.

      After reboot, you will see the BSOD 0x0000007F, which is UNEXPECTED_KERNEL_MODE_TRAP.
      As visible in MS_audio.log, the first additional error code is 0x0000008:

      *** Fatal System Error: 0x0000007f
                             (0x00000008,0x80736000,0x00000000,0x00000000)
      

      According to https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x7f--unexpected-kernel-mode-trap, it's a double fault, which may be caused either by kernel stack overflow, or by hardware problem(s). But since I tested it in the VM, which seems to have emulated hardware, in this case it is definitely the kernel stack overflow.
      I tried to use commands in kdbg, described in that MS article, but without success. The thread command, which is equivalent of MS's !thread, displays the problematic thread(s) correctly, but after typing bt 100, as suggested there, I got an error message that it is not yet supported. So I can't debug the issue by way from that documentation.

      It seems to me that this BSOD is caused even not by PnP issues (can trap handler errors be caused by that?), so we don't need to improve anything in PnP, to fix the actual problem I guess. My arguments are, the drivers are loaded successfully during the system bootup, and the BSOD appears only when the system tries to load the used-mode (even earlier than the startup sound is played). I may be wrong, but this is only my personal guessing.
      Moreover, if there are no any audio drivers installed, ReactOS is booting into desktop successfully with all these replaced drivers, without any BSODs or other errors. But in this case, the only problem is, after installing the audio driver(s), there is no sound devices detected, and the system is completely silent. Only after replacing the drivers back onto the ROS versions, and twice reinstallation and reboot, the sound became working, but if to replace the drivers again (onto MS versions), the same BSOD appers again, as in the attached log. And when I try to install AC97 driver with MS audio stack replaced, there is nothing suspicious in the log, as I see.

      The problem is reproducible as well for me in 0.4.15-dev-1265-gf1a4a6e.

      Attachments

        1. audio_new_2.log
          475 kB
        2. audio_new.log
          184 kB
        3. audio_updated.log
          247 kB
        4. MS_audio_new.log
          650 kB
        5. MS_audio_stack_after.png
          MS_audio_stack_after.png
          71 kB
        6. MS_audio_stack_before.png
          MS_audio_stack_before.png
          10 kB
        7. MS_audio.log
          41 kB
        8. MS_portcls+sysaudio+wdmaud.log
          62 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Oleg Dubinskij Oleg Dubinskiy
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: