Closed esabol closed 3 months ago
I hate GitHub Actions so much! I finally get gearmand to build in an Alpine 3.17 container, but a bunch of tests fail with "Segmentation fault (core dumped)" all over the test-suite.log. No idea why. My Alpine 3.17 Docker image builds and tests fine on my machines. But the Alpine 3.17 container in GitHub Actions gives different results for some inexplicable reason. Incredibly frustrating.
Same exact result with Alpine 3.16 and gcc-11.
Anyone have any suggestions? I'm not even sure how to debug this since I can't reproduce it in Docker.
I haven't looked into it but there should be a way to get the core dump from the failed run and inspect it with gdb.
I suspect the tests are doing something that is forbidden in the containers that run actions. We might need to make that test skip in this specific situation or even have a conditional for Alpine.
TBH I'm not a fan of Alpine. It seems to be a pointless distribution.
On Mon, Nov 21, 2022, 8:56 PM Ed Sabol @.***> wrote:
Anyone have any suggestions? I'm not even sure how to debug this since I can't reproduce it in Docker.
— Reply to this email directly, view it on GitHub https://github.com/gearman/gearmand/pull/362#issuecomment-1323065535, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADS6YFXBX434MHPELSBRDTWJRHAFANCNFSM6AAAAAASGJJSEQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I haven't looked into it but there should be a way to get the core dump from the failed run and inspect it with gdb.
My google-fu failed me the first few times I tried to figure out how to do that, but I just found this:
https://gist.github.com/kudaba/53f68340bd28cd1e8824ac1e6ba8cf88
I imagine one would need the executable as well? Maybe the .o files?
I suspect the tests are doing something that is forbidden in the containers that run actions. We might need to make that test skip in this specific situation or even have a conditional for Alpine.
I don't know, but I don't think they should segmentation fault, certainly.
TBH I'm not a fan of Alpine. It seems to be a pointless distribution.
As far as I can tell, it's mainly used as the basis for Docker container images.
I kind of gave up on this, I admit (because it was so incredibly frustrating dealing with GitHub Actions), but it might be worth trying this instead: https://github.com/marketplace/actions/setup-alpine-linux-environment
In retrospect, I think the obvious reason why the Alpine tests crash is because GitHub Actions that run in Docker containers do not run on hosts that support IPv6. So I think the Alpine containers need to have their /etc/hosts
files hacked to remove localhost
from the ::1
entry, just like what I did for the Ubuntu containers.
OMG, I can't believe I finally did it, almost 2 years later! This PR is finally ready to be merged!
The localhost
name attached to ::1
was indeed what was causing the segmentation faults. GitHub Actions containers do not support IPv6, and this causes no end of problems for gearmand testing on every platform, apparently. At least Ubuntu has the courtesy to not segmentation fault though, unlike Alpine.
Modifying /etc/hosts
on Alpine was very problematic. Copying a file to /etc/hosts
does not work. You get a "Resource busy" error if you try. sed -i
also does not work (the mode suggests it modifies the file "in place", but it really makes a copy and then copies over the original file). The only way I could find to modify /etc/hosts
was to script vi
(and not vim
!) to delete the whole ::1
entry from /etc/hosts
. So annoying!
My celebratory mood soon dissipated, however, when I discovered gearmand won't build on Alpine 3.20 (but 3.17 and 3.18 both do), so I opened issue #407 for that, and the t/cli test segmentation faults on Alpine 3.19 (issue #408). Argh!
This pull request partially addresses issue #354 by adding an Alpine 3.17 build to the GitHub Actions CI. As a bonus, this build uses gcc 12 (currently 12.2.1).