aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-04-29 17:47:15 +0200
committerStefano Brivio <sbrivio@redhat.com>2025-04-29 17:47:15 +0200
commit9c239345363f13bb63250d87af9988f150c037dc (patch)
tree2daf315e11261a4041f4ad263bc3f87abec39516
parentaa1cc8922867b8f7c17742f8da3b9fcc6291bbeb (diff)
downloadpasst-podman_25959.tar
passt-podman_25959.tar.gz
passt-podman_25959.tar.bz2
passt-podman_25959.tar.lz
passt-podman_25959.tar.xz
passt-podman_25959.tar.zst
passt-podman_25959.zip
Debugging changes for Podman issue #25959podman_25959
Link: https://github.com/containers/podman/issues/25959 Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--Makefile2
-rw-r--r--flow.c11
-rw-r--r--isolation.c2
3 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3328f83..5da913f 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ endif
FLAGS := -Wall -Wextra -Wno-format-zero-length -Wformat-security
FLAGS += -pedantic -std=c11 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
-FLAGS += $(FORTIFY_FLAG) -O2 -pie -fPIE
+FLAGS += $(FORTIFY_FLAG) -g -Og -pie -fPIE
FLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE)
FLAGS += -DVERSION=\"$(VERSION)\"
FLAGS += -DDUAL_STACK_SOCKETS=$(DUAL_STACK_SOCKETS)
diff --git a/flow.c b/flow.c
index 447c021..a8999ea 100644
--- a/flow.c
+++ b/flow.c
@@ -523,6 +523,17 @@ union flow *flow_alloc(void)
if (flow_first_free >= FLOW_MAX)
return NULL;
+ if (flow->f.state != FLOW_STATE_FREE) {
+ union flow *next = &flowtab[++flow_first_free];
+
+ err("=== Podman issue #25959, index: %i", flow_first_free);
+ err("=== state: %i, type: %i", flow->f.state, flow->f.type);
+ err("=== n: %i, next: %i", next->free.n, next->free.next);
+ flow_err(flow, "");
+ flow_err_details(flow);
+ ASSERT(false);
+ }
+
ASSERT(flow->f.state == FLOW_STATE_FREE);
ASSERT(flow->f.type == FLOW_TYPE_NONE);
ASSERT(flow->free.n >= 1);
diff --git a/isolation.c b/isolation.c
index c944fb3..72d8513 100644
--- a/isolation.c
+++ b/isolation.c
@@ -377,8 +377,6 @@ void isolate_postfork(const struct ctx *c)
{
struct sock_fprog prog;
- prctl(PR_SET_DUMPABLE, 0);
-
switch (c->mode) {
case MODE_PASST:
prog.len = (unsigned short)ARRAY_SIZE(filter_passt);