Reapply the #581 thread-heap release (TLS detach callback) - #1275
Merged
Conversation
This reverts commit f843db8, which removed the #581 fix on a false attribution. The arm64 shards were crashing because of an unaligned SQLite page-cache slab (fixed in #1274, arm64 shard 2/2 green since); removing this callback never changed those crashes, which is what exonerated it. The Windows soak then failed for the obvious reason: the leak was back. Static MinGW links have no DllMain and register no TLS callback, so mi_thread_done never runs and every thread leaks its heap -- 607 heaps after 300 requests holding 170 MiB against a ~300 KiB live set. With the callback the 10-minute Windows soak measured 1.1x against the original 53x. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reapplies the #581 fix reverted in f843db8 on a false attribution.
The
windows-11-armcrashes were an unalignedSQLITE_CONFIG_PAGECACHEslab, fixed in #1274 — removing this callback never changed them, which is what cleared it. The Windows soak then failed simply because the leak was back.Static MinGW links have no
DllMainand register no TLS callback, somi_thread_donenever runs: 607 thread-heaps after 300 requests holding 170 MiB against a ~300 KiB live set. With the callback the 10-minute Windows soak measured 1.1× against the original 53× / 5.9 GB/hr (#581).