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

zebra: Fix crash during reconnect #17000

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Oct 4, 2024

fpm_enqueue_rmac_table expects an fpm_rmac_arg * as its argument.

The issue can be reproduced by dropping the TCP session using:

ss -K dst 127.0.0.1 dport = 2620

I've seen that you have tests folder but I'm new to the frr codebase, if you give me small guidelines I can add a test for my PR.

@ton31337
Copy link
Member

ton31337 commented Oct 4, 2024

For the history, can we have a backtrace?

@ton31337
Copy link
Member

ton31337 commented Oct 4, 2024

@Mergifyio backport stable/10.1 stable/10.0 stable/9.1 stable/9.0 stable/8.5 stable/8.4

Copy link

mergify bot commented Oct 4, 2024

backport stable/10.1 stable/10.0 stable/9.1 stable/9.0 stable/8.5 stable/8.4

✅ Backports have been created

@ton31337 ton31337 added this to the 10.2 milestone Oct 4, 2024
@fsb4000
Copy link
Contributor Author

fsb4000 commented Oct 4, 2024

Sure.

(gdb) bt
#0  0x00007fdd7d6997ea in fpm_enqueue_rmac_table (bucket=0x2134dd0, arg=0x2132b60) at zebra/dplane_fpm_nl.c:1217
#1  0x00007fdd7dd1560d in hash_iterate (hash=0x21335f0, func=0x7fdd7d6997a0 <fpm_enqueue_rmac_table>, arg=0x2132b60) at lib/hash.c:252
#2  0x00007fdd7dd1560d in hash_iterate (hash=0x1e5bf10, func=func@entry=0x7fdd7d698900 <fpm_enqueue_l3vni_table>,
    arg=arg@entry=0x7ffed983bef0) at lib/hash.c:252
#3  0x00007fdd7d698b5c in fpm_rmac_send (t=<optimized out>) at zebra/dplane_fpm_nl.c:1262
#4  0x00007fdd7dd6ce22 in event_call (thread=thread@entry=0x7ffed983c010) at lib/event.c:1970
#5  0x00007fdd7dd20758 in frr_run (master=0x1d27f10) at lib/libfrr.c:1213
#6  0x0000000000425588 in main (argc=10, argv=0x7ffed983c2e8) at zebra/main.c:492

screen

I used frr 9.1.2

@ton31337
Copy link
Member

ton31337 commented Oct 4, 2024

Could you include this into the commit message?

@fsb4000 fsb4000 force-pushed the patch-1 branch 2 times, most recently from 3b62036 to 5c7d7f4 Compare October 4, 2024 07:57
@fsb4000
Copy link
Contributor Author

fsb4000 commented Oct 4, 2024

Done

fpm_enqueue_rmac_table expects an fpm_rmac_arg* as its argument.

The issue can be reproduced by dropping the TCP session using:

ss -K dst 127.0.0.1 dport = 2620

I used Fedora 40 and frr 9.1.2 and I got the gdb backtrace:

(gdb) bt
0  0x00007fdd7d6997ea in fpm_enqueue_rmac_table (bucket=0x2134dd0, arg=0x2132b60) at zebra/dplane_fpm_nl.c:1217
1  0x00007fdd7dd1560d in hash_iterate (hash=0x21335f0, func=0x7fdd7d6997a0 <fpm_enqueue_rmac_table>, arg=0x2132b60) at lib/hash.c:252
2  0x00007fdd7dd1560d in hash_iterate (hash=0x1e5bf10, func=func@entry=0x7fdd7d698900 <fpm_enqueue_l3vni_table>,
    arg=arg@entry=0x7ffed983bef0) at lib/hash.c:252
3  0x00007fdd7d698b5c in fpm_rmac_send (t=<optimized out>) at zebra/dplane_fpm_nl.c:1262
4  0x00007fdd7dd6ce22 in event_call (thread=thread@entry=0x7ffed983c010) at lib/event.c:1970
5  0x00007fdd7dd20758 in frr_run (master=0x1d27f10) at lib/libfrr.c:1213
6  0x0000000000425588 in main (argc=10, argv=0x7ffed983c2e8) at zebra/main.c:492

Signed-off-by: Igor Zhukov <[email protected]>
@donaldsharp
Copy link
Member

once ci finishes we'll get this in. Clearly this is the correct fix

@donaldsharp donaldsharp merged commit c6e9443 into FRRouting:master Oct 4, 2024
11 checks passed
ton31337 added a commit that referenced this pull request Oct 7, 2024
ton31337 added a commit that referenced this pull request Oct 7, 2024
ton31337 added a commit that referenced this pull request Oct 8, 2024
ton31337 added a commit that referenced this pull request Oct 8, 2024
ton31337 added a commit that referenced this pull request Oct 8, 2024
ton31337 added a commit that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants