docker-erlang-otp
docker-erlang-otp copied to clipboard
SCTP not working on LTS kernels when build on alpine 3.13
Somewhere after Linux 5.4 (which is still in use on many LTS releases of distros and on many clouds) the SCTP user space API changed. Alpine 3.13 uses a sctp.h from a kernel with the newer API, preventing Erlang SCTP from working on those kernels.
Builds that use the older SCTP continue to work on newer kernels.
is https://github.com/torvalds/linux/commit/af6bb61cc0a25fba4411f4348f01011c9a769047 the root-cause?
do you know which change did break the userland-api? iirc, breaking userland-api is rather a nongoal of LT
do you know which change did break the userland-api? iirc, breaking userland-api is rather a nongoal of LT
b6e6b5f1da7e8
but it is somewhat debatable if that broke UAPI. Applications compiled for older kernel will work happily after that change, so backward compatibility is maintained. Only applications compiled for newer kernel will not work on older kernels. Not sure if that kind of forward compatibility is a goal for UAPI. You would need to ask the kernel net-dev mailing list for that.
The fix would be then to build erlang OTP against 5.4 linux headers (from the 3.12 repository) on alpine 3.13. I've tried it locally and it works. We could prepare a PR either to change the build of the alpine variants accordingly or create a new variant (e.g. alpine-lts ?) as long as it is needed and kernel versions catch up in the most commonly used LTS distributions. It would be great if the maintainers could help with their preference. Thanks @RoadRunnr for the hint