mORMot2 Daily每日上游提交速读

29 commits landed upstream

This edition has not been reviewed yet: the entries below are classified automatically from commit messages and diffs, without an editorial pass. Treat the categories as hints and follow the commit links for the truth.

版本号2.4.16672 → 2.4.16701
提交29
行数+2121 -1252
阅读3 分钟

22 条中的 22 条 · 上游 29 次提交

# 条目 类别 单元
1 严重 net: rewritten mormot.net.tunnel.pas - the core now is cleaner via a new ITunnelOpenState interface as main engine - fixed a lot of race conditions and other issues 修复auto mormot.net.client+1 b1b1f67d+744-385
2 中 net: fixed THttpMultiPartStream duplicated closing boundaries - fix #565 THttpMultiPartStream.Flush appended the closing --boundary-- lines on every call, and THttpClientSocket.RequestInternal computed Content-Length: from InStream.Size before its Seek(0, soBeginning) triggered another Flush: the body sent was 22 bytes longer than announced, and the server parsed the trailing boundary as the next request line (http.sys: 400 Invalid Verb). Every retry - e.g. each round trip of the NTLM/Negotiate handshake - added one more copy. - Flush now appends the closing boundaries only once (fFlushed flag), so it is safe to call it any number of times - Add*() after Flush raise EHttpSocket instead of producing a broken body (AddFile checks before opening the file) - RequestInternal rewinds InStream before Content-Length: is computed, so Size is right even without an explicit Flush call - tests: Flush/Seek idempotency and byte-exact re-read in TTestCoreBase.MultiPartDecoder; two keep-alive POST of the same stream (plus a never-flushed one) against THttpServer and THttpAsyncServer in TNetworkProtocols.DoHttpBodyDownload - both red before the fix 修复auto mormot.net.client d492c4b0+102-7

Sven Harazim · 13:55 UTC · PR #565 · 在 GitHub 上查看该提交 →

3 中 net: fixed async server potential thread race 修复auto mormot.net.async a333a689+24-11

Arnaud Bouchez · 09:15 UTC · 在 GitHub 上查看该提交 →

4 中 net: fix lost thread wakeup in TAsyncConnections.ThreadPollingWakeupOne/Events Since 73cb95431 the R1..Rn atpReadPending threads are woken up through two CAS counters (fWakeupOne/fWakeupEvents) consumed by ThreadPollingWakeupLocked, which is entered only after a successful fWakeupSafe.TryLock. If a caller increments a counter just after the current lock holder did its LockedGet32() and then fails its own TryLock, nobody consumes that request: fWakeupOne stays at 1, so every further ThreadPollingWakeupOne() fails its "if not already notified" CAS and returns without doing anything. On an idle server this is fatal: the R0 atpReadPoll thread sleeps in WaitForEver (no subscribed connection) or polls epoll forever (accepted connections are not subscribed before their first read), accept() keeps succeeding but the new connections are never processed - the process is alive but the HTTP server is dead, with CLOSE-WAIT sockets piling up. Observed on production RK3588 boards (THttpAsyncServer, 8 threads) after 8-18 hours, and reproduced in about 4 minutes (114 rounds) with a mix of concurrent short-lived and keep-alive connections separated by idle gaps: /proc stacks showed R0 in TSynEvent.WaitFor(INFINITE) from DoExecute and R1 idle in WaitForEver, with no runnable thread. Fix: - ThreadPollingWakeupLocked: after UnLock, re-check both counters and run once more if any is non-zero and the lock can be re-acquired, so a request raced against the holder is never left pending. - ThreadPollingWakeupOne: always attempt the TryLock, even when fWakeupOne was already set, so a pending notification is self-healing on the next accept() instead of silently disabling all further wakeups. With this change the same stress ran 1910 rounds / 45 minutes without any stall (and 1160 rounds in a first 28 minutes run), where the previous code died at round 114. 修复auto mormot.net.async 4b07c730+17-3
5 中 boot: fixed bootstrap script 修复auto 2194da9b+9-9

Arnaud Bouchez · 12:15 UTC · 在 GitHub 上查看该提交 →

6 中 net: fixed Windows compilation ;) 修复auto mormot.net.async 56e2752a+3-3

Arnaud Bouchez · 13:45 UTC · 在 GitHub 上查看该提交 →

7 中 boot: new boot/ sub-folder to bootstrap a FPC build env for AI agents 新功能auto 16e06575+647-3

Arnaud Bouchez · 12:13 UTC · 在 GitHub 上查看该提交 →

8 中 core: new FPCMM_MEDIUMTOLARGE conditional - enabled on FPCMM_SERVER - will fallback to the large allocator on medium contention of blocks > 48KB - seems like a simple but very efficient fallback strategy 新功能auto mormot.core.fpcx64mm c5d4f5c3+55-17

Arnaud Bouchez · 13:44 UTC · 在 GitHub 上查看该提交 →

9 中 core: add opt-in full small-block sharding 新功能auto mormot.core.fpcx64mm 58abf7f0+44-5
10 低 core: read Win64 thread ID directly from the TEB 编译器与平台auto mormot.core.fpcx64mm a7f1068b+4-6
11 低 boot: updated script for better FPC configuration file 编译器与平台auto 8b33b6b1+5-4

Arnaud Bouchez · 12:24 UTC · 在 GitHub 上查看该提交 →

12 低 core: #563 code cleanup - no functional change 内部重构auto mormot.core.fpcx64mm 73e34c56+29-28

Arnaud Bouchez · 08:41 UTC · PR #563 · 在 GitHub 上查看该提交 →

13 低 core: minor code refactoring - no functional change 内部重构auto mormot.core.fpcx64mm+1 09bdf54c+7-8
14 低 tests: let TNetworkProtocols.Tunnel cover relay.AgentInfo method 测试auto 46cc440e+75-2

Arnaud Bouchez · 18:14 UTC · 在 GitHub 上查看该提交 →

15 低 test: ensure expected exception are not logged - after #566 - includes also minor comment precisions 测试auto mormot.core.fpcx64mm+1 6340aef4+26-20
16 低 boot: removed this boot/ experiment which was disastrous - ChatGpt was not aware of its own limitations - what a waste of time! 杂项auto aa59acd2+3-647

Arnaud Bouchez · 14:07 UTC · 在 GitHub 上查看该提交 →

17 低 core: always prefetch a MM medium block outside of the lock - does not seem to reduce the contention, but should help anyway 杂项auto mormot.core.fpcx64mm 14caddba+47-15

Arnaud Bouchez · 12:16 UTC · 在 GitHub 上查看该提交 →

18 低 core: MM allow eventual OS reclaim after #563 杂项auto mormot.core.fpcx64mm 8343fa49+28-25

Arnaud Bouchez · 08:15 UTC · PR #563 · 在 GitHub 上查看该提交 →

19 低 core: refined TMediumBlockInfo CPU cache alignment - each lock should be on its own cache line 杂项auto mormot.core.fpcx64mm+1 094f81d5+19-15
20 低 core: retain repeatedly reused small-block pools 杂项auto mormot.core.fpcx64mm 6768230c+20-1
21 低 core: skip medium-to-large fallback with per-thread arenas 杂项auto mormot.core.fpcx64mm 4ca2fd27+8-4
22 低 core: reset small pool reuse on cold release path 杂项auto mormot.core.fpcx64mm 103c03a8+5-4
上游活动 每日提交数 · 最近 60 天
提交977
活跃天数44/60
最忙一天2026-09-30
峰值60
2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 26 commits2026-08-28: 11 commits2026-08-29: 10 commits2026-08-30: 1 commit2026-08-31: 23 commits2026-09-01: 0 commits2026-09-02: 20 commits2026-09-03: 29 commits2026-09-04: 35 commits2026-09-05: 13 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 23 commits2026-09-09: 10 commits2026-09-10: 17 commits2026-09-11: 23 commits2026-09-12: 14 commits2026-09-13: 9 commits2026-09-14: 7 commits2026-09-15: 4 commits2026-09-16: 24 commits2026-09-17: 26 commits2026-09-18: 21 commits2026-09-19: 59 commits2026-09-20: 13 commits2026-09-21: 5 commits2026-09-22: 34 commits2026-09-23: 17 commits2026-09-24: 57 commits2026-09-25: 22 commits2026-09-26: 26 commits2026-09-27: 0 commits2026-09-28: 2 commits2026-09-29: 19 commits2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 33 commits2026-10-11: 9 commits2026-10-12: 11 commits2026-10-13: 35 commits
2026-08-152026-10-13