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

Intel GPU driver for 945/965 requests too many system PTEs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None

    Description

      Test machine: Lenovo x60 with 2 GB ram.

      The driver of https://downloadcenter.intel.com/download/15559/Intel-Graphics-Media-Accelerator-Driver-for-Windows-XP requests to many systemPTS, trying from 655536 downwards, and leave no room for e.g. for win32k.

      This driver tries 65536, 57000, 49000 ones until it succeeds at someting over 40000. Unluckily, then there is not enough left for loading win32k -> crash.
      Limiting the max. allocation to 20000 seems to be enough - the driver tries 16384 pages which seems to be fine for the driver.

      Backtrace (yes, I added an assert(FALSE) here):

      kdb:> bt
      Eip:
      <ntoskrnl.exe:15536f (:0 (DbgBreakPoint))>
      Frames:
      <ntoskrnl.exe:d442a (ntoskrnl/mm/ARM3/syspte.c:265 (MiReserveSystemPtes))>
      <ntoskrnl.exe:ad380 (ntoskrnl/mm/ARM3/iosup.c:100 (MmMapIoSpace))>
      <VIDEOPRT.SYS:7344 (win32ss/drivers/videoprt/resource.c:355 (IntVideoPortMapMemory))>
      <VIDEOPRT.SYS:761d (win32ss/drivers/videoprt/resource.c:457 (VideoPortGetDeviceBase))>
      <igxpmp32.sys:1f95e>
      <igxpmp32.sys:587bb4>
      <igxpmp32.sys:29f8>
      <VIDEOPRT.SYS:a037 (win32ss/drivers/videoprt/videoprt.c:345 (IntVideoPortFindAdapter))>
      <VIDEOPRT.SYS:3ce7 (win32ss/drivers/videoprt/dispatch.c:622 (IntVideoPortPnPStartDevice))>
      <VIDEOPRT.SYS:3fcb (win32ss/drivers/videoprt/dispatch.c:736 (IntVideoPortDispatchFdoPnp))>
      <VIDEOPRT.SYS:4141 (win32ss/drivers/videoprt/dispatch.c:805 (IntVideoPortDispatchPnp))>
      <ntoskrnl.exe:720e0 (ntoskrnl/io/iomgr/irp.c:1286 (IofCallDriver))>
      <ntoskrnl.exe:7acfd (ntoskrnl/io/pnpmgr/pnpmgr.c:1467 (IopSynchronousCall))>
      <ntoskrnl.exe:81391 (ntoskrnl/io/pnpmgr/pnpmgr.c:816 (IopStartDevice2))>
      <ntoskrnl.exe:80959 (ntoskrnl/io/pnpmgr/pnpmgr.c:870 (IopStartAndEnumerateDevice))>
      <ntoskrnl.exe:80e56 (ntoskrnl/io/pnpmgr/pnpmgr.c:942 (IopStartDevice))>
      <ntoskrnl.exe:7a255 (ntoskrnl/io/pnpmgr/pnpinit.c:365 (PipCallDriverAddDevice))>
      <ntoskrnl.exe:81839 (ntoskrnl/io/pnpmgr/pnpmgr.c:3051 (IopActionInitChildServices))>
      <ntoskrnl.exe:7b0b1 (ntoskrnl/io/pnpmgr/pnpmgr.c:1526 (IopTraverseDeviceTreeNode))>
      <ntoskrnl.exe:7b0c6 (ntoskrnl/io/pnpmgr/pnpmgr.c:1540 (IopTraverseDeviceTreeNode))>--- Press q to abort, any other key to continue ---
      <ntoskrnl.exe:7b0c6 (ntoskrnl/io/pnpmgr/pnpmgr.c:1540 (IopTraverseDeviceTreeNode))>
      <ntoskrnl.exe:7b0c6 (ntoskrnl/io/pnpmgr/pnpmgr.c:1540 (IopTraverseDeviceTreeNode))>
      <ntoskrnl.exe:7b0c6 (ntoskrnl/io/pnpmgr/pnpmgr.c:1540 (IopTraverseDeviceTreeNode))>
      <ntoskrnl.exe:7b185 (ntoskrnl/io/pnpmgr/pnpmgr.c:1565 (IopTraverseDeviceTree))>
      <ntoskrnl.exe:7b7c3 (ntoskrnl/io/pnpmgr/pnpmgr.c:3096 (IopInitializePnpServices))>
      <ntoskrnl.exe:802d2 (ntoskrnl/io/pnpmgr/pnpmgr.c:2786 (IopEnumerateDevice))>
      <ntoskrnl.exe:186dab (ntoskrnl/io/iomgr/iomgr.c:585 (IoInitSystem))>
      <ntoskrnl.exe:181f30 (ntoskrnl/ex/init.c:1807 (Phase1InitializationDiscard))>
      <ntoskrnl.exe:3305a (ntoskrnl/ex/init.c:2021 (Phase1Initialization))>
      <ntoskrnl.exe:11d464 (ntoskrnl/ps/thread.c:156 (PspSystemThreadStartup))>
      <ntoskrnl.exe:135845 (ntoskrnl/ke/i386/thrdini.c:78 (KiThreadStartup))>
      <ntoskrnl.exe:11d42b (ntoskrnl/ps/state.c:565 (NtQueueApcThread))>
      <5d8950ec>
      <00000000>
      kdb:>
      

      WIndows XP gives 360 MB for system PTEs for systems with 2 GB RAM, Vista+ has a dynamic pool.
      More information: https://blogs.technet.microsoft.com/markrussinovich/2009/03/10/pushing-the-limits-of-windows-paged-and-nonpaged-pool/

      A first solution would be to only accept allocations which are max half of available space...

      Attachments

        Activity

          People

            bug zilla Bug Zilla
            mifritscher mifritscher
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: