Bugzilla – Bug 1231050
What does this error mean: xs_tcp_setup_socket...unhandled error -107
Last modified: 2025-09-30 03:20:14 UTC
There have been a lot of these log entries recently. They occur in groups of three about every 13-14 minutes. Web searches returned results showing this issue for years. If anyone had ever responded to those issues, it is hidden behind an account requirement. I had posted this question in Opensuse's user forum myself a year ago; no response. 2024-09-27T11:03:03-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:03:03-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:03:03-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:05:17-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:05:17-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:05:17-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:07:30-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:07:30-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:09:43-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:09:43-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107 2024-09-27T11:09:43-07:00 sma-station14l kernel: xs_tcp_setup_socket: connect returned unhandled error -107
This is a nfs-related rpc message. Are you using this system as a nfs client? What is the kernel release precisely (uname -a)? Error -107 is -ENOTCONN which implies that the tcp socket is not connected. Since you mention this happens periodically, is there any packet filtering between the client and server that could be affecting the state of the connections?
> Are you using this system as a nfs client? Yes. > What is the kernel release precisely (uname -a)? $ uname -a Linux sma-station14l 6.11.0-1-default #1 SMP PREEMPT_DYNAMIC Wed Sep 25 07:09:20 UTC 2024 (b87e886) x86_64 x86_64 x86_64 GNU/Linux Apparently this is a rare and intermittent issue. I restarted the host after a system update and there is none of these error messages.
(In reply to James Moe from comment #2) > > Are you using this system as a nfs client? > Yes. > > > What is the kernel release precisely (uname -a)? > $ uname -a > Linux sma-station14l 6.11.0-1-default #1 SMP PREEMPT_DYNAMIC Wed Sep 25 > 07:09:20 UTC 2024 (b87e886) x86_64 x86_64 x86_64 GNU/Linux > > > Apparently this is a rare and intermittent issue. I restarted the host after > a system update and there is none of these error messages. was there a kernel update? which kernel was exhibiting the issue before the restart?
> was there a kernel update? No. It was the same kernel.
(In reply to James Moe from comment #0) > 2024-09-27T11:03:03-07:00 sma-station14l kernel: xs_tcp_setup_socket: > connect returned unhandled error -107 ENOTCONN is really unhandled in xs_tcp_setup_socket() [1]. And obviously, xs_tcp_finish_connecting() can return it [2]. Neil any ideas? [1] https://github.com/torvalds/linux/blob/98f7e32f20d28/net/sunrpc/xprtsock.c#L2429 [2] https://github.com/torvalds/linux/blob/98f7e32f20d28/net/sunrpc/xprtsock.c#L2375 Seems to be added in 2009 by: https://github.com/torvalds/linux/commit/01d37c428ae080563c0a3bb8bdfa88c65a6891d3 i.e. commit 01d37c428ae080563c0a3bb8bdfa88c65a6891d3 Author: Trond Myklebust <Trond.Myklebust@netapp.com> Date: Wed Mar 11 14:09:39 2009 -0400 SUNRPC: xprt_connect() don't abort the task if the transport isn't bound
I think this is simply an omission from the switch statement in xs_tcp_setup_socket(). -ENOTCONN should be handled the same way as -ECONNREFUSED set. If it was, the error would be passed to xprt_wake_pending_tasks which end up calling call_connect_status() which does handle -ENOTCONN. I'll look thorough the code again when I get a bit more time and ensure that makes sense - then will suggest a patch upstream. Thanks for the report.
Neil is no longer in SUSE.
Fixed by: commit 10f0740234f0b157b41bdc7e9c3555a9b86c1599 Author: NeilBrown <neil@brown.name> Date: Wed Oct 9 16:28:06 2024 +1100 sunrpc: handle -ENOTCONN in xs_tcp_setup_socket() in v6.12.