-
Notifications
You must be signed in to change notification settings - Fork 170
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
Build regression: build fails on 32-bit architectures #1203
Comments
Hi! |
OK...
sysdig has supported 32-bit architectures since the start (2014?). Are
you telling me that this support has been officially dropped? It has
worked just fine at least on armhf (personal experience) for many years.
And I don't recall seeing any bug reports on Debian about any of the
many architectures supported there.
So. When did this break? The most recent working package was the git as
of 20220316: e5c53d6
Is it worth the time for me to try to fix it myself, or would you say
that it's now unfixable?
|
This is a news for me; for example, arm64 support came late 2022 (and arm32 was never supported, neither is now). Perhaps it used to work on x86_32 with kmod (bpf was not working for sure), but we broke it somewhere?
Using which driver? Kmod? Also cc @gnosek, my favorite repo historian 😄 |
Federico Di Pierro ***@***.***> writes:
sysdig has supported 32-bit architectures since the start (2014?).
This is a news for me; for example, arm64 support came late 2022 (and
arm32 was never supported, neither is now). Perhaps it used to work on
x86_32 with kmod (bpf was not working for sure), but we broke it
somewhere? Given that we do not officially support these 32bits archs,
i think their support needs to be added.
I'm so confused now. I did the initial armhf "port" myself years ago. It
wasn't really a port: just needed to clean up some stuff:
draios/sysdig@2c2ae3c
draios/sysdig@fe3adcd
and a few others. The patches were accepted. I was thanked.
It has worked just fine at least on armhf (personal experience) for
many years.
Admittedly I haven't actually used this consistently on 32-bit platforms
in a little while, but it at least built successfully on Debian up until
this last release I packaged yesterday.
Using which driver? Kmod?
The last time I touched the driver code was in 2014. It was "the
driver".
|
Here's an even better link:
draios/sysdig#41
|
I see now; so that was kmod only, we did never bother to actually support it in all 3 drivers.
Well Thank you for taking the time to open this issue btw! You allowed me to discover something new 😄 /milestone libs-backlog |
/milestone driver-backlog |
Hi. Thanks for replying. I'm not clear on the next step though. To get this fixed in Debian, should I wait for you to patch it? I can also play with it myself. Should I do that? |
Of course you are warmly welcomed to play with it! Indeed it would be great! |
OK. I'll look at it. I took a glance at the docs, and I see the 3 different drivers. Can you say a few words about the pros/cons of each? Is the only advantage of the bpf backends that they don't require a kernel module? Or do they also work better/differently in some way? |
Mostly:
|
This is enough to make falcosecurity-libs - 0.11.3+repack-1 build successfully |
Thanks for that patch. I tried it: it was necessary, but not nearly
sufficient. You also need at least these:
- https://salsa.debian.org/debian/falcosecurity-libs/-/blob/master/debian/patches/bug-fix-added-missing-semicolon.patch
- https://salsa.debian.org/debian/falcosecurity-libs/-/blob/master/debian/patches/fix-build-duplicate-socket-definitions.patch
- https://salsa.debian.org/debian/falcosecurity-libs/-/blob/master/debian/patches/fixed-mips-build.patch
I just uploaded -4 that has all these. Let's see how it does
|
thanks! I was exactly trying to find a good way to solve the "fix-build-duplicate-socket-definitions.patch". We still have autopkgtest regressions:
|
Yeah. There're a lot of patches now; I forgot who wrote what. -4 had a bug, -5 got further, just uploaded -6 that fixes one more thing. Are you maintaining an Ubuntu ppa? Can you build any of the 32-bit arches? As of -5 I still can't build i386,armhf,armel: https://buildd.debian.org/status/package.php?p=falcosecurity-libs And I'm just talking about building the thing, and passing tests. Being able to build the kernel module is a step I haven't even tried to approach yet |
Alright, -6 has gone through the build cycle: https://buildd.debian.org/status/package.php?p=falcosecurity-libs It now builds, but the 32-bit arches (i386,armel, armhf) fail the tests, some fail by crashing. I'm going to stop here. Upstream: can you please not abandon these architectures? These all worked for a very long time with the kernel module. The advantages of the bpf-based backends (listed above) aren't super compelling, and using their existence to drop the perfectly-good kmod-based driver just makes no sense. The current patches in my Debian tree are here: https://salsa.debian.org/debian/falcosecurity-libs/-/tree/master/debian/patches You probably want to merge all, or almost all of them. Some of these fix bugs that are essentially typos; that exist because yall no longer even try to build on most architectures. |
This is what I pushed in Ubuntu https://launchpad.net/ubuntu/+source/falcosecurity-libs/0.11.3+repack-5ubuntu3 |
Gianfranco Costamagna ***@***.***> writes:
This is what I pushed in Ubuntu
https://launchpad.net/ubuntu/+source/falcosecurity-libs/0.11.3+repack-5ubuntu3
OK. Thanks for doing that. It looks like the differences between what
you have and what I have are that
- You're ignoring armhf test failures
- You have a much more extensive version of
https://salsa.debian.org/debian/falcosecurity-libs/-/blob/master/debian/patches/test-suite-uses-32bit-friendly-types.patch
Questions:
- Are we certain that the armhf test failures are actually benign and OK
to ignore? Is the armhf build working for you?
- You noted that you couldn't actually use dkms to build the kernel
modules. Is that still an issue?
- For the type-casting patches I only changed what was needed to fix the
build. How did you decide to add more casts? Are those fixing the
build for you? Tests?
Also, it looks like you're a DD. Would you like to develop directly on
salsa? It looks like there's a bit of duplication of effort happening.
I'd be happy to add you to the Maintainers list.
Thanks much!
|
correct
I just hardcoded the expected types, I don't like the compiler guessing stuff, I think it's saner to hardcode them since they are fixed type pointers.
I don't know, I just did it to check the autopkgtests for that architecture :)
yes.
As said, I prefer to make sure all the types are correctly set, not strictly needed, but
Sadly I'm not an user for this package, I'm just checking and trying to make the package build/autopkgtest build to have it in the ubuntu release. I can upload in Debian if you want, but I prefer to just report bugs and have somebody else do the job, because I'm not confident in this codebase |
I guess this is the fix we want testing here: |
Thanks. I pulled in that patch. My build issues aren't even there yet,
though.
|
Sorry for the long time without answer; i think if you can contribute the patches to enable back support for 32bit architectures, we will be good to go (i'd be very happy to review and accept them). |
Hi. I really don't have the cycles to work on this at the moment, and I'm not sure I want to. I fixed this in 2014, and it then worked for a long time. Then I guess you stopped testing and accidentally broke it, or something? If I put in the effort to fix it again, how do I know you won't break it again? I might come back to this eventually. But in the meantime, it would be really nice if you fixed it. Thanks. |
Most probably we didn't even know we supported those architectures (and, as previously stated, we reviewed the supported architectures ~1.5yrs ago defining a small set); i think that most people from 2014 are no more contributing to the project since ages, and there was no documentation around supported archs. Let me state this (once again? Sorry if i repeat myself!) though: the fact that drivers(or just kmod) build on an architecture does not necessarily mean that they are also working fine. See for example our
That's totally understandable, and i am really sorry about that.
Unless we have access somewhere to a machine, we cannot guarantee that everything works fine, and we cannot blindly patch things. Btw, from the list of patches in https://salsa.debian.org/debian/falcosecurity-libs/-/tree/master/debian/patches:
A patch probably doesn't apply (am not sure though):
Remaining patches would be:
I think the first and the third one apply with no issues; am not sure about the second one and the last one though. |
Hi. Sorry to be cantankerous. I know we're all doing the best with that we have. For the architectures I looked at, I see build failures; I'm not even trying to run the code yet. So you can replicate the failures I'm looking at by cross-building, which shouldn't be very effortful to get going. Let me know if you need help doing that, and I should be able to give you detailed notes, when I get around to it. Thanks for the patch review. I haven't looked at this for a little while now, and presumably yall made changes upstream since then. |
We haven't been able to tackle this (neither reaching a maintainer's consensus about) during the current release cycle. |
And again, will move to next milestone: 😢 |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
Ping |
/remove-lifecycle stale We still hadn't time to work on this, i am really sorry at this point. /milestone TBD |
Hi. I just built 0.18.1 and pushed into Debian. i386 now builds, but the tests fail. The build log: https://buildd.debian.org/status/fetch.php?pkg=falcosecurity-libs&arch=i386&ver=0.18.1-1&stamp=1727846180&raw=0 |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
/remove-lifecycle stale |
Hello.
I'm the Debian maintainer for these libraries. I just uploaded packages for version 0.11.3, and I'm observing that they fail to build on Linux on 32-bit architectures (i386, armel, armhf, ...). This used to work.
A full build log showing the issue: https://salsa.debian.org/debian/falcosecurity-libs/-/jobs/4435012
The punchline is this:
The issue is probably related to this chunk of
userspace/libscap/CMakeLists.txt
:Note that it unconditionall pulls in
syscall_table64.c
even on 32-bit arches. Previously this usedsyscall_table.c
, and it worked on the 32-bit arches also. I don't know if simply making that change will break something, and I haven't tried it.Thanks
The text was updated successfully, but these errors were encountered: