24.8.14 Backport of #79147 - Remove guard pages from fibers and alternative stack for signals in threads#2035
24.8.14 Backport of #79147 - Remove guard pages from fibers and alternative stack for signals in threads#2035mkmkme wants to merge 1 commit into
Conversation
…ack-protection stack allocation in Fiber and alternative stack for signals
|
This is an automated comment for commit 3691792 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
|
Honestly I am a bit shocked because I expected something like this https://github.com/Altinity/ClickHouse/tree/backports/24.8.14/79147_tiny This is a compact change, it keeps ::munmap and everything that is natural for 24.8 Anyway, the PR looks good to me. |
I was considering that, but wanted to keep it as close to upstream as possible. |
Note for the reviewer
This PR originally changed two files and I had conflicts in both of them. One of them,
FiberStack.cpp, was missing from the original 24.8 branch because it was added later.Initially I landed the changes on
FiberStack.hitself and introduced the missingmemoryGuardInstall/memoryGuardRemovefunctions toCommon/memory.h, creatingCommon/memory.cppas well. This, however, broke the build for a missingjemalloc.hbecauseFiberStack.hgot an include forCommon/memory.h:Because of that, I decided to split
FiberStackto a header and implementation file as it is in the upstream. When I did that, I got multiple compiler errors about missingfmtandformatReadable*functions because the files using those functions previously got those from transitive includes byFiberStack.h. After I moved most of inclusions toFiberStack.cpp, the functions became undefined.Before adding the extra includes to
Keeper.cpp,ClientBase.cpp,Connection.cppandAsyncTaskExecutor.cppI verified those includes existed in the upstream's versions of those files at the moment of the original PR.Unfortunately all of this led to the situation where the PR got quite large in comparison to the original one.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Remove guard pages for threads and async_socket_for_remote/use_hedge_requests. Change the allocation method in
FiberStackfrommmaptoaligned_alloc. Since this splits VMAs and under heavy load vm.max_map_count can be reached (ClickHouse#79147 by @CheSema)Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: