This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: misc/tst-ttyname time outs


On 02/01/2019 18:51, Florian Weimer wrote:
> * Carlos O'Donell:
>> "info:  posix_openpt: Failed with errno %d. Consider increasing limits."
> 
> Yes, that's what I meant.
> 
> I don't think we should start printing sysctls and mount options here
> (or systemd-nspawn arguments).

makes sense to me.

> This ENOSPC comes from the max= mount option on the devpts instance, I
> think.  So it's different.

thanks, this was not clear to me.

EMFILE happens here when the slavename pts number > 1023,
i don't know how those numbers are allocated and how to
make them smaller.

[pid 16749] newfstatat(AT_FDCWD, "/dev/pts/1852", 0xffffdb4ff040, 0) = -1 ENOENT (No such file or directory)
[pid 16749] openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK) = 1022
[pid 16749] newfstatat(AT_FDCWD, "/dev/pts/1852", 0xffffdb4ff040, 0) = -1 ENOENT (No such file or directory)
[pid 16749] openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK) = 1023
[pid 16749] newfstatat(AT_FDCWD, "/dev/pts/1852", 0xffffdb4ff040, 0) = -1 ENOENT (No such file or directory)
[pid 16749] openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 EMFILE (Too many open files)
[pid 16749] newfstatat(AT_FDCWD, "/dev/pts/1852", 0xffffdb4ff040, 0) = -1 ENOENT (No such file or directory)
[pid 16749] openat(AT_FDCWD, "/dev/ptmx", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 EMFILE (Too many open files)
...

ENOSPC happens when i run multiple instances of this test
(with --direct so they are in infinite loop) so pty limit
explains it:

$ sysctl kernel.pty
kernel.pty.max = 4096
kernel.pty.nr = 1864
kernel.pty.reserve = 1024

mount options:
udev on /dev type devtmpfs (rw,nosuid,relatime,size=65955416k,nr_inodes=16488854,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]