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

PIM6d coring continuously in latest master build #13385

Closed
vijaykug opened this issue Apr 25, 2023 · 2 comments · Fixed by #13450
Closed

PIM6d coring continuously in latest master build #13385

vijaykug opened this issue Apr 25, 2023 · 2 comments · Fixed by #13450
Assignees
Labels
pimv6 triage Needs further investigation

Comments

@vijaykug
Copy link
Contributor

vijaykug commented Apr 25, 2023

PIM6d daemon is coming up in latest build , looks to be northbound related

Please find the core dump below


root@R11:/var/lib/systemd/coredump# ls -ltr
total 23644
-rw-r----- 1 root root 800932 Apr 25 04:36 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.4110.1682422572000000.lz4
-rw-r----- 1 root root 801181 Apr 25 04:36 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.4276.1682422578000000.lz4
-rw-r----- 1 root root 800288 Apr 25 04:37 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.4659.1682422638000000.lz4
-rw-r----- 1 root root 801551 Apr 25 04:39 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.4774.1682422758000000.lz4
-rw-r----- 1 root root 801759 Apr 25 04:42 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.5017.1682422951000000.lz4
-rw-r----- 1 root root 801962 Apr 25 04:42 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.5707.1682422956000000.lz4
-rw-r----- 1 root root 801883 Apr 25 04:43 core.pim6d.113.48640ef2d15c4a0281b5d73bd7e1cfdf.5878.1682423017000000.lz


Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/frr/pim6d...Reading symbols from /usr/lib/debug/.build-id/7f/642eefb6651188b03c421f2579aab57f1abeef.debug...done.
done.
[New LWP 13413]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/pim6d -d -F traditional -A 127.0.0.1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  raise (sig=sig@entry=11) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  raise (sig=sig@entry=11) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f55a3234f4c in core_handler (signo=11, siginfo=0x7fff3bd38970, context=<optimized out>) at ../lib/sigevent.c:246
#2  <signal handler called>
#3  typed_rb_min (rbt=rbt@entry=0x198) at ../lib/typerb.c:463
#4  0x000055d7fcf43514 in gm_sgs_const_first (h=<optimized out>) at ../pimd/pim6_mld.h:117
#5  gm_sgs_first (h=<optimized out>) at ../pimd/pim6_mld.h:117
#6  pim_if_membership_refresh (ifp=ifp@entry=0x55d7fd8056d0) at ../pimd/pim_nb_config.c:128
#7  0x000055d7fcf4485e in pim_cmd_interface_add (ifp=0x55d7fd8056d0) at ../pimd/pim_nb_config.c:156
#8  lib_interface_pim_address_family_pim_enable_modify (args=<optimized out>) at ../pimd/pim_nb_config.c:1616
#9  0x00007f55a3216367 in nb_callback_modify (nb_node=0x55d7fd6df200, nb_node=0x55d7fd6df200, errmsg_len=8192, errmsg=0x7fff3bd393e0 "", resource=0x55d7fd830de8, 
    dnode=0x55d7fd82c560, event=NB_EV_APPLY, context=0x55d7fd830c80) at ../lib/northbound.c:1285
#10 nb_callback_configuration (context=context@entry=0x55d7fd830c80, event=event@entry=NB_EV_APPLY, change=change@entry=0x55d7fd830db0, errmsg=errmsg@entry=0x7fff3bd393e0 "", 
    errmsg_len=errmsg_len@entry=8192) at ../lib/northbound.c:1582
#11 0x00007f55a3216a6c in nb_transaction_process (event=event@entry=NB_EV_APPLY, transaction=transaction@entry=0x55d7fd830c80, errmsg=errmsg@entry=0x7fff3bd393e0 "", 
    errmsg_len=errmsg_len@entry=8192) at ../lib/northbound.c:1709
#12 0x00007f55a3216dc3 in nb_candidate_commit_apply (transaction=0x55d7fd830c80, save_transaction=save_transaction@entry=true, transaction_id=transaction_id@entry=0x0, 
    errmsg=errmsg@entry=0x7fff3bd393e0 "", errmsg_len=errmsg_len@entry=8192) at ../lib/northbound.c:1103
#13 0x00007f55a3216f09 in nb_candidate_commit (context=..., candidate=<optimized out>, save_transaction=save_transaction@entry=true, comment=comment@entry=0x0, 
    transaction_id=transaction_id@entry=0x0, errmsg=0x7fff3bd393e0 "", errmsg_len=8192) at ../lib/northbound.c:1136
#14 0x00007f55a321740f in nb_cli_classic_commit (vty=vty@entry=0x55d7fd806d00) at ../lib/northbound_cli.c:49
#15 0x00007f55a3219e31 in nb_cli_pending_commit_check (vty=vty@entry=0x55d7fd806d00) at ../lib/northbound_cli.c:88
#16 0x00007f55a31d5622 in cmd_execute_command_real (vline=vline@entry=0x55d7fd824ef0, vty=vty@entry=0x55d7fd806d00, cmd=cmd@entry=0x0, up_level=up_level@entry=0, 
    filter=FILTER_RELAXED) at ../lib/command.c:985
#17 0x00007f55a31d5719 in cmd_execute_command (vline=vline@entry=0x55d7fd824ef0, vty=vty@entry=0x55d7fd806d00, cmd=cmd@entry=0x0, vtysh=vtysh@entry=0) at ../lib/command.c:1047
#18 0x00007f55a31d5942 in cmd_execute (vty=vty@entry=0x55d7fd806d00, cmd=cmd@entry=0x55d7fd80d480 "exit\n", matched=matched@entry=0x0, vtysh=vtysh@entry=0)
    at ../lib/command.c:1215
#19 0x00007f55a324c427 in vty_command (vty=vty@entry=0x55d7fd806d00, buf=<optimized out>) at ../lib/vty.c:544
#20 0x00007f55a324c660 in vty_execute (vty=0x55d7fd806d00) at ../lib/vty.c:1307
#21 0x00007f55a324f803 in vtysh_read (thread=<optimized out>) at ../lib/vty.c:2216
#22 0x00007f55a3246e9d in event_call (thread=thread@entry=0x7fff3bd3d950) at ../lib/event.c:1995
#23 0x00007f55a31fae58 in frr_run (master=0x55d7fd5c7c20) at ../lib/libfrr.c:1185
#24 0x000055d7fcf2473a in main (argc=6, argv=0x7fff3bd3dc68, envp=<optimized out>) at ../pimd/pim6_main.c:184

-->
=->

@vijaykug vijaykug added the triage Needs further investigation label Apr 25, 2023
@patrasar patrasar added the pimv6 label Apr 26, 2023
patrasar added a commit to patrasar/frr that referenced this issue May 5, 2023
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
@patrasar patrasar self-assigned this May 5, 2023
patrasar added a commit to patrasar/frr that referenced this issue May 6, 2023
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
@patrasar
Copy link
Contributor

patrasar commented May 8, 2023

I have raised the fix for this to unblock Vijay's testing.
Thanks,
Sarita

@vijaykug
Copy link
Contributor Author

vijaykug commented May 8, 2023

I have raised the fix for this to unblock Vijay's testing. Thanks, Sarita

Thanks Sarita , fix is working fine in private image , I will use this PI for further testing until this issue is merged

patrasar added a commit to patrasar/frr that referenced this issue May 30, 2023
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
mergify bot pushed a commit that referenced this issue Jun 1, 2023
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: #13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 6d1d2c2)
joshua-werner pushed a commit to joshua-werner/frr that referenced this issue Jun 2, 2023
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
cscarpitta pushed a commit to cscarpitta/frr that referenced this issue Jul 7, 2023
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
Keelan10 pushed a commit to Keelan10/frr that referenced this issue Mar 2, 2024
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
Keelan10 pushed a commit to Keelan10/frr that referenced this issue Mar 2, 2024
Problem:
Execute the below commands, pim6d core happens.
interface ens193
 ip address 69.0.0.2/24
 ipv6 address 8000::1/120
 ipv6 mld
 ipv6 pim
We see crash only if the interface is not configured, and
we are executing PIM/MLD commands.

RootCause:
Interface ens193 is not configured. So, it will have
ifindex = 0 and mroute_vif_index = -1.
Currently, we don't enable MLD on an interface if
mroute_vif_index < 0. So, pim_ifp->MLD = NULL.
In the API pim_if_membership_refresh(), we are accessing
pim_ifp->MLD NULL pointer which leads to crash.

Fix:
Added NULL check before accessing pim_ifp->MLD pointer in
the API pim_if_membership_refresh().

Issue: FRRouting#13385

Signed-off-by: Sarita Patra <saritap@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pimv6 triage Needs further investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants