Act nowcan affect a running systemThe raw payload contains five non-merge commits and no merge commit; every commit is covered below. It contains no deprecation notice and no superseded_by marker. The avoid range is supported by the direct build 17024 correction to CheckProc in the same payload.
Async OpenSSL handshakes retry correctly while TSynLog shortens its write lock
OpenSSL-backed non-blocking clients and servers now retry SSL_connect and SSL_accept after WANT_READ or WANT_WRITE instead of treating them as fatal. The final commit preserves the first SSL_get_error result so real handshake failures report the correct cause. TSynLog also moves stack-trace and system-information collection outside its writer lock, reducing contention at the cost of larger per-thread state and bounded suffixes.
TL;DR
- Land on build 2.4.17024 at 13c7b4dd94b23c25d51e5b0ab9b6e207cb039207.
- OpenSSL TLS handshakes over asynchronous sockets now retry WANT_READ and WANT_WRITE for up to five seconds.
- Avoid builds 2.4.17020–2.4.17023: the new retry loop re-queries SSL_get_error while reporting a terminal failure; build 2.4.17024 passes the captured code.
- TSynLog pre-renders configured stack traces and system information before taking its per-writer lock.
- The TSynLog thread record grows by 320 bytes, stack-trace suffixes are capped at 255 bytes and system-information suffixes at 63 bytes.
- AppendSysInfo is a new public helper that appends system information without clearing an existing ShortString.
Upgrade advice
Land on build 2.4.17024. OpenSSL users with non-blocking sockets should upgrade and exercise both client SSL_connect and server SSL_accept under WANT_READ, WANT_WRITE, timeout and certificate failure. Do not stop on 2.4.17020–2.4.17023 because the retry path’s final error report is incomplete. If LevelStackTrace or LevelSysInfo is enabled, compare log suffixes and account for 320 additional thread-local bytes per logging thread.
5 of 5 entries · 5 commits upstream
1
High
Non-blocking OpenSSL handshakes wait instead of failing immediately
TOpenSslNetTls.AfterConnection and AfterAccept now call CheckProc around SSL_connect and SSL_accept. CheckProc retries SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, waits for the matching TNetEvents set and enforces a five-second deadline. TShort95 and PShort95 are also added.
Fixes
mormot.core.base+1
1e45eae5+43-6
lib: fixed unexpected TLS exception with OpenSSL async socket
Impact
OpenSSL-backed asynchronous clients and servers no longer turn a normal non-blocking handshake transition into an EOpenSsl exception. A stalled handshake now raises an explicit timeout after five seconds.
Upgrade recommended
Upgrade directly to build 2.4.17024 and test non-blocking client and server handshakes; do not deploy this first retry implementation alone.
Public API
TShort95added — A public string[95] alias and its PShort95 pointer type are now available.
2
High
TLS failures retain the error captured beside SSL_connect
EOpenSsl.CheckFailed accepts an optional sslerrcode. TOpenSslNetTls.CheckProc passes the error returned by CheckSsl immediately after SSL_connect or SSL_accept, so the exception formatter does not call SSL_get_error again after intervening work.
Fixes
mormot.lib.openssl11
13c7b4dd+10-6
lib: fixed TOpenSslNetTls.CheckProc error report
Impact
Terminal certificate, protocol and peer failures on the new asynchronous handshake path report the original SSL_ERROR_* state and its verification context instead of a stale or unrelated code.
Upgrade recommended
Land on build 2.4.17024 and verify that rejected certificates and protocol mismatches produce the expected EOpenSsl details.
Units
3
Medium
Stack and system suffixes are rendered before the log lock
TSynLog.LockAndPrepareWrite now fills thread-local StackTrace and SysInfo buffers before fWriteSafe.Lock. LogTrailerAndUnlock appends those buffers and releases the lock. TSynLogThreadInfo gains a 255-byte ShortString and a TShort63, increasing its documented per-thread size by 320 bytes.
Performance
mormot.core.log
b1ddba46+80-60
core: TSynLog pre-renders the stack trace and the sysinfo
Impact
Slow stack-symbol loading and operating-system queries no longer extend the serialized log-writing section. Services with many logging threads consume more thread-local memory, and configured suffixes are now capped at 255 and 63 bytes respectively.
Worth a look
If LevelStackTrace or LevelSysInfo is enabled, compare suffix completeness and measure contention plus thread-local memory on a representative workload.
Public API
TSynLogFamily.LevelStackTracebehaviour-changed — Configured stack traces are pre-rendered outside the write lock and capped at 255 AnsiChars.TSynLogFamily.LevelSysInfobehaviour-changed — Configured system-information suffixes are pre-rendered outside the write lock into TShort63.
Units
4
Low
System information can be appended to existing short text
mormot.core.os exposes AppendSysInfo, which appends processor, load, uptime and memory data to a ShortString without clearing it. RetrieveSysInfoText now clears the destination and delegates to the new helper. A leftover CheckProc writeln is removed.
New features
mormot.core.os+1
ea2c5066+11-4
core: new AppendSysInfo() function
Impact
Existing RetrieveSysInfoText callers keep replacement semantics. New callers can construct compact prefixed diagnostics in one bounded ShortString, and OpenSSL handshake retries no longer write debug lines to standard output.
Public API
AppendSysInfoadded — The procedure appends system information to the supplied ShortString and does not reset its existing content.
5
Low
Debug-file registration avoids unnecessary exclusive locking
DebugFileRegister checks shutdown and known-unknown libraries under DebugFilesSafe.ReadLock before acquiring WriteLock, then rechecks inside the write section. RawStackTrace simplifies its exception guard, and AppendCallerShort stops resolving symbols outside the executable.
Under the hood
mormot.core.log
d09fc6cd+36-40
core: some TSynLog and stack trace refactoring
Impact
Repeated stack resolution for libraries already known to lack debug data no longer serializes all readers behind a write lock. AppendCallerShort output is limited to executable debug information; FindLocationShort still resolves external library names and symbols.
Public API
TDebugFile.AppendCallerShortbehaviour-changed — Caller stacks no longer include fallback names or symbols for frames outside the executable.