From: Matthieu Baerts <matttbe@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: MPTCP Upstream <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next 4/4] selftests: mptcp: get stats just before timing out
Date: Thu, 13 Nov 2025 10:30:05 +0100 [thread overview]
Message-ID: <4a5e2978-077c-450e-ae60-c28c465e5f7f@kernel.org> (raw)
In-Reply-To: <45c6a268-3501-47da-b1ef-fbf3012a791c@redhat.com>
Hi Paolo,
On 13/11/2025 08:25, Paolo Abeni wrote:
> On 11/8/25 3:20 PM, Matthieu Baerts (NGI0) wrote:
>> Recently, some debugging happened around a test that was timing out. The
>> stats were showing connections being closed which was confusing because
>> the closing state was caused by the timeout stopping the transfer.
>>
>> To avoid such confusion, the timeout is no longer done per mptcp_connect
>> process, but separately. In case of timeout, the stats are now printed,
>> then the apps are killed.
>>
>> The stats will still be printed after the kill, but that's fine, and
>> this might even be useful, just in case. Timeout should be exceptional.
>>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
> This is very useful, thanks!
>
>> ---
>> tools/testing/selftests/net/mptcp/mptcp_connect.sh | 21 +++++++++-------
>> tools/testing/selftests/net/mptcp/mptcp_join.sh | 29 +++++++++++-----------
>> tools/testing/selftests/net/mptcp/mptcp_lib.sh | 13 ++++++++++
>> tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 21 +++++++++-------
>> tools/testing/selftests/net/mptcp/simult_flows.sh | 24 ++++++++++--------
>> 5 files changed, 66 insertions(+), 42 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
>> index 1149bd150d6a..6bff77ed0a74 100755
>> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
>> @@ -391,26 +391,29 @@ do_transfer()
>> mptcp_lib_nstat_init "${connector_ns}"
>> fi
>>
>> - timeout ${timeout_test} \
>> - ip netns exec ${listener_ns} \
>> - ./mptcp_connect -t ${timeout_poll} -l -p $port -s ${srv_proto} \
>> - $extra_args $local_addr < "$sin" > "$sout" &
>> + ip netns exec ${listener_ns} \
>> + ./mptcp_connect -t ${timeout_poll} -l -p $port -s ${srv_proto} \
>> + $extra_args $local_addr < "$sin" > "$sout" &
>> local spid=$!
>>
>> mptcp_lib_wait_local_port_listen "${listener_ns}" "${port}"
>>
>> local start
>> start=$(date +%s%3N)
>> - timeout ${timeout_test} \
>> - ip netns exec ${connector_ns} \
>> - ./mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
>> - $extra_args $connect_addr < "$cin" > "$cout" &
>> + ip netns exec ${connector_ns} \
>> + ./mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
>> + $extra_args $connect_addr < "$cin" > "$cout" &
>> local cpid=$!
>>
>> + mptcp_lib_wait_timeout "${timeout_test}" "${listener_ns}" \
>> + "${connector_ns}" "${port}" "${cpid}" "${spid}" &
>
> I'm still debugging some timeouts caused by `${timeout_poll}`. In such
> cases the process still terminates and closes the relevant fd. I'm
> wondering additionally setting ${timeout_test} to a lower value of
> ${timeout_poll}?
${timeout_test} is supposed to be a safeguard, just in case
${timeout_poll} is not enough. I think it might be better to call 'ss'
from mptcp_connect.c in case of timeout: WDYT?
> BTW I'm testing with CONFIG_PREEMPT=y and possibly I'm seeing the
> timeout due to such setting triggering some race we don't observe with
> vng defaults: it's very easily reproducible on mptcp_connect.sh
> "disconnect" case.
Arf, maybe not a new issue... Thank you for looking at that!
The MPTCP CI and my syzkaller instances are all using
CONFIG_PREEMPT_VOLUNTARY=y. Should I change that? Or at least have a mix
in the Syzkaller instances?
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-11-13 9:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 14:20 [PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out Matthieu Baerts (NGI0)
2025-11-08 14:20 ` [PATCH mptcp-next 1/4] selftests: mptcp: join: properly kill background tasks Matthieu Baerts (NGI0)
2025-11-11 2:46 ` Geliang Tang
2025-11-11 6:53 ` Matthieu Baerts
2025-11-11 8:17 ` Geliang Tang
2025-11-11 10:51 ` Matthieu Baerts
2025-11-12 10:00 ` Matthieu Baerts
2025-11-08 14:20 ` [PATCH mptcp-next 2/4] selftests: mptcp: connect: avoid double packet traces Matthieu Baerts (NGI0)
2025-11-08 14:20 ` [PATCH mptcp-next 3/4] selftests: mptcp: wait for port instead of sleep Matthieu Baerts (NGI0)
2025-11-08 14:20 ` [PATCH mptcp-next 4/4] selftests: mptcp: get stats just before timing out Matthieu Baerts (NGI0)
2025-11-13 7:15 ` Geliang Tang
2025-11-13 9:25 ` Matthieu Baerts
2025-11-13 7:25 ` Paolo Abeni
2025-11-13 9:30 ` Matthieu Baerts [this message]
2025-11-08 15:51 ` [PATCH mptcp-next 0/4] " MPTCP CI
2025-11-12 10:02 ` Geliang Tang
2025-11-12 10:35 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a5e2978-077c-450e-ae60-c28c465e5f7f@kernel.org \
--to=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox