Description
Describe the bug
Erlang SCTP support build on Linux > 5.4 kernels will not work on Linux kernels < 5.5
Strictly speaking, this is not an Erlang bug but a side effect of how the Linux kernels ABI works. One might argue that Linux is breaking its ABI compatibility promise, but the situation is complex.
The SCTP user API is defined by set of C structs. Kernel commit torvalds/linux@b6e6b5f increases the size of the sctp_event_subscribe
structure. The kernel API checks that the size of the structs passed into setsockopt is smaller or equal that the struct size.
The struct size is compiled into the user space binary and applications build on later kernels will have a larger struct size for sctp_event_subscribe, but the kernel API does not allow sizes that exceed its expectations.
As a result, beam VMs build with SCTP user space API headers from a Linux 5.5+ kernel will use sctp_event_subscribe
structure size that is rejected by per 5.5 kernels, breaking SCTP for those build on per 5.5 kernels.
The problem is most notably when attempting to use containers images on cloud instance that use pre 5.5 kernels.
#5442 run into this exact problem, but failed to diagnose the root cause.
To Reproduce
Use a beam VM build with recent kernel headers on a Linux 5.4 kernel.
Expected behavior
Should work.
Affected versions
Any build with Linux 5.5+ headers
Activity