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

Missing YANG Model Directory and Runtime Error During BGPd Execution #17170

Open
2 tasks done
lobby-manager opened this issue Oct 21, 2024 · 0 comments
Open
2 tasks done
Labels
triage Needs further investigation

Comments

@lobby-manager
Copy link

lobby-manager commented Oct 21, 2024

Description

When running the bgpd daemon, there are repeated warnings that the YANG model directory /usr/share/yang does not exist. Additionally, a runtime error occurs related to a null pointer access within lib/zlog_targets.c. The issue appears when linking to external libyang libraries instead of building libyang directly within the FRR project.

Version

commit 382e4e933

How to reproduce

  1. Compile FRRouting with the following flag:
    export LDFLAGS="-L/libyang/build"
  2. Configure the project:
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --enable-dev-build \
  --enable-user=frr \
  --enable-group=frr \
  --enable-vty-group=frrvty \
  --with-pkg-git-version \
  --with-pkg-extra-version=-my-manual-build \
  --enable-backtrace \
  --enable-rpki \
  --enable-mgmtd-test-be-client \
  --enable-sharpd \
  --enable-multipath=64 \
  --enable-snmp=agentx \
  --enable-irdp \
  --enable-snmp \
  --enable-static || exit 1
  1. Compile the project:
    make -j$(nproc)
  2. Start the zebra daemon:
    frr/zebra/zebra --limit-fds 100000 -d
  3. Run the bgpd daemon:
    frr/bgpd/bgpd --limit-fds 100000 -p 179 -f /etc/bgpd.conf -i /var/run/frr/bgpd_1.pid --log stdout

Expected behavior

The bgpd daemon should start without any warnings or runtime errors, and it should correctly resolve paths to YANG models if needed.

Actual behavior

  • The following runtime error is observed:

lib/zlog_targets.c:211:8: runtime error: member access within null pointer of type 'struct zlt_fd'

  • Warnings indicating missing YANG model directories:
 BGP: [X25ZY-TGTPJ] yang model directory "/usr/share/yang" does not exist
 BGP: [X25ZY-TGTPJ] yang model directory "/usr/share/yang" does not exist
 BGP: [T83RR-8SM5G] bgpd 10.2-dev-my-manual-build-g382e4e933-dirty starting: vty@2605, bgp@<all>:179

Additional context

  • This issue may be related to how libyang is linked. Instead of building libyang directly as part of FRR, external libraries were used.

  • The runtime error suggests there could be an uninitialized structure or misconfiguration in lib/zlog_targets.c, leading to improper access within struct zlt_fd.

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@lobby-manager lobby-manager added the triage Needs further investigation label Oct 21, 2024
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

1 participant