Skip to content

The show ip ospf interface command in VTY causes ospfd to crash. #10203

Closed
@vpithart

Description

@vpithart

Description of the bug
The show ip ospf interface command in VTY causes ospfd to crash immediately. No error message.

This happens both inside vtysh tool on the router, and in remote telnet <router> 2604 session.

On crash, all ~1000 IPv4 routes are lost, network traffic gets interrupted for ~30 seconds before watchfrr spawns new ospfd and all routes are established again.

The /var/log/frr/frr.log shows

Dec 12 14:03:25 the-router ospfd[84148]: Vty connection from 10.x.y.z
Dec 12 14:03:34 the-router watchfrr[84114]: [EC 268435457] ospfd state -> down : read returned EOF
Dec 12 14:03:34 the-router zebra[84133]: [EC 4043309122] Client 'ospf' encountered an error and is shutting down.
Dec 12 14:03:34 the-router zebra[84133]: client 16 disconnected 1032 ospf routes removed from the rib
Dec 12 14:03:40 the-router watchfrr[84114]: Forked background command [pid 86760]: /usr/lib/frr/watchfrr.sh restart ospfd
Dec 12 14:03:40 the-router zebra[84133]: client 16 says hello and bids fair to announce only ospf routes vrf=0
Dec 12 14:03:40 the-router ospfd[86769]: ASBR[default:Status:1]: Update
Dec 12 14:03:40 the-router ospfd[86769]: ASBR[default:Status:2]: Update
Dec 12 14:03:40 the-router ospfd[86769]: ASBR[default:Status:2]: Already ASBR

At 14:03:25, I had connected to the VTY using telnet 2604.
At 14:03:34, I have pressed enter at the show ip ospf interface command. Immediatelly after, the telnet said Connection closed by foreign host. and network went down.

[x] Did you check if this is a duplicate issue?
[ ] Did you test it on the latest FRRouting/frr master branch?

I could not provide a backtrace. The crash has happened on production system where I cannot afford to cause more outages.

To Reproduce

  1. Install fresh debian 11 on a machine
  2. Do apt install frr - this installs the 7.5.1-1.1 version
  3. Set up 4 ethernet and 20 vlan interfaces
  4. Configure /etc/frr/daemons with: ospfd=yes and ospf6d=yes (everything else = no)
  5. Configure /etc/frr/frr.conf (all 24 interfaces)
  6. /etc/init.d/frr start
  7. Allow a few minutes to settle; The show ip ospf neighbor and show ipv6 ospf6 neighbor shows everything in order
  8. Open a telnet session on port 2604 (or the vtysh shell locally)
  9. Run the show ip ospf interface
  10. Crash

Expected behavior

The show ip ospf interface should print all interface's details and the ospfd process should not crash.

Screenshots
Screen Shot 2021-12-12 at 14 23 15

Versions
FRR Version: 7.5.1-1.1
OS: Debian GNU/Linux 11
Kernel: Linux the-router 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux

Additional context
My frr.conf contains sensitive data. Upon request I could anonymize it and post too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds further investigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions