Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test dlopen fails since c7d57227 #3675

Closed
bernhardu opened this issue Jan 2, 2024 · 5 comments
Closed

Test dlopen fails since c7d57227 #3675

bernhardu opened this issue Jan 2, 2024 · 5 comments

Comments

@bernhardu
Copy link
Contributor

Did a test run with current git with a regular x86_64 build and found test dlopen failing in replaying step.
A bisect leads to c7d5722 as first broken commit.
When recording with -n the replay succeeds.
This happens with a "AMD Ryzen 7 1700", no VM, zen kernel module workaround.

(rr) reverse-continue
Continuing.
[FATAL src/ReplaySession.cc:1315:[dlopen_apply_mprotect_records.txt](https://github.com/rr-debugger/rr/files/13809186/dlopen_apply_mprotect_records.txt)()] 
 (task 3086426 (rec:3086392) at time 227)
 -> Assertion `r.start == recorded_r.start && r.size == recorded_r.size && r.prot == recorded_r.prot' failed to hold. Trace mprotect records don't match the mprotect records generated by execution

dlopen_apply_mprotect_records.txt

@rocallahan
Copy link
Collaborator

Can you rerun with 12398d3 ?
I assume this doesn't happen with rr replay -a?

@bernhardu
Copy link
Contributor Author

Thanks for having a look, rr replay -a works without issue.
The issue just shows up in reverse execution:

[FATAL src/ReplaySession.cc:1322:apply_mprotect_records()] 
 (task 3320325 (rec:3320256) at time 227)
 -> Assertion `r.start == recorded_r.start && r.size == recorded_r.size && r.prot == recorded_r.prot' failed to hold. Mismatched mprotect record 5: recorded 0x7ff1413d0000,0x1000,r--, got 0,0,---

Attached file shows the steps of the test done manually, with 12398d3.
dlopen_apply_mprotect_records_5.7.0-124-g12398d35.txt

@rocallahan
Copy link
Collaborator

Seems like a problem that mprotect_record_count_completed is 6 but the last record in the syscallbuf has not been written.

@rocallahan
Copy link
Collaborator

OK I found a way to reproduce this or something like it.

@bernhardu
Copy link
Contributor Author

Thanks, with this I cannot see the issue with the dlopen test any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants