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

bfshell cause bf_switch to segfault #22

Open
lzhzero opened this issue Apr 29, 2022 · 0 comments
Open

bfshell cause bf_switch to segfault #22

lzhzero opened this issue Apr 29, 2022 · 0 comments

Comments

@lzhzero
Copy link

lzhzero commented Apr 29, 2022

Hi,
When I use bfshell to send scripts to a running bf_switchd program.
As soon as the bfshell connection is closed, it will cause segfault on the bf_switchd program.
Here is the gdb output:

...
bf_rt cli exited normally.

Thread 13 "bf_cli_smain" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdeffd640 (LWP 260075)]
0x00007ffff7e32975 in __GI___libc_free (mem=0xffffffffd40017b0) at malloc.c:3288
3288    malloc.c: No such file or directory.
(gdb) bt
#0  0x00007ffff7e32975 in __GI___libc_free (mem=0xffffffffd40017b0) at malloc.c:3288
#1  0x00007ffff7d996a5 in bf_sys_free (ptr=<optimized out>)
    at /P4_SDE/p4-dpdk-target/third-party/target-syslibs/src/bf_sal/linux_usr/bf_sys_mem.c:40
#2  0x00007ffff78a97e4 in clish_shell_fini (this=0x7fffd4000b60)
    at /P4_SDE/p4-dpdk-target/third-party/target-utils/third-party/klish/clish/shell/shell_new.c:195
#3  clish_shell_delete (this=this@entry=0x7fffd4000b60)
    at /P4_SDE/p4-dpdk-target/third-party/target-utils/third-party/klish/clish/shell/shell_new.c:218
#4  0x00007ffff78af808 in cli_thread_start (args=<optimized out>)
    at /P4_SDE/p4-dpdk-target/third-party/target-utils/third-party/klish/clish/shell/shell_thread.c:233
#5  0x00007ffff7f8ad80 in start_thread (arg=0x7fffdeffd640) at pthread_create.c:481
#6  0x00007ffff7ea676f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant