-
Notifications
You must be signed in to change notification settings - Fork 171
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
BUG: test failures on 32-bit x86 in 36-sim-ipc_syscalls and 37-sim-ipc_syscalls_be #166
Comments
Hmm, this is curious. The
... and even then it should only trigger in the multilib case. @andreasbaumann you reported this as 32-bit x86, but is this on a 64-bit x86_64 system where you are compiling for 32-bit x86? |
It's in a 32-bit chroot on a 64-bit system (Archlinux32 chroot on Archlinux). |
Aha. So the tests run if I build the package on a i486 virtual machine. |
Or there is a mismatch with kernel header/glibc in our 32-bit packages and the host kernel.. |
Thanks for the clarification, this is starting to make sense. Yes, I believe the issue is rooted in the mismatch between the host's native ABI (64-bit x86_64) and the process (32-bit x86). At this moment I don't happen to have a 64-bit x86_64 system with a 32-bit x86 chroot for testing, @andreasbaumann would you be able to instrument |
I added:
and:
and I'm getting with test '36-sim-ipc_syscalls':
|
FYI similar failing tests for ppc64le architecture as reported in https://bugzilla.opensuse.org/show_bug.cgi?id=1142614 ; but "semtimedop" reports rc -14 (not semget as for this issue) |
Looking at the output @andreasbaumann posted I see the following for
In this case we know we are talking about "36-sim-ipc_syscalls" so we can see that we have configured libseccomp to generate filters for x86, x86_64, and x32; with x86 being the "native" ABI. We then see something similar with Then we get to the
... here it looks like we fail to resolve the Looking over the libseccomp arch/ABI code quickly, everything would appear to be correct. However, looking at recent related kernel changes I see the following commit which first shipped in Linux v5.1:
@andreasbaumann you mentioned that you are seeing this problem on Linux v5.2 (@michelmno I don't see a kernel version in the bug report you posted), do you also see the problem on Linux v5.1? What about Linux v5.0 or earlier? |
Yes, I tested on 5.2. |
Yes, thanks. I was trying to understand if you saw similar problems on Linux v5.1 and v5.0 (or earlier). |
I didn't test explicitely with 5.1 or 5.0. Let me dig into the archives to see what versions |
-rw-r--r-- 1 http http 72900 Jun 16 15:15 pool/libseccomp-2.4.1-2.1-i686.pkg.tar.xz |
tests for ppc64le on opensuse was with kernel Linux versions: 5.1.16 & 5.2.2 ; the last available rpm built successfully on June 24th that was around linux version 5.1.7 (I do not have details of previous builds except an old one that succeeded with 4.12.14) |
Hmm. I would have expected builds based on Linux v5.1 to fail as well. Bummer. It still may be worth testing this again once the syscall table is updated (see issue #163). |
I redid all building and testing in a virtual machine (libvirt/qemu/i686) and in 32-bit chroots on
On the positive side, 5.1 also fails. :-) Could it be, that libseccomp 2.4.1 cannot work on 5.0 for instance, so I have to use an |
I really start to wonder whether we ever run the tests on Archlinux32 before.. |
I would be curious to hear if this was always broken. |
@andreasbaumann I'm not sure if you still have the ability to test things quickly, but I would be curious to hear if PR #176 fixes this for you. |
I diffed the branch https://github.com/pcmoore/misc-libseccomp/tree/gh164 against |
Great, thanks for testing @andreasbaumann! |
Just FYI this also affects other combination (as expected), I see it failing on i386, ppc64le, and s390x. I can confirm that line 343 of this gives me what I need for the case that I have debugged. I agree that with #163 #164 fixed through #176 being released this can be closed. As for root cause analysis IMHO this was more breaking compared to other new syscalls because plenty of (existing but per-arch non-implemented) syscall numbers got suddenly defined by the kernel change to unify numbers which will let them show up in e.g.:
That makes 392 and others needed for e.g. s390x in libseccomps files, while IIRC not really being implemented there yet. And that also matches the kernel 5.2 as breaking point that was identified, as that is when the change got merged. |
Thanks @cpaelzer for the verification, hopefully we'll get the updated syscall tables merged soon. |
FYI, the master branch now has an updated syscall table, with the release-2.4 branch expected to get it soon. |
The release-2.4 branch now has the updated syscall table as well. |
Thanks for the backport @drakenclimber. Since the updated syscall table should resolve this issue based on the discussion above, I'm going to close out this issue; feel free to reopen if the problem remains. |
Happens with kernel 5.2.x on Intel 32-bit (Archlinux32):
Adding printf to 36-sim-ipc_syscalls.c:
shows:
Same applies for:
yielding:
The text was updated successfully, but these errors were encountered: