net: splice fails on ppc64x and arm5spacemonkey with invalid argument #27513
Comments
I suspect that kernel is just too old to support splice from unix sockets? So either splice needs to fall back more gracefully to just doing a normal copy, or the tests should detect the kernel is too old and t.Skip. |
|
It seems like splicing from UNIX sockets was introduced in torvalds/linux@2b51457, which looks to be somewhere between 4.0 and 4.1, from what I can tell. It's by no means ancient. The current code does not handle this correctly: go/src/internal/poll/splice_linux.go Lines 35 to 36 in fc5edac We assume that the copy operation is handled if we get to create a pipe, which is not accurate. Perhaps testing for |
I can get it to fail on a Debian 8 machine, but I've tried several others (Debian 9, Ubuntu 16.04, 18.04) and it passes everywhere else. I also tried it on a RHEL7 with an old kernel (3.10) and that worked. |
I have made some further investigations. I used CentOS 7 because I don't have access to an RHEL7 system.
It seems like the 3.10 kernel they use has backported splice support for UNIX sockets, as far as I could tell from downloading the official sources. I think this is the reason why the tests pass on RHEL 7 (3.10), but not on Debian 8 (3.16). In any case, we need a fix to handle this case, since I'm pretty sure it's not ppc64x-specific. I believe the builders for ppc64x just happened to be running old enough kernels for this to surface. I'm not sure testing for |
Change https://golang.org/cl/133575 mentions this issue: |
Also affecting linux-arm-arm5spacemonkey: https://build.golang.org/log/b275caaae0e2e0c92b4441256f7a1c03fa36b655 |
https://build.golang.org/log/4ea83ef01cc0d411fde525df7f2504a08f24f03b
Since https://go-review.googlesource.com/113997
/cc @laboger @tklauser @benburkert
The text was updated successfully, but these errors were encountered: