[packages/bird] Test of segfault

arekm arekm at pld-linux.org
Wed Mar 18 17:50:14 CET 2026


commit 68055dd9c0d1a567cae0752314a2cdeba15c8e80
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Mar 18 17:50:02 2026 +0100

    Test of segfault

 bird-krt-gr-export-fix.patch | 32 ++++++++++++++++++++++++++++++++
 bird.spec                    |  4 +++-
 2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/bird.spec b/bird.spec
index 82f94cd..fee1a37 100644
--- a/bird.spec
+++ b/bird.spec
@@ -5,7 +5,7 @@ Summary:	The BIRD Internet Routing Daemon
 Summary(pl.UTF-8):	Demon BIRD Internetowego Routingu Dynamicznego
 Name:		bird
 Version:	3.2.0
-Release:	1
+Release:	1.1
 License:	GPL v2+
 Group:		Networking/Daemons
 Source0:	https://bird.nic.cz/download/%{name}-%{version}.tar.gz
@@ -17,6 +17,7 @@ Source3:	https://bird.nic.cz/download/%{name}-doc-%{version}.tar.gz
 Source4:	%{name}.service
 Source5:	%{name}.tmpfiles
 Patch0:		%{name}-xbasename-const.patch
+Patch1:		%{name}-krt-gr-export-fix.patch
 URL:		https://bird.nic.cz/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -55,6 +56,7 @@ filtrów o dużych możliwościach.
 %prep
 %setup -q -a 3
 %patch -P0 -p1
+%patch -P1 -p1
 
 %build
 cp -f /usr/share/automake/config.* tools
diff --git a/bird-krt-gr-export-fix.patch b/bird-krt-gr-export-fix.patch
new file mode 100644
index 0000000..5d35f67
--- /dev/null
+++ b/bird-krt-gr-export-fix.patch
@@ -0,0 +1,32 @@
+Kernel: skip export start in krt_init_scan() when gr_wait is set
+
+When graceful restart recovery is active (-R), krt_start() sets gr_wait=1
+on the kernel channel to defer export until recovery completes (via
+graceful_recovery_done()). However, krt_init_scan() unconditionally calls
+channel_start_export() when transitioning from KPS_INIT, without checking
+gr_wait. When graceful_recovery_done() later runs, it finds gr_wait=1 and
+tries to start the export again, triggering:
+
+  bug("%s.%s: Attempted to start channel's already started export")
+
+Reported on bird-users by Christoph (Jan 2026) for BIRD 3.1.5.
+Still present in 3.2.0 despite bda2178e ("Kernel: pause exports also
+on restart until scan is done") which set rt_notify=NULL in krt_start()
+but didn't address the krt_init_scan() path.
+
+Skip channel_start_export() in krt_init_scan() when gr_wait is set,
+letting graceful_recovery_done() handle it instead.
+
+--- a/sysdep/unix/krt.c
++++ b/sysdep/unix/krt.c
+@@ -449,7 +449,9 @@ krt_init_scan(struct krt_proto *p)
+     case KPS_INIT:
+       /* Allow exports now */
+       p->p.rt_notify = krt_rt_notify;
+-      channel_start_export(p->p.main_channel);
++      /* When gr_wait is set, graceful_recovery_done() will start the export */
++      if (!p->p.main_channel->gr_wait)
++	channel_start_export(p->p.main_channel);
+       rt_refresh_begin(&p->p.main_channel->in_req);
+       p->sync_state = KPS_FIRST_SCAN;
+       return 1;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bird.git/commitdiff/68055dd9c0d1a567cae0752314a2cdeba15c8e80



More information about the pld-cvs-commit mailing list