microsoft / microsoft/mimalloc

Crash on application startup on windows 11 (22H2)

Open
#657 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

Sometimes on startup we have a crash with the following callstack:

![callstack](https://user-images.githubusercontent.com/600507/206239109-3b4a9524-f7d4-4c10-97e8-e9f8a803633b.png)

_**mimalloc output:**_

mimalloc: process init: 0x601be80000
mimalloc: secure level: 0
mimalloc: mem tracking: none
mimalloc: using 1 numa regions
mimalloc: option 'show_errors': 0
mimalloc: option 'show_stats': 0
mimalloc: option 'verbose': 3
mimalloc: option 'eager_commit': 1
mimalloc: option 'deprecated_eager_region_commit': 0
mimalloc: option 'deprecated_reset_decommits': 0
mimalloc: option 'large_os_pages': 0
mimalloc: option 'reserve_huge_os_pages': 0
mimalloc: option 'reserve_huge_os_pages_at': -1
mimalloc: option 'reserve_os_memory': 0
mimalloc: option 'deprecated_segment_cache': 0
mimalloc: option 'page_reset': 0
mimalloc: option 'abandoned_page_decommit': 0
mimalloc: option 'deprecated_segment_reset': 0
mimalloc: option 'eager_commit_delay': 4
mimalloc: option 'decommit_delay': 25
mimalloc: option 'use_numa_nodes': 0
mimalloc: option 'limit_os_alloc': 0
mimalloc: option 'os_tag': 100
mimalloc: option 'max_errors': 16
mimalloc: option 'max_warnings': 16
mimalloc: option 'max_segment_reclaim': 8
mimalloc: option 'allow_decommit': 1
mimalloc: option 'segment_decommit_delay': 500
mimalloc: option 'decommit_extend_delay': 1
mimalloc: option 'destroy_on_exit': 0
mimalloc: malloc is redirected.
mimalloc-redirect: trace: build: Jan 10 2022
mimalloc-redirect: trace: windows version: 10.0.22621
mimalloc-redirect: trace: checking for target mimalloc.dll
mimalloc-redirect: trace: checking for target mimalloc-override.dll
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Renga.exe"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\ntdll.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\KERNEL32.DLL"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\KERNELBASE.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\USER32.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\mimalloc-redirect.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\win32u.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\mimalloc-override.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\GDI32.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\SpecsEngine.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\gdi32full.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\RPCRT4.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\msvcp_win.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\ADVAPI32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\SHLWAPI.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\ucrtbase.dll"
mimalloc-redirect: trace: resolving "ucrtbase.dll"
mimalloc-redirect: trace: resolve "malloc" at ucrtbase.dll!0x00007FFCA36A1AC0 to mimalloc!0x00007FFBF5C524B0 (0)
mimalloc-redirect: trace: resolve "calloc" at ucrtbase.dll!0x00007FFCA36A34F0 to mimalloc!0x00007FFBF5C52FB0 (0)
mimalloc-redirect: trace: resolve "realloc" at ucrtbase.dll!0x00007FFCA36A1A40 to mimalloc!0x00007FFBF5C53DB0 (0)
mimalloc-redirect: trace: resolve "free" at ucrtbase.dll!0x00007FFCA36A37B0 to mimalloc!0x00007FFBF5C530B0 (0)
mimalloc-redirect: trace: resolve "_expand" at ucrtbase.dll!0x00007FFCA36E9430 to mimalloc!0x00007FFBF5C53010 (0)
mimalloc-redirect: trace: resolve "_recalloc" at ucrtbase.dll!0x00007FFCA36B92C0 to mimalloc!0x00007FFBF5C53FD0 (0)
mimalloc-redirect: trace: resolve "_msize" at ucrtbase.dll!0x00007FFCA36B18C0 to mimalloc!0x00007FFBF5C54150 (0)
mimalloc-redirect: trace: resolve "_malloc_base" at ucrtbase.dll!0x00007FFCA36A1AD0 to mimalloc!0x00007FFBF5C524B0 (0)
mimalloc-redirect: trace: resolve "_calloc_base" at ucrtbase.dll!0x00007FFCA36A3500 to mimalloc!0x00007FFBF5C52FB0 (0)
mimalloc-redirect: trace: resolve "_realloc_base" at ucrtbase.dll!0x00007FFCA36A1A50 to mimalloc!0x00007FFBF5C53DB0 (0)
mimalloc-redirect: trace: resolve "_free_base" at ucrtbase.dll!0x00007FFCA36A37D0 to mimalloc!0x00007FFBF5C530B0 (0)
mimalloc-redirect: trace: resolve "_expand_base" at ucrtbase.dll!0x00007FFCA370A260 to mimalloc!0x00007FFC696C5010 (0)
mimalloc-redirect: trace: resolve "_recalloc_base" at ucrtbase.dll!0x00007FFCA36A0ECC to mimalloc!0x00007FFC696C5040 (0)mimalloc-redirect: trace: resolve "_msize_base" at ucrtbase.dll!0x00007FFCA36B18D0 to mimalloc!0x00007FFC696C4FF0 (0)
mimalloc-redirect: trace: resolve "_aligned_malloc" at ucrtbase.dll!0x00007FFCA36A19B0 to mimalloc!0x00007FFBF5C51AD0 (0)
mimalloc-redirect: trace: resolve "_aligned_realloc" at ucrtbase.dll!0x00007FFCA3709E10 to mimalloc!0x00007FFBF5C51BF0 (0)
mimalloc-redirect: trace: resolve "_aligned_free" at ucrtbase.dll!0x00007FFCA36A32C0 to mimalloc!0x00007FFBF5C530B0 (0)
mimalloc-redirect: trace: resolve "_aligned_recalloc" at ucrtbase.dll!0x00007FFCA3709FF0 to mimalloc!0x00007FFBF5C520A0 (0)
mimalloc-redirect: trace: resolve "_aligned_msize" at ucrtbase.dll!0x00007FFCA3709800 to mimalloc!0x00007FFC696C5420 (0)mimalloc-redirect: trace: resolve "_aligned_offset_malloc" at ucrtbase.dll!0x00007FFCA36B70D0 to mimalloc!0x00007FFBF5C51B80 (0)
mimalloc-redirect: trace: resolve "_aligned_offset_realloc" at ucrtbase.dll!0x00007FFCA3709870 to mimalloc!0x00007FFBF5C51C60 (0)
mimalloc-redirect: trace: resolve "_aligned_offset_recalloc" at ucrtbase.dll!0x00007FFCA3709AE0 to mimalloc!0x00007FFBF5C52090 (0)
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TablesEngine.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\msvcrt.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\SHELL32.dll"
mimalloc-redirect: trace: resolving "SHELL32.dll"
mimalloc-redirect: trace: resolve import "ntdll.dll!RtlFreeHeap" in SHELL32.dll at 0x00007FFCA56547D0 to 0x00007FFC696C57A0 (0)
mimalloc-redirect: trace: resolve import "ntdll.dll!RtlReAllocateHeap" in SHELL32.dll at 0x00007FFCA56547C0 to 0x00007FFC696C5830 (0)
mimalloc-redirect: trace: module "C:\WINDOWS\System32\sechost.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\AecMath.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Value.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\ole32.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\MepRelationEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Scripting.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\PropertiesGrid.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\combase.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Graphics.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\MathAttributes.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\COMDLG32.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ItemIdGenerator.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ParametricProfile.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\shcore.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\c3d.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\libglog.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RengaApp.Libs\Qt5Core.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\CRYPT32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\WS2_32.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RengaApp.Libs\Qt5Svg.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RengaApp.Libs\Qt5Widgets.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RengaApp.Libs\Qt5Gui.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\QPdfium.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Pat.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\MSVCP140.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RengaApp.Libs\Qt5Xml.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\tidy.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\VCRUNTIME140_1.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\CrashRpt.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\CollaborationController.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\VCOMP140.DLL"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\DxfConverter.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\DxfExporter.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Model.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Exchange3DFormatsConverter.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\FontEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ProjectStorage.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\CollisionEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RenderEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\HMD.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Serialization.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ScriptingEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Geometry.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Reinforcement.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Ifc4Export.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\GeneralizedModel.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Ifc4Import.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Tables.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\CollaborationExchange.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ProjectConverter.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ProjectController.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Expressions.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Specs.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\APIBackend.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\CSVExporter.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ProjectExplorer.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RepresentationEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\SectionGeometryAlgo.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Activity.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\CollaborationCore.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\dwmapi.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\VERSION.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\XINPUT9_1_0.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ZodiacGraph.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\MepTrace.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\xsec_2_0.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\EmbeddedPreviewEngine.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\xerces-c_3_2.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\PluginsSystem.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\System32\OLEAUT32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.22621.608_none_fb280a3c7926c2cc\COMCTL32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\MPR.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\WINSPOOL.DRV"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\prntvpt.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\WINMM.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\pdfium.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\RengaApp.Libs\libGLESv2.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\UxTheme.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\Logging.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\ISM_21.2_14.tx"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\PlotSettingsValidator_21.2_14.tx"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_Alloc_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_Db_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_DbEntities_21.2_14.tx"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_DbCore_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_DbRoot_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_Ge_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_Gi_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_Root_21.2_14.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\MeshExporter.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\DWrite.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\assimp.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\d2d1.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\GFSDK_SSAO.win64.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\d3d11.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\D3DCOMPILER_47.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\MSVCP140_ATOMIC_WAIT.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\IfcPlusPlusIfc4.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\IfcMapping.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\InternalAPI.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\mscoree.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\zlib.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\absl.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\icuuc.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\libc++.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\d3d9.dll"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\TD_SpatialIndex_21.2_14.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\Secur32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\dxgi.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\OPENGL32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\bcrypt.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL"
mimalloc-redirect: trace: module "D:\rengasrc\Bin\Release\dbghelp.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\GLU32.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\dxcore.dll"
mimalloc-redirect: trace: module "C:\WINDOWS\SYSTEM32\SSPICLI.DLL"
mimalloc-redirect: trace: standard malloc is redirected

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the attached call stack and the mimalloc redirect output for the Windows 11 22H2 startup path. Reproduce the intermittent crash with the reported module-loading sequence, then identify and verify a fix that prevents the application from crashing during startup.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.