public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Paul Holzinger <pholzing@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 1/2] treewide: use _exit() over exit()
Date: Wed, 5 Feb 2025 15:44:17 +0100	[thread overview]
Message-ID: <20250205154417.158698bb@elisabeth> (raw)
In-Reply-To: <20250205130041.47588-2-pholzing@redhat.com>

On Wed,  5 Feb 2025 14:00:41 +0100
Paul Holzinger <pholzing@redhat.com> wrote:

> In the podman CI I noticed many seccomp denials in our logs even though
> tests passed:
> comm="pasta.avx2" exe="/usr/bin/pasta.avx2" sig=31 arch=c000003e
> syscall=202 compat=0 ip=0x7fb3d31f69db code=0x80000000
> 
> Which is futex being called and blocked by the pasta profile. After a
> few tries I managed to reproduce locally with this loop in ~20 min:
> while :;
>   do podman run -d --network bridge quay.io/libpod/testimage:20241011 \
> 	sleep 100 && \
>   sleep 10 && \
>   podman rm -fa -t0
> done
> 
> And using a pasta version with prctl(PR_SET_DUMPABLE, 1); set I got the
> following stack trace:
> Stack trace of thread 1:
>   #0  0x00007fc95e6de91b __lll_lock_wait_private (libc.so.6 + 0x9491b)
>   #1  0x00007fc95e68d6de __run_exit_handlers (libc.so.6 + 0x436de)
>   #2  0x00007fc95e68d70e exit (libc.so.6 + 0x4370e)
>   #3  0x000055f31b78c50b n/a (n/a + 0x0)
>   #4  0x00007fc95e68d70e exit (libc.so.6 + 0x4370e)
>   #5  0x000055f31b78d5a2 n/a (n/a + 0x0)
> 
> Pasta got killed in exit(), it seems glibc is trying to use a lock when
> running exit handlers even though no exit handlers are defined.
> 
> Given no exit handlers are needed we can call _exit() instead. This
> skips exit handlers and does not flush stdio streams compared to exit()
> which should be fine for the use here.
> 
> Based on the input from Stefano I did not change the test/doc programs
> or qrap as they do not use seccomp filters.
> 
> Signed-off-by: Paul Holzinger <pholzing@redhat.com>

Applied.

-- 
Stefano


      parent reply	other threads:[~2025-02-05 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 13:00 [PATCH 1/2] treewide: use _exit() over exit() Paul Holzinger
2025-02-05 13:00 ` [PATCH 2/2] passt-repair: use _exit() over return Paul Holzinger
2025-02-05 14:44   ` Stefano Brivio
2025-02-05 14:44 ` Stefano Brivio [this message]

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=20250205154417.158698bb@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=pholzing@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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).