Recording Wine no longer works, shows `.../loader/wine: failed to read ELF header`.
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp, linux
- Domain
- operating-systems
Research direction
Start with the Wine change to loader/preloader.c linked in the report, then trace how rr uses FIXED_SCRATCH_PTR and librrpage.so during recording. Compare the suggested preload ranges with rr's current assumptions and reproduce the reported failed to read ELF header error. Done means recording works with the affected Wine change; the report notes replay also needs a workaround for #4124.
Written by the indexing model from the issue text.
Description
Since this Wine commit, specifically the changes to loader/preloader.c, it looks like Wine unmaps the first 8G,
therefore the scratch memory at FIXED_SCRATCH_PTR no longer works,
the librrpage.so gets removed, which seems to make the wld_read in loader/preloader.c to fail.
Just reverting those two lines in loader/preloader.c makes recording work again,
or following lines may be closer to what the current wine unmapping wants to achieve:
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -117,7 +117,11 @@ static struct wine_preload_info preload_info[] =
{ (void *)0x7f000000, 0x00ff0000 }, /* top-down allocations + shared user data */
#else
{ (void *)0x00010000, 0x00100000 }, /* DOS area */
- { (void *)0x00110000, 0x1ffef0000 }, /* low 8G */
+ { (void *)0x00110000, 0x67ef0000 }, /* low memory area */
+ /* 0x68000000, 0x00200000 rr's FIXED_SCRATCH_PTR */
+ { (void *)0x68200000, 0x07df0000 }, /* */
+ /* 0x6fffd000, 0x00004000 rr's librrpage.so */
+ { (void *)0x70010000, 0x18fff0000 }, /* */
#endif
{ 0, 0 }, /* PE exe range set with WINEPRELOADRESERVE */
{ 0, 0 } /* end of list */
Unfortunately, I guess, this is the second issue with Wine besides #3972, that looks quite hard to fix?
Replaying currently needs some workaround for #4124.
I have not yet reported this in Wine's bugtracker.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 666
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 32
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 rr-debugger/rr
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rr-debugger/rr#4145 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
rr-debugger/rr#4146 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rr-debugger/rr#4060 · 5 comments ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rr-debugger/rr#4059 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rr-debugger/rr#4047 · 4 comments ·
Maintainers usually reply within 2 days
Similar issues
-
Favicons are coolOpenenhancement frontend
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Spot Capacity Round Trips tests accept the two largest rising runsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
project: hipblaslt
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ROCm/rocm-libraries#15746 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bazel-contrib/rules_go#4784 · 1 comment ·
Maintainers usually reply within 1 day