-
Notifications
You must be signed in to change notification settings - Fork 585
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
WaitManager.cc:126:wait() errno: EINVAL because of using waitid()
with __WALL
#3605
Comments
@rocallahan As the WaitManager comes from you, can you share some insights here? |
This works pretty much everywhere already. What kernel version are you using? |
Is this use also covered by the manpage or is my reading that this is explicit not to be done per docs? In the later case even when it works it is likely a good idea to use the documented options instead.
I guess that was quite an old one, because I wanted to update #2939 which is not applicable since the WaitManager was created - and that provided a working version on even unsupported kernels (3.10). As noted above the question is mostly: does rr now do something that is explicit documented to not work? |
My man page says
|
Ah, that makes sense. So the question is now:
What do you think? |
Yeah I think if we get EINVAL we can fall back to an alternative implementation that calls |
OK from checking the manpage I see how this would work. Other than "we know that the current implementation works" - do you see a reason to not swap (back) to waitpid in general? |
|
I'm actually not sure if this can be fixed up for pre-4.7 kernels. |
I can't figure out a way to fix this for pre-4.7. So I'm inclined to bump the minimum required kernel version to 4.7. That's still 7 years ago. |
fixes rr-debugger#3605 by clarification
After giving this more thoughts I agree and therefore created a PR to adjust the README (I find it important to leave a note for people to know they can still use rr 5.6 on older environments). The only "important" distribution that uses this old kernel and still has support is RHEL7 (which of course only supports its own kernels). Even when not officially supported (RHEL7 uses 3.10 so less than officially needed; other than newer versions RHEL7 has no rr package so no support by RedHat directly) it was possible to still use it with some patches in the past. RHEL7 is still used in a lot of production environments, but outdated/missing programs and features is what you get for using that old operating systems and using Oracle Linux 7 with the unbreakable kernel (> 5.15) may still be an option for "compatible development boxes". |
Thanks for the additional commit 829533a, that's much more useful than the old behavior! |
Debugging shows that on each call of
rr::WaitState::wait()
I'm getting to an error return of-1
witherrno
set toEINVAL
.GDB backtrace:
This fatal error is raised in
wait()
rr/src/WaitManager.cc
Lines 110 to 127 in 5817b78
do_wait()
rr/src/WaitManager.cc
Lines 41 to 58 in 5817b78
waitid()
.According to the mainpage for
waitid()
:The code that sets this option is already in since the implementation of WaitManager, so I do wonder: is the
tid
created byclone()
(If yes: where does this happen?) and:Do I misread the docs that we actually should not use
__WALL
(done in line 42) withwaitid()
(done in line 54)?The text was updated successfully, but these errors were encountered: