public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Arthur Lapz <[email protected]>
Cc: GNU/Weeb Mailing List <[email protected]>
Subject: Re: [PATCH] slc: Fix file descriptor leak
Date: Mon, 6 Jun 2022 09:28:45 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 6/6/22 9:27 AM, Ammar Faizi wrote:
> Arthur Lapz reported that he is seeing a blocking socket from the
> public client side after the app side has closed the connection.
> 
> This turned out that we haven't closed the SLC socket file descriptor:
> 
> ```
>       Isolated                              Server
>       --------                              ------
> 
>        fd_app --                         -- fd_public_client
>                 |----[ SLC circuit ]----|
>    fd_circuit --                         -- fd_circuit
> 
> ```
> After the app in the isolated client has closed its fd, we didn't close
> the fd_app and fd_circuit. That's why the server is still sleeping,
> waiting for any response from the isolated area.
> 
> This was just a typo in if statements that caused the close() paths were
> not taken. Simply fix the typo. Change "==" to "!=".
> 
> Link: https://t.me/lostcontrol_s1/16737
> Link: https://t.me/lostcontrol_s1/16739 # Reproducer
> Fixes: 04a86adffa415e8365d27929bbb826028e00bfd3 ("Initial commit")
> Reported-by: Arthur Lapz <[email protected]>
> Signed-off-by: Ammar Faizi <[email protected]>
> ---

@rlapz, can you test this patch and see if it's a cure?

-- 
Ammar Faizi

  reply	other threads:[~2022-06-06  2:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06  2:27 [PATCH] slc: Fix file descriptor leak Ammar Faizi
2022-06-06  2:28 ` Ammar Faizi [this message]
2022-06-06  2:42   ` Arthur Lapz
2022-06-06  2:46     ` Ammar Faizi
2022-06-06  2:51       ` Ammar Faizi
2022-06-06  2:56         ` Arthur Lapz
2022-06-06  2:57           ` Ammar Faizi
2022-06-06  2:59             ` Arthur Lapz
2022-06-06  2:54 ` Alviro Iskandar Setiawan
2022-06-06  3:02   ` Ammar Faizi

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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