Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd crash on start if -d flag and frr.conf is missing #18288

Open
2 tasks done
IvayloJ opened this issue Mar 1, 2025 · 1 comment
Open
2 tasks done

bgpd crash on start if -d flag and frr.conf is missing #18288

IvayloJ opened this issue Mar 1, 2025 · 1 comment
Labels
triage Needs further investigation

Comments

@IvayloJ
Copy link

IvayloJ commented Mar 1, 2025

Description

If frr.conf is missing and bgpd is started with -d flag (daemon mode) the bgpd process crash.

Version

All versions from 10.1 to master. And all packages from deb.frrouting.org

How to reproduce

bgpd -f /etc/frr/bgpd.conf -F traditional -u frr -g frr -A 127.0.0.1 -d

/home/frr/frr-master/install/lib/frr/bgpd -v
bgpd version 10.4-dev
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
'--build=x86_64-linux-gnu' '--prefix=/home/frr/frr-master/install' '--localstatedir=/home/frr/frr-master/install/var' '--localstatedir=/home/frr/frr-master/install/frr' '--sbindir=/home/frr/frr-master/install/lib/frr' '--libdir=/home/frr/frr-master/install/lib/x86_64-linux-gnu/frr' '--with-moduledir=/home/frr/frr-master/install/lib/frr/modules' '--sysconfdir=/etc' '--disable-option-checking' '--disable-silent-rules' '--disable-maintainer-mode' '--with-vtysh-pager=/usr/bin/pager' '--disable-dependency-tracking' '--disable-scripting' '--enable-rpki' '--disable-pim6d' '--with-libpam' '--enable-snmp' '--enable-fpm' '--disable-protobuf' '--disable-zeromq' '--enable-ospfapi' '--enable-bgp-vnc' '--enable-multipath=256' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-configfile-mask=0640' '--enable-logfile-mask=0640' 'build_alias=x86_64-linux-gnu' 'PYTHON=python3'

Expected behavior

bgpd to not crash

Actual behavior

bgpd crash

Additional context

BGP: Received signal 11 at 1740844575 (si_addr 0x0, PC 0x7f94cb6d807d); aborting
...
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(zlog_back
trace_sigsafe+0x5e) [0x7f94cbbd0a1e]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(zlog_sign
al+0xe4) [0x7f94cbbd0bf4]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(+0x107782) [0x7f94cbc0c782]
BGP: /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f94cb808730]
BGP: /lib/x86_64-linux-gnu/libc.so.6(+0xa207d) [0x7f94cb6d807d]
BGP: /lib/x86_64-linux-gnu/libc.so.6(_IO_getline_info+0x124) [0x7f94cb6a70f4]
BGP: /lib/x86_64-linux-gnu/libc.so.6(fgets+0xab) [0x7f94cb6a611b]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(config_from_file+0x3d) [0x7f94cbba0cbd]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(vty_read_file+0x59) [0x7f94cbc273e9]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(vty_read_config+0x2a) [0x7f94cbc2744a]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(+0xc2b9c) [0x7f94cbbc7b9c]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(event_call+0xa1) [0x7f94cbc1e271]
BGP: /home/frr/frr-master/install/lib/x86_64-linux-gnu/frr/libfrr.so.0(frr_run+0xb8) [0x7f94cbbc80c8]
BGP: /home/frr/frr-master/install/lib/frr/bgpd(main+0x444) [0x55830508c8f4]
BGP: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f94cb65a09b]
BGP: /home/frr/frr-master/install/lib/frr/bgpd(_start+0x2a) [0x55830508eeba]
BGP: in thread frr_config_read_in scheduled from lib/libfrr.c:1054 frr_config_fork()

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@IvayloJ IvayloJ added the triage Needs further investigation label Mar 1, 2025
@ton31337
Copy link
Member

ton31337 commented Mar 1, 2025

# ls -a /etc/frr/frr.conf /etc/frr/bgpd.conf
ls: cannot access '/etc/frr/frr.conf': No such file or directory
ls: cannot access '/etc/frr/bgpd.conf': No such file or directory
# /usr/lib/frr/bgpd -f /etc/frr/bgpd.conf -F traditional -u frr -g frr -A 127.0.0.1 -d
# ps aufx | grep bgpd                                                                      
frr      12935  0.0  0.0 216012 11580 ?        Ssl  23:10   0:00 /usr/lib/frr/bgpd -f /etc/frr/bgpd.conf -F traditional -u frr -g frr -A 127.0.0.1 -d

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants