frr icon indicating copy to clipboard operation
frr copied to clipboard

eigrp has a coding pattern that will generate a crash

Open donaldsharp opened this issue 2 years ago • 6 comments

Commit 3fa39a35ed -> identified in ospf6d a pattern where the daemon could crash. eigrp copied the exact same pattern and a event_execute can be issued where there is an existing write scheduled and the queue can be cleared. This needs to be addressed

donaldsharp avatar Jul 19 '23 13:07 donaldsharp

I looked at the code and not sure it has the same issue. From what iI see, you main addition was to add an event_cancel when ospfd is terminated.

EIGRP already has this code in place though the call path: eigrpd_instance_destroy eigrp_finish_final EVENT_OFF eigrp_cancel

diivious avatar Aug 14 '23 23:08 diivious

I think the problem was around eigrp_write(): it asserts if it doesn't find any work to do, and it's run both as an async, scheduled task and synchronously via event_execute(). I've got an open PR that will allow event_execute to cancel a pending task for the same callback, for example, which would be one way to address this sort of situation.

mjstapp avatar Aug 15 '23 12:08 mjstapp

can you share a link to the PR please?

diivious avatar Aug 16 '23 11:08 diivious

can you share a link to the PR please?

the PR was merged just yesterday, in fact, so the change is now in master

mjstapp avatar Aug 16 '23 11:08 mjstapp

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Feb 13 '24 01:02 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Feb 13 '24 01:02 frrbot[bot]