Bug 1231050 - What does this error mean: xs_tcp_setup_socket...unhandled error -107
Summary: What does this error mean: xs_tcp_setup_socket...unhandled error -107
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: openSUSE Kernel Bugs
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-27 18:41 UTC by James Moe
Modified: 2025-09-30 03:20 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Moe 2024-09-27 18:41:21 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
Comment 1 Anthony Iliopoulos 2024-09-27 21:33:03 UTC
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?
Comment 2 James Moe 2024-09-28 19:39:35 UTC
> 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.
Comment 3 Anthony Iliopoulos 2024-09-28 20:22:55 UTC
(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?
Comment 4 James Moe 2024-09-30 21:50:26 UTC
> was there a kernel update? 

No. It was the same kernel.
Comment 5 Jiri Slaby 2024-10-07 07:08:38 UTC
(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
Comment 6 Neil Brown 2024-10-08 10:32:41 UTC
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.
Comment 7 Jiri Slaby 2025-09-30 03:18:52 UTC
Neil is no longer in SUSE.
Comment 8 Jiri Slaby 2025-09-30 03:20:14 UTC
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.