[lxc/lxc] 747c4d: file_utils: rename fd_make_nonblocking to fd_make_...

0 views
Skip to first unread message

Stéphane Graber

unread,
Apr 21, 2023, 2:13:00 PM4/21/23
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 747c4df31a511fd2ba5554418e9cdedecefa19a7
https://github.com/lxc/lxc/commit/747c4df31a511fd2ba5554418e9cdedecefa19a7
Author: Alexander Mikhalitsyn <aleksandr....@canonical.com>
Date: 2023-04-21 (Fri, 21 Apr 2023)

Changed paths:
M src/lxc/file_utils.c
M src/lxc/file_utils.h
M src/lxc/seccomp.c

Log Message:
-----------
file_utils: rename fd_make_nonblocking to fd_make_blocking

Currently, fd_make_nonblocking does exactly the opposite thing,
it clears O_NONBLOCK flag and makes fd blocking.

Signed-off-by: Alexander Mikhalitsyn <aleksandr....@canonical.com>


Commit: 7eff16cc4c3b3c0e3d3d67d0dd8e4e0d8e0ae67e
https://github.com/lxc/lxc/commit/7eff16cc4c3b3c0e3d3d67d0dd8e4e0d8e0ae67e
Author: Alexander Mikhalitsyn <aleksandr....@canonical.com>
Date: 2023-04-21 (Fri, 21 Apr 2023)

Changed paths:
M src/lxc/file_utils.c
M src/lxc/file_utils.h

Log Message:
-----------
file_utils: add fd_make_nonblocking helper

Signed-off-by: Alexander Mikhalitsyn <aleksandr....@canonical.com>


Commit: 715fb4effaa7f35e642056d2a10d5b8c393bfac0
https://github.com/lxc/lxc/commit/715fb4effaa7f35e642056d2a10d5b8c393bfac0
Author: Alexander Mikhalitsyn <aleksandr....@canonical.com>
Date: 2023-04-21 (Fri, 21 Apr 2023)

Changed paths:
M src/lxc/terminal.c

Log Message:
-----------
terminal: make a terminal FDs non-blocking

Let's prevent freezes on read(2) by making a terminal FDs non-blocking.

It was discovered that there is an issue with io_uring mainloop when
multishot poll (IORING_POLL_ADD_MULTI) mode is enabled. Sometimes
false-positive poll events are put into a CQ. It makes further read(2)
stuck forever and blocks all mainloop processing for an infinite time.

Signed-off-by: Alexander Mikhalitsyn <aleksandr....@canonical.com>


Commit: 7fd671dbce98d139e52e8c4266f1050ef49ea8af
https://github.com/lxc/lxc/commit/7fd671dbce98d139e52e8c4266f1050ef49ea8af
Author: Alexander Mikhalitsyn <aleksandr....@canonical.com>
Date: 2023-04-21 (Fri, 21 Apr 2023)

Changed paths:
M src/lxc/mainloop.c

Log Message:
-----------
mainloop: io_uring: disable IORING_POLL_ADD_MULTI

Let's disable IORING_POLL_ADD_MULTI to workaround an issue
with false-positive POLLIN events in CQ.

In my local setup I managed to fix an issue without this
by making terminal FDs non-blocking, but during full
testsuite execution in Jenkins it was found that issue
still persists. So, let's add this ugly workaround too.

Signed-off-by: Alexander Mikhalitsyn <aleksandr....@canonical.com>


Commit: a7dcde0386519803906666614683a81b3f4d2c27
https://github.com/lxc/lxc/commit/a7dcde0386519803906666614683a81b3f4d2c27
Author: Stéphane Graber <stgr...@ubuntu.com>
Date: 2023-04-21 (Fri, 21 Apr 2023)

Changed paths:
M src/lxc/file_utils.c
M src/lxc/file_utils.h
M src/lxc/mainloop.c
M src/lxc/seccomp.c
M src/lxc/terminal.c

Log Message:
-----------
Merge pull request #4304 from mihalicyn/io_uring_stuck_fix

mainloop: fix stuck when io_uring is enabled


Compare: https://github.com/lxc/lxc/compare/0d1ffe07693f...a7dcde038651
Reply all
Reply to author
Forward
0 new messages