Stay quiet when a smaller guest slab fits
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- operating-systems
Research direction
Start in src/core/guest.c at the slab loop in guest_init and trace how failed mmap attempts are reported before trying smaller sizes. Check how errors are handled when all slab sizes fail. Done when a smaller slab succeeding produces no stderr output, while failure of every size still reports an error.
Written by the indexing model from the issue text.
Description
Under a host address-space limit that leaves no room for the first guest slab, elfuse prints an error at boot although the guest then starts normally:
$ bash -c 'ulimit -v 1073741824; ./build/elfuse ./build/busybox true; echo rc=$?'
guest: mmap: Cannot allocate memory
rc=0
The slab loop in guest_init (src/core/guest.c) tries 2^40, 2^38 and then 2^36 bytes, and calls perror("guest: mmap") each time an attempt fails before it moves to the next size. A failure that a smaller slab then recovers from is the expected path under a lower limit, so printing it on stderr reads as a fault and mixes into the guest's own stderr.
Expected: no stderr output when a smaller slab succeeds, at most a debug log line, and an error only when every size fails.
- Dominant language
- C
- Stars
- 275
- Forks
- 29
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from sysprog21/elfuse
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 3 days
All issues in sysprog21/elfuse
Similar issues
-
bug Component component: net
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RT-Thread/rt-thread#11913 · 1 comment ·
Maintainers usually reply within 1 day
-
area:docs kind:docs-drift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InauguralSystems/EigenScript#1887 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
containers/crun#2391 ·
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
type-bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day