docker-erlang-otp icon indicating copy to clipboard operation
docker-erlang-otp copied to clipboard

SCTP not working on LTS kernels when build on alpine 3.13

Open RoadRunnr opened this issue 4 years ago • 5 comments

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.

RoadRunnr avatar Mar 25 '21 17:03 RoadRunnr

is https://github.com/torvalds/linux/commit/af6bb61cc0a25fba4411f4348f01011c9a769047 the root-cause?

mgumz avatar Apr 01 '21 11:04 mgumz

is torvalds/linux@af6bb61 the root-cause?

No

RoadRunnr avatar Apr 01 '21 12:04 RoadRunnr

do you know which change did break the userland-api? iirc, breaking userland-api is rather a nongoal of LT

mgumz avatar Apr 01 '21 12:04 mgumz

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.

RoadRunnr avatar Apr 01 '21 13:04 RoadRunnr

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

fholzhauser avatar Apr 07 '21 20:04 fholzhauser