[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xorg bug returns: Too many files open in system
From: |
Samuel Thibault |
Subject: |
Re: Xorg bug returns: Too many files open in system |
Date: |
Sun, 7 Nov 2021 16:27:00 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Sergey Bugaev, le dim. 07 nov. 2021 18:18:27 +0300, a ecrit:
> On Sun, Nov 7, 2021 at 6:00 PM Samuel Thibault <samuel.thibault@gnu.org>
> wrote:
> > > That doesn't seem to work: it uses support_descriptors_* () which
> > > walks over /proc/self/fd/ which procfs doesn't implement — though I
> > > guess it could, via msg_get_dtable () & msg_get_fd () and even
> > > FS_RETRY_MAGICAL.
> >
> > It'd probably not that simple, because self/ is actually just a
> > magic retry on the pid variable, so in the end you'd be just opening
> > /proc/<callerpid>/fd. Exposing fd there with a magic retry would expose
> > the fd of the _caller_ in all /proc/*/, which is not what we want: we
> > want the fd/ there to be per-pid.
>
> What I meant is if we see a dir_lookup ("self/fd/42"), we might just
> tell you to retry with your own fd 42, without having to actually
> resolve what "self" means in terms of PIDs.
libnetfs does not this way, see libnetfs/dir-lookup.c, it'll first look
for self/, then for the rest, directory by directory.
> GLIBC_2.35 and not GLIBC_2.34? I also don't think I quite understand
> what __libc_close_range would be useful for (over __close_range) and
> so whether it's needed,
Ah, I had assumed you had copied it over from the linux close_range.
The libc_ variants are usually only needed when libc needs a non-posix
behavior for its internal uses. If nothing calls it it's not useful.
Sometimes there are unused remnants from the past.
> Also maybe you happen to know: why are the argument names in the
> header prefixed with double underscores (__first, __last, __flags)? I
> mimicked what I saw elsewhere, but I'm wondering about the purpose of
> this.
It's to avoid somebody doing
#define first bla bla
#include <unistd.h>
Samuel
- Xorg bug returns: Too many files open in system, Almudena Garcia, 2021/11/05
- Re: Xorg bug returns: Too many files open in system, Sergey Bugaev, 2021/11/06
- Re: Xorg bug returns: Too many files open in system, Samuel Thibault, 2021/11/07
- Re: Xorg bug returns: Too many files open in system, Sergey Bugaev, 2021/11/07
- Re: Xorg bug returns: Too many files open in system,
Samuel Thibault <=
- Re: Xorg bug returns: Too many files open in system, Sergey Bugaev, 2021/11/07
- [PATCH] hurd: Implement close_range and closefrom, Sergey Bugaev, 2021/11/06
- Re: [PATCH] hurd: Implement close_range and closefrom, Samuel Thibault, 2021/11/07
- Re: [PATCH] hurd: Implement close_range and closefrom, Adhemerval Zanella, 2021/11/07