Version in base suite: 2.0.25+ds1-1.1 Base version: conmon_2.0.25+ds1-1.1 Target version: conmon_2.0.25+ds1-1.1+deb11u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/c/conmon/conmon_2.0.25+ds1-1.1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/c/conmon/conmon_2.0.25+ds1-1.1+deb11u1.dsc changelog | 8 ++ patches/0001-Reset-OOM-score-back-to-0-for-container-runtime.patch | 29 +++---- patches/0002-conn_sock-do-not-fail-on-EAGAIN.patch | 37 ++++++++++ patches/series | 1 4 files changed, 59 insertions(+), 16 deletions(-) diff -Nru conmon-2.0.25+ds1/debian/changelog conmon-2.0.25+ds1/debian/changelog --- conmon-2.0.25+ds1/debian/changelog 2021-07-14 17:46:07.000000000 +0000 +++ conmon-2.0.25+ds1/debian/changelog 2022-06-29 15:35:38.000000000 +0000 @@ -1,3 +1,11 @@ +conmon (2.0.25+ds1-1.1+deb11u1) bullseye; urgency=medium + + * Non-maintainer upload. + * Backport upstream fix to not hang when forwarding container + stdout/stderr with lots of output. (Closes: #1014030) + + -- Dan Nicholson Wed, 29 Jun 2022 09:35:38 -0600 + conmon (2.0.25+ds1-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru conmon-2.0.25+ds1/debian/patches/0001-Reset-OOM-score-back-to-0-for-container-runtime.patch conmon-2.0.25+ds1/debian/patches/0001-Reset-OOM-score-back-to-0-for-container-runtime.patch --- conmon-2.0.25+ds1/debian/patches/0001-Reset-OOM-score-back-to-0-for-container-runtime.patch 2021-07-14 17:46:07.000000000 +0000 +++ conmon-2.0.25+ds1/debian/patches/0001-Reset-OOM-score-back-to-0-for-container-runtime.patch 2022-06-29 15:35:38.000000000 +0000 @@ -14,10 +14,10 @@ src/oom.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) -diff --git a/src/conmon.c b/src/conmon.c -index c349d6c..c6bd9f5 100644 ---- a/src/conmon.c -+++ b/src/conmon.c +Index: conmon/src/conmon.c +=================================================================== +--- conmon.orig/src/conmon.c ++++ conmon/src/conmon.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) process_cli(); @@ -27,7 +27,7 @@ /* ignoring SIGPIPE prevents conmon from being spuriously killed */ signal(SIGPIPE, SIG_IGN); -@@ -275,6 +275,8 @@ int main(int argc, char *argv[]) +@@ -273,6 +273,8 @@ int main(int argc, char *argv[]) } } @@ -36,10 +36,10 @@ execv(g_ptr_array_index(runtime_argv, 0), (char **)runtime_argv->pdata); exit(127); } -diff --git a/src/oom.c b/src/oom.c -index 5791777..0041a6b 100644 ---- a/src/oom.c -+++ b/src/oom.c +Index: conmon/src/oom.c +=================================================================== +--- conmon.orig/src/oom.c ++++ conmon/src/oom.c @@ -5,16 +5,14 @@ #include #include @@ -59,10 +59,10 @@ ndebugf("failed to write to /proc/self/oom_score_adj: %s\n", strerror(errno)); } close(oom_score_fd); -diff --git a/src/oom.h b/src/oom.h -index 28e4178..9408c3b 100644 ---- a/src/oom.h -+++ b/src/oom.h +Index: conmon/src/oom.h +=================================================================== +--- conmon.orig/src/oom.h ++++ conmon/src/oom.h @@ -1,6 +1,6 @@ #if !defined(OOM_H) #define OOM_H @@ -71,6 +71,3 @@ +void attempt_oom_adjust(const char *const oom_score); #endif // OOM_H --- -2.20.1 - diff -Nru conmon-2.0.25+ds1/debian/patches/0002-conn_sock-do-not-fail-on-EAGAIN.patch conmon-2.0.25+ds1/debian/patches/0002-conn_sock-do-not-fail-on-EAGAIN.patch --- conmon-2.0.25+ds1/debian/patches/0002-conn_sock-do-not-fail-on-EAGAIN.patch 1970-01-01 00:00:00.000000000 +0000 +++ conmon-2.0.25+ds1/debian/patches/0002-conn_sock-do-not-fail-on-EAGAIN.patch 2022-06-29 15:35:38.000000000 +0000 @@ -0,0 +1,37 @@ +From 2b873145a85a212f703c9c00db13717ab0204318 Mon Sep 17 00:00:00 2001 +From: Giuseppe Scrivano +Date: Tue, 2 Feb 2021 11:35:39 +0100 +Subject: [PATCH] conn_sock: do not fail on EAGAIN + +commit 6287bd884d9bf29e76ac877e0c7e6aad04bc24a4 introduced the +regression. + +writes to the attached sockets must be blocking, otherwise the +write_back_to_remote_consoles() shutdowns the socket when write fails +with EAGAIN. + +I've verified the original issue fixed with commit 62887bd is not +reintroduced with this patch. + +Closes: https://github.com/containers/conmon/issues/236 + +Signed-off-by: Giuseppe Scrivano +--- + src/conn_sock.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/conn_sock.c b/src/conn_sock.c +index e569113..02aee70 100644 +--- a/src/conn_sock.c ++++ b/src/conn_sock.c +@@ -280,7 +280,6 @@ static gboolean attach_cb(int fd, G_GNUC_UNUSED GIOCondition condition, gpointer + pexit("Failed to allocate memory"); + } + init_remote_sock(remote_sock, srcsock); +- g_unix_set_fd_nonblocking(new_fd, TRUE, NULL); + remote_sock->fd = new_fd; + g_unix_fd_add(remote_sock->fd, G_IO_IN | G_IO_HUP | G_IO_ERR, remote_sock_cb, remote_sock); + g_ptr_array_add(remote_sock->dest->readers, remote_sock); +-- +2.30.2 + diff -Nru conmon-2.0.25+ds1/debian/patches/series conmon-2.0.25+ds1/debian/patches/series --- conmon-2.0.25+ds1/debian/patches/series 2021-07-14 17:46:07.000000000 +0000 +++ conmon-2.0.25+ds1/debian/patches/series 2022-06-29 15:35:38.000000000 +0000 @@ -1 +1,2 @@ 0001-Reset-OOM-score-back-to-0-for-container-runtime.patch +0002-conn_sock-do-not-fail-on-EAGAIN.patch