Extending the AT for upcoming kernel makes certain software segfault
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 358
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
We ran into a segfault when testing the UEK next 6.10 kernel and wanted to share this with you.
You can reproduce this by running this:
docker run clickhouse/clickhouse-server:latest
[..]
AT_* is out of range: 71 (maximum allowed is 64)
Aborted (core dumped)
The introduction of va reservation:
#define AT_VA_RESERVATION 71 /* VA reservation support */
Makes software like Clickhouse segfault which has code like this:
// We don't have libc struct available here.
// Compute aux vector manually (from /proc/self/auxv).
//
// Right now there is only 51 AT_* constants,
// so 64 should be enough until this implementation will be replaced with musl.
static unsigned long __auxv_procfs[64];
https://github.com/ClickHouse/ClickHouse/blob/master/base/glibc-compatibility/musl/getauxval.c#L30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with docker run clickhouse/clickhouse-server:latest on the UEK next 6.10 kernel. Read the AT_VA_RESERVATION definition in the linked kernel commit and ClickHouse's base/glibc-compatibility/musl/getauxval.c, especially its fixed 64-entry auxiliary-vector array. Done means the reported ClickHouse startup segfault is resolved when AT_VA_RESERVATION is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, docker, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100