LinuxHelper.sched_getcpu() uses wrong syscall number: 318 (getrandom) instead of 309 (getcpu) on x86_64
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- java
- Domain
- operating-systems
Research direction
Start in LinuxHelper.sched_getcpu(), specifically the UnsatisfiedLinkError fallback that calls lib.syscall. Check the x86_64 syscall numbers against the issue description, update the fallback to use the getcpu number, and verify that the fallback invokes getcpu rather than getrandom.
Written by the indexing model from the issue text.
Description
In LinuxHelper.sched_getcpu(), the fallback path calls lib.syscall(318, cpu, node, null) intending to invoke getcpu. However, on x86_64 Linux:
__NR_getcpu = 309
__NR_getrandom = 318
So the code is actually invoking getrandom(2) with incorrect arguments rather than getcpu(2).
Location: net.openhft.affinity.impl.LinuxHelper, method sched_getcpu(), in the UnsatisfiedLinkError catch block.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from OpenHFT/Java-Thread-Affinity
-
Document releases Open
OpenHFT/Java-Thread-Affinity#186 · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
OpenHFT/Java-Thread-Affinity#137 ·
-
OpenHFT/Java-Thread-Affinity#119 · 1 comment · 1 assignee ·
-
OpenHFT/Java-Thread-Affinity#117 · 8 comments · 1 assignee ·
-
OpenHFT/Java-Thread-Affinity#115 · 1 comment · 1 assignee ·
All issues in OpenHFT/Java-Thread-Affinity
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100