* Re: [dpdk-dev] [ovs-dev] OvS DPDK crash when HPET timer enabled [not found] ` <CAFb4SLAd68BTMHsxhyy7S9CGC413zNEYZ_8Sasem1maHczuOgQ@mail.gmail.com> @ 2020-04-13 23:20 ` Ilya Maximets 2020-04-14 0:32 ` Tonghao Zhang 0 siblings, 1 reply; 4+ messages in thread From: Ilya Maximets @ 2020-04-13 23:20 UTC (permalink / raw) To: Ravi Kerur, Tonghao Zhang; +Cc: i.maximets, dev On 4/13/20 5:27 PM, Ravi Kerur wrote: > On Sun, Apr 12, 2020 at 5:05 AM Tonghao Zhang <xiangxia.m.yue@gmail.com> > wrote: > >> On Sun, Apr 12, 2020 at 7:57 AM Ravi Kerur <rkerur@gmail.com> wrote: >>> >>> Hello OvS DPDK team, >>> >>> I am using OvS 2.13.90 and DPDK 19.11 and wanted to use HPET timer >> instead >>> of invariant TSC. >>> >>> Enabled CONFIG_RTE_LIBEAL_USE_HPET=y in DPDK >>> >>> Kernel has >>> CONFIG_HPET_TIMER=y >>> CONFIG_HPET_EMULATE_RTC=y >>> CONFIG_HPET=y >>> CONFIG_HPET_MMAP=y >>> CONFIG_HPET_MMAP_DEFAULT=y >>> >>> cat /sys/devices/system/clocksource/clocksource0/current_clocksource >>> tsc >>> # cat /sys/devices/system/clocksource/clocksource0/available_clocksource >>> tsc hpet acpi_pm >>> >>> OvS crashes at >>> >>> gdb ovsdb-server /core >>> GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git >>> Copyright (C) 2018 Free Software Foundation, Inc. >>> License GPLv3+: GNU GPL version 3 or later < >> http://gnu.org/licenses/gpl.html >>>> >>> This is free software: you are free to change and redistribute it. >>> There is NO WARRANTY, to the extent permitted by law. Type "show >> copying" >>> and "show warranty" for details. >>> This GDB was configured as "x86_64-linux-gnu". >>> Type "show configuration" for configuration details. >>> For bug reporting instructions, please see: >>> <http://www.gnu.org/software/gdb/bugs/>. >>> Find the GDB manual and other documentation resources online at: >>> <http://www.gnu.org/software/gdb/documentation/>. >>> For help, type "help". >>> Type "apropos word" to search for commands related to "word"... >>> Reading symbols from ovsdb-server...done. >>> [New LWP 9729] >>> [Thread debugging using libthread_db enabled] >>> Using host libthread_db library >> "/lib/x86_64-linux-gnu/libthread_db.so.1". >>> Core was generated by `ovsdb-server /usr/local/etc/openvswitch/conf.db >>> -vconsole:emer -vsyslog:err -vf'. >>> Program terminated with signal SIGSEGV, Segmentation fault. >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () >> Hi, >> This is a bug on dpdk, NOT ovs. >> I guess that your kernel does't support getentropy which supported in >> 3.17 and your cpu don't support rdseed. >> and that cause a dpdk bug. To workaround, you change: Not tested, hope >> it's useful for you >> >> > You are correct CPU doesn't support RDSEED instruction but RDRAND is > supported. > > It's a RT kernel based on 4.19 + RT patches. > > Setting CONFIG_RTE_LIBEAL_USE_HPET=n which is the default,'Invariant TSC' > will be used. However, I want to use HPET so should I check with DPDK dev? Yes. This is a pure DPDK bug. There is no way to fix it from the OVS side. Adding dpdk-dev in CC, moving ovs-dev to BCC to avoid cross posting. Actually, looking at the code in DPDK, it's really old. I'm wondering if it ever worked? Looks like no-one ever tested this configuration. Best regards, Ilya Maximets. > > Thanks, > Ravi > > > >> diff --git a/lib/librte_eal/linux/eal_timer.c >> b/lib/librte_eal/linux/eal_timer.c >> index a904a8297cd2..4067e46da534 100644 >> --- a/lib/librte_eal/linux/eal_timer.c >> +++ b/lib/librte_eal/linux/eal_timer.c >> @@ -26,7 +26,7 @@ >> #include "eal_private.h" >> #include "eal_internal_cfg.h" >> >> -enum timer_source eal_timer_source = EAL_TIMER_HPET; >> +enum timer_source eal_timer_source = EAL_TIMER_TSC; >> >> #ifdef RTE_LIBEAL_USE_HPET >> >> >>> (gdb) bt >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () >>> #1 0x0000560fc6c482b0 in rte_rand_init () >>> #2 0x0000560fc6e125bd in __libc_csu_init () >>> #3 0x00007f5e1f930b28 in __libc_start_main (main=0x560fc6c45940 <main>, >>> argc=14, argv=0x7fff61ae5088, init=0x560fc6e12570 <__libc_csu_init>, >>> fini=<optimized out>, rtld_fini=<optimized out>, >>> stack_end=0x7fff61ae5078) at ../csu/libc-start.c:266 >>> #4 0x0000560fc6c485da in _start () >>> (gdb) quit >>> >>> RTE_INIT(rte_rand_init) >>> { >>> ... >>> } >>> >>> rte_rand_init is defined as initializer, following diffs won't help, >>> >>> diff --git a/lib/dpdk.c b/lib/dpdk.c >>> index 31450d470..f3d3989c8 100644 >>> --- a/lib/dpdk.c >>> +++ b/lib/dpdk.c >>> @@ -405,6 +405,12 @@ dpdk_init__(const struct smap *ovs_other_config) >>> if (result < 0) { >>> VLOG_EMER("Unable to initialize DPDK: %s", >>> ovs_strerror(rte_errno)); >>> return false; >>> + } else { >>> +#ifdef RTE_LIBEAL_USE_HPET >>> + if (rte_eal_hpet_init(1) < 0) { >>> + VLOG_ERR("HPET is not enabled, using TSC as default >> timer\n"); >>> + } >>> +#endif >>> } >>> >>> if (VLOG_IS_DBG_ENABLED()) { >>> >>> Kindly let me know your inputs on how to overcome this issue. >>> >>> Thanks, >>> Ravi >>> _______________________________________________ >>> dev mailing list >>> dev@openvswitch.org >>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev >> >> >> >> -- >> Best regards, Tonghao >> > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [ovs-dev] OvS DPDK crash when HPET timer enabled 2020-04-13 23:20 ` [dpdk-dev] [ovs-dev] OvS DPDK crash when HPET timer enabled Ilya Maximets @ 2020-04-14 0:32 ` Tonghao Zhang 2020-04-14 21:27 ` Ravi Kerur 0 siblings, 1 reply; 4+ messages in thread From: Tonghao Zhang @ 2020-04-14 0:32 UTC (permalink / raw) To: Ilya Maximets; +Cc: Ravi Kerur, dpdk-dev On Tue, Apr 14, 2020 at 7:20 AM Ilya Maximets <i.maximets@ovn.org> wrote: > > On 4/13/20 5:27 PM, Ravi Kerur wrote: > > On Sun, Apr 12, 2020 at 5:05 AM Tonghao Zhang <xiangxia.m.yue@gmail.com> > > wrote: > > > >> On Sun, Apr 12, 2020 at 7:57 AM Ravi Kerur <rkerur@gmail.com> wrote: > >>> > >>> Hello OvS DPDK team, > >>> > >>> I am using OvS 2.13.90 and DPDK 19.11 and wanted to use HPET timer > >> instead > >>> of invariant TSC. > >>> > >>> Enabled CONFIG_RTE_LIBEAL_USE_HPET=y in DPDK > >>> > >>> Kernel has > >>> CONFIG_HPET_TIMER=y > >>> CONFIG_HPET_EMULATE_RTC=y > >>> CONFIG_HPET=y > >>> CONFIG_HPET_MMAP=y > >>> CONFIG_HPET_MMAP_DEFAULT=y > >>> > >>> cat /sys/devices/system/clocksource/clocksource0/current_clocksource > >>> tsc > >>> # cat /sys/devices/system/clocksource/clocksource0/available_clocksource > >>> tsc hpet acpi_pm > >>> > >>> OvS crashes at > >>> > >>> gdb ovsdb-server /core > >>> GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git > >>> Copyright (C) 2018 Free Software Foundation, Inc. > >>> License GPLv3+: GNU GPL version 3 or later < > >> http://gnu.org/licenses/gpl.html > >>>> > >>> This is free software: you are free to change and redistribute it. > >>> There is NO WARRANTY, to the extent permitted by law. Type "show > >> copying" > >>> and "show warranty" for details. > >>> This GDB was configured as "x86_64-linux-gnu". > >>> Type "show configuration" for configuration details. > >>> For bug reporting instructions, please see: > >>> <http://www.gnu.org/software/gdb/bugs/>. > >>> Find the GDB manual and other documentation resources online at: > >>> <http://www.gnu.org/software/gdb/documentation/>. > >>> For help, type "help". > >>> Type "apropos word" to search for commands related to "word"... > >>> Reading symbols from ovsdb-server...done. > >>> [New LWP 9729] > >>> [Thread debugging using libthread_db enabled] > >>> Using host libthread_db library > >> "/lib/x86_64-linux-gnu/libthread_db.so.1". > >>> Core was generated by `ovsdb-server /usr/local/etc/openvswitch/conf.db > >>> -vconsole:emer -vsyslog:err -vf'. > >>> Program terminated with signal SIGSEGV, Segmentation fault. > >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () > >> Hi, > >> This is a bug on dpdk, NOT ovs. > >> I guess that your kernel does't support getentropy which supported in > >> 3.17 and your cpu don't support rdseed. > >> and that cause a dpdk bug. To workaround, you change: Not tested, hope > >> it's useful for you > >> > >> > > You are correct CPU doesn't support RDSEED instruction but RDRAND is > > supported. > > > > It's a RT kernel based on 4.19 + RT patches. > > > > Setting CONFIG_RTE_LIBEAL_USE_HPET=n which is the default,'Invariant TSC' > > will be used. However, I want to use HPET so should I check with DPDK dev? > > Yes. This is a pure DPDK bug. There is no way to fix it from the OVS side. > Adding dpdk-dev in CC, moving ovs-dev to BCC to avoid cross posting. Hi Ilya I sent a patch to dpdk, but not applied. If applied, I feedback to this thread. > Actually, looking at the code in DPDK, it's really old. I'm wondering if it > ever worked? Looks like no-one ever tested this configuration. > > Best regards, Ilya Maximets. > > > > > Thanks, > > Ravi > > > > > > > >> diff --git a/lib/librte_eal/linux/eal_timer.c > >> b/lib/librte_eal/linux/eal_timer.c > >> index a904a8297cd2..4067e46da534 100644 > >> --- a/lib/librte_eal/linux/eal_timer.c > >> +++ b/lib/librte_eal/linux/eal_timer.c > >> @@ -26,7 +26,7 @@ > >> #include "eal_private.h" > >> #include "eal_internal_cfg.h" > >> > >> -enum timer_source eal_timer_source = EAL_TIMER_HPET; > >> +enum timer_source eal_timer_source = EAL_TIMER_TSC; > >> > >> #ifdef RTE_LIBEAL_USE_HPET > >> > >> > >>> (gdb) bt > >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () > >>> #1 0x0000560fc6c482b0 in rte_rand_init () > >>> #2 0x0000560fc6e125bd in __libc_csu_init () > >>> #3 0x00007f5e1f930b28 in __libc_start_main (main=0x560fc6c45940 <main>, > >>> argc=14, argv=0x7fff61ae5088, init=0x560fc6e12570 <__libc_csu_init>, > >>> fini=<optimized out>, rtld_fini=<optimized out>, > >>> stack_end=0x7fff61ae5078) at ../csu/libc-start.c:266 > >>> #4 0x0000560fc6c485da in _start () > >>> (gdb) quit > >>> > >>> RTE_INIT(rte_rand_init) > >>> { > >>> ... > >>> } > >>> > >>> rte_rand_init is defined as initializer, following diffs won't help, > >>> > >>> diff --git a/lib/dpdk.c b/lib/dpdk.c > >>> index 31450d470..f3d3989c8 100644 > >>> --- a/lib/dpdk.c > >>> +++ b/lib/dpdk.c > >>> @@ -405,6 +405,12 @@ dpdk_init__(const struct smap *ovs_other_config) > >>> if (result < 0) { > >>> VLOG_EMER("Unable to initialize DPDK: %s", > >>> ovs_strerror(rte_errno)); > >>> return false; > >>> + } else { > >>> +#ifdef RTE_LIBEAL_USE_HPET > >>> + if (rte_eal_hpet_init(1) < 0) { > >>> + VLOG_ERR("HPET is not enabled, using TSC as default > >> timer\n"); > >>> + } > >>> +#endif > >>> } > >>> > >>> if (VLOG_IS_DBG_ENABLED()) { > >>> > >>> Kindly let me know your inputs on how to overcome this issue. > >>> > >>> Thanks, > >>> Ravi > >>> _______________________________________________ > >>> dev mailing list > >>> dev@openvswitch.org > >>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev > >> > >> > >> > >> -- > >> Best regards, Tonghao > >> > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > -- Best regards, Tonghao ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [ovs-dev] OvS DPDK crash when HPET timer enabled 2020-04-14 0:32 ` Tonghao Zhang @ 2020-04-14 21:27 ` Ravi Kerur 2020-04-27 11:06 ` Tonghao Zhang 0 siblings, 1 reply; 4+ messages in thread From: Ravi Kerur @ 2020-04-14 21:27 UTC (permalink / raw) To: Tonghao Zhang; +Cc: Ilya Maximets, dpdk-dev Hi Tonghao, Thanks, your patch works fine with HPET initialization. I will look into DPDK discussion which got started with your patch. Thanks, Ravi On Mon, Apr 13, 2020 at 5:33 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote: > On Tue, Apr 14, 2020 at 7:20 AM Ilya Maximets <i.maximets@ovn.org> wrote: > > > > On 4/13/20 5:27 PM, Ravi Kerur wrote: > > > On Sun, Apr 12, 2020 at 5:05 AM Tonghao Zhang < > xiangxia.m.yue@gmail.com> > > > wrote: > > > > > >> On Sun, Apr 12, 2020 at 7:57 AM Ravi Kerur <rkerur@gmail.com> wrote: > > >>> > > >>> Hello OvS DPDK team, > > >>> > > >>> I am using OvS 2.13.90 and DPDK 19.11 and wanted to use HPET timer > > >> instead > > >>> of invariant TSC. > > >>> > > >>> Enabled CONFIG_RTE_LIBEAL_USE_HPET=y in DPDK > > >>> > > >>> Kernel has > > >>> CONFIG_HPET_TIMER=y > > >>> CONFIG_HPET_EMULATE_RTC=y > > >>> CONFIG_HPET=y > > >>> CONFIG_HPET_MMAP=y > > >>> CONFIG_HPET_MMAP_DEFAULT=y > > >>> > > >>> cat /sys/devices/system/clocksource/clocksource0/current_clocksource > > >>> tsc > > >>> # cat > /sys/devices/system/clocksource/clocksource0/available_clocksource > > >>> tsc hpet acpi_pm > > >>> > > >>> OvS crashes at > > >>> > > >>> gdb ovsdb-server /core > > >>> GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git > > >>> Copyright (C) 2018 Free Software Foundation, Inc. > > >>> License GPLv3+: GNU GPL version 3 or later < > > >> http://gnu.org/licenses/gpl.html > > >>>> > > >>> This is free software: you are free to change and redistribute it. > > >>> There is NO WARRANTY, to the extent permitted by law. Type "show > > >> copying" > > >>> and "show warranty" for details. > > >>> This GDB was configured as "x86_64-linux-gnu". > > >>> Type "show configuration" for configuration details. > > >>> For bug reporting instructions, please see: > > >>> <http://www.gnu.org/software/gdb/bugs/>. > > >>> Find the GDB manual and other documentation resources online at: > > >>> <http://www.gnu.org/software/gdb/documentation/>. > > >>> For help, type "help". > > >>> Type "apropos word" to search for commands related to "word"... > > >>> Reading symbols from ovsdb-server...done. > > >>> [New LWP 9729] > > >>> [Thread debugging using libthread_db enabled] > > >>> Using host libthread_db library > > >> "/lib/x86_64-linux-gnu/libthread_db.so.1". > > >>> Core was generated by `ovsdb-server > /usr/local/etc/openvswitch/conf.db > > >>> -vconsole:emer -vsyslog:err -vf'. > > >>> Program terminated with signal SIGSEGV, Segmentation fault. > > >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () > > >> Hi, > > >> This is a bug on dpdk, NOT ovs. > > >> I guess that your kernel does't support getentropy which supported in > > >> 3.17 and your cpu don't support rdseed. > > >> and that cause a dpdk bug. To workaround, you change: Not tested, hope > > >> it's useful for you > > >> > > >> > > > You are correct CPU doesn't support RDSEED instruction but RDRAND is > > > supported. > > > > > > It's a RT kernel based on 4.19 + RT patches. > > > > > > Setting CONFIG_RTE_LIBEAL_USE_HPET=n which is the default,'Invariant > TSC' > > > will be used. However, I want to use HPET so should I check with DPDK > dev? > > > > Yes. This is a pure DPDK bug. There is no way to fix it from the OVS > side. > > Adding dpdk-dev in CC, moving ovs-dev to BCC to avoid cross posting. > Hi Ilya > I sent a patch to dpdk, but not applied. If applied, I feedback to this > thread. > > Actually, looking at the code in DPDK, it's really old. I'm wondering > if it > > ever worked? Looks like no-one ever tested this configuration. > > > > Best regards, Ilya Maximets. > > > > > > > > Thanks, > > > Ravi > > > > > > > > > > > >> diff --git a/lib/librte_eal/linux/eal_timer.c > > >> b/lib/librte_eal/linux/eal_timer.c > > >> index a904a8297cd2..4067e46da534 100644 > > >> --- a/lib/librte_eal/linux/eal_timer.c > > >> +++ b/lib/librte_eal/linux/eal_timer.c > > >> @@ -26,7 +26,7 @@ > > >> #include "eal_private.h" > > >> #include "eal_internal_cfg.h" > > >> > > >> -enum timer_source eal_timer_source = EAL_TIMER_HPET; > > >> +enum timer_source eal_timer_source = EAL_TIMER_TSC; > > >> > > >> #ifdef RTE_LIBEAL_USE_HPET > > >> > > >> > > >>> (gdb) bt > > >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () > > >>> #1 0x0000560fc6c482b0 in rte_rand_init () > > >>> #2 0x0000560fc6e125bd in __libc_csu_init () > > >>> #3 0x00007f5e1f930b28 in __libc_start_main (main=0x560fc6c45940 > <main>, > > >>> argc=14, argv=0x7fff61ae5088, init=0x560fc6e12570 <__libc_csu_init>, > > >>> fini=<optimized out>, rtld_fini=<optimized out>, > > >>> stack_end=0x7fff61ae5078) at ../csu/libc-start.c:266 > > >>> #4 0x0000560fc6c485da in _start () > > >>> (gdb) quit > > >>> > > >>> RTE_INIT(rte_rand_init) > > >>> { > > >>> ... > > >>> } > > >>> > > >>> rte_rand_init is defined as initializer, following diffs won't help, > > >>> > > >>> diff --git a/lib/dpdk.c b/lib/dpdk.c > > >>> index 31450d470..f3d3989c8 100644 > > >>> --- a/lib/dpdk.c > > >>> +++ b/lib/dpdk.c > > >>> @@ -405,6 +405,12 @@ dpdk_init__(const struct smap *ovs_other_config) > > >>> if (result < 0) { > > >>> VLOG_EMER("Unable to initialize DPDK: %s", > > >>> ovs_strerror(rte_errno)); > > >>> return false; > > >>> + } else { > > >>> +#ifdef RTE_LIBEAL_USE_HPET > > >>> + if (rte_eal_hpet_init(1) < 0) { > > >>> + VLOG_ERR("HPET is not enabled, using TSC as default > > >> timer\n"); > > >>> + } > > >>> +#endif > > >>> } > > >>> > > >>> if (VLOG_IS_DBG_ENABLED()) { > > >>> > > >>> Kindly let me know your inputs on how to overcome this issue. > > >>> > > >>> Thanks, > > >>> Ravi > > >>> _______________________________________________ > > >>> dev mailing list > > >>> dev@openvswitch.org > > >>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > >> > > >> > > >> > > >> -- > > >> Best regards, Tonghao > > >> > > > _______________________________________________ > > > dev mailing list > > > dev@openvswitch.org > > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > > > > > > -- > Best regards, Tonghao > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [ovs-dev] OvS DPDK crash when HPET timer enabled 2020-04-14 21:27 ` Ravi Kerur @ 2020-04-27 11:06 ` Tonghao Zhang 0 siblings, 0 replies; 4+ messages in thread From: Tonghao Zhang @ 2020-04-27 11:06 UTC (permalink / raw) To: Ravi Kerur; +Cc: Ilya Maximets, dpdk-dev On Wed, Apr 15, 2020 at 5:27 AM Ravi Kerur <rkerur@gmail.com> wrote: > > Hi Tonghao, Thanks, your patch works fine with HPET initialization. I will look into DPDK discussion which got started with your patch. [update] patch applied: http://git.dpdk.org/next/dpdk-next-net/commit/?id=9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 > Thanks, > Ravi > > > On Mon, Apr 13, 2020 at 5:33 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote: >> >> On Tue, Apr 14, 2020 at 7:20 AM Ilya Maximets <i.maximets@ovn.org> wrote: >> > >> > On 4/13/20 5:27 PM, Ravi Kerur wrote: >> > > On Sun, Apr 12, 2020 at 5:05 AM Tonghao Zhang <xiangxia.m.yue@gmail.com> >> > > wrote: >> > > >> > >> On Sun, Apr 12, 2020 at 7:57 AM Ravi Kerur <rkerur@gmail.com> wrote: >> > >>> >> > >>> Hello OvS DPDK team, >> > >>> >> > >>> I am using OvS 2.13.90 and DPDK 19.11 and wanted to use HPET timer >> > >> instead >> > >>> of invariant TSC. >> > >>> >> > >>> Enabled CONFIG_RTE_LIBEAL_USE_HPET=y in DPDK >> > >>> >> > >>> Kernel has >> > >>> CONFIG_HPET_TIMER=y >> > >>> CONFIG_HPET_EMULATE_RTC=y >> > >>> CONFIG_HPET=y >> > >>> CONFIG_HPET_MMAP=y >> > >>> CONFIG_HPET_MMAP_DEFAULT=y >> > >>> >> > >>> cat /sys/devices/system/clocksource/clocksource0/current_clocksource >> > >>> tsc >> > >>> # cat /sys/devices/system/clocksource/clocksource0/available_clocksource >> > >>> tsc hpet acpi_pm >> > >>> >> > >>> OvS crashes at >> > >>> >> > >>> gdb ovsdb-server /core >> > >>> GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git >> > >>> Copyright (C) 2018 Free Software Foundation, Inc. >> > >>> License GPLv3+: GNU GPL version 3 or later < >> > >> http://gnu.org/licenses/gpl.html >> > >>>> >> > >>> This is free software: you are free to change and redistribute it. >> > >>> There is NO WARRANTY, to the extent permitted by law. Type "show >> > >> copying" >> > >>> and "show warranty" for details. >> > >>> This GDB was configured as "x86_64-linux-gnu". >> > >>> Type "show configuration" for configuration details. >> > >>> For bug reporting instructions, please see: >> > >>> <http://www.gnu.org/software/gdb/bugs/>. >> > >>> Find the GDB manual and other documentation resources online at: >> > >>> <http://www.gnu.org/software/gdb/documentation/>. >> > >>> For help, type "help". >> > >>> Type "apropos word" to search for commands related to "word"... >> > >>> Reading symbols from ovsdb-server...done. >> > >>> [New LWP 9729] >> > >>> [Thread debugging using libthread_db enabled] >> > >>> Using host libthread_db library >> > >> "/lib/x86_64-linux-gnu/libthread_db.so.1". >> > >>> Core was generated by `ovsdb-server /usr/local/etc/openvswitch/conf.db >> > >>> -vconsole:emer -vsyslog:err -vf'. >> > >>> Program terminated with signal SIGSEGV, Segmentation fault. >> > >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () >> > >> Hi, >> > >> This is a bug on dpdk, NOT ovs. >> > >> I guess that your kernel does't support getentropy which supported in >> > >> 3.17 and your cpu don't support rdseed. >> > >> and that cause a dpdk bug. To workaround, you change: Not tested, hope >> > >> it's useful for you >> > >> >> > >> >> > > You are correct CPU doesn't support RDSEED instruction but RDRAND is >> > > supported. >> > > >> > > It's a RT kernel based on 4.19 + RT patches. >> > > >> > > Setting CONFIG_RTE_LIBEAL_USE_HPET=n which is the default,'Invariant TSC' >> > > will be used. However, I want to use HPET so should I check with DPDK dev? >> > >> > Yes. This is a pure DPDK bug. There is no way to fix it from the OVS side. >> > Adding dpdk-dev in CC, moving ovs-dev to BCC to avoid cross posting. >> Hi Ilya >> I sent a patch to dpdk, but not applied. If applied, I feedback to this thread. >> > Actually, looking at the code in DPDK, it's really old. I'm wondering if it >> > ever worked? Looks like no-one ever tested this configuration. >> > >> > Best regards, Ilya Maximets. >> > >> > > >> > > Thanks, >> > > Ravi >> > > >> > > >> > > >> > >> diff --git a/lib/librte_eal/linux/eal_timer.c >> > >> b/lib/librte_eal/linux/eal_timer.c >> > >> index a904a8297cd2..4067e46da534 100644 >> > >> --- a/lib/librte_eal/linux/eal_timer.c >> > >> +++ b/lib/librte_eal/linux/eal_timer.c >> > >> @@ -26,7 +26,7 @@ >> > >> #include "eal_private.h" >> > >> #include "eal_internal_cfg.h" >> > >> >> > >> -enum timer_source eal_timer_source = EAL_TIMER_HPET; >> > >> +enum timer_source eal_timer_source = EAL_TIMER_TSC; >> > >> >> > >> #ifdef RTE_LIBEAL_USE_HPET >> > >> >> > >> >> > >>> (gdb) bt >> > >>> #0 0x0000560fc6db8ac1 in rte_get_hpet_cycles () >> > >>> #1 0x0000560fc6c482b0 in rte_rand_init () >> > >>> #2 0x0000560fc6e125bd in __libc_csu_init () >> > >>> #3 0x00007f5e1f930b28 in __libc_start_main (main=0x560fc6c45940 <main>, >> > >>> argc=14, argv=0x7fff61ae5088, init=0x560fc6e12570 <__libc_csu_init>, >> > >>> fini=<optimized out>, rtld_fini=<optimized out>, >> > >>> stack_end=0x7fff61ae5078) at ../csu/libc-start.c:266 >> > >>> #4 0x0000560fc6c485da in _start () >> > >>> (gdb) quit >> > >>> >> > >>> RTE_INIT(rte_rand_init) >> > >>> { >> > >>> ... >> > >>> } >> > >>> >> > >>> rte_rand_init is defined as initializer, following diffs won't help, >> > >>> >> > >>> diff --git a/lib/dpdk.c b/lib/dpdk.c >> > >>> index 31450d470..f3d3989c8 100644 >> > >>> --- a/lib/dpdk.c >> > >>> +++ b/lib/dpdk.c >> > >>> @@ -405,6 +405,12 @@ dpdk_init__(const struct smap *ovs_other_config) >> > >>> if (result < 0) { >> > >>> VLOG_EMER("Unable to initialize DPDK: %s", >> > >>> ovs_strerror(rte_errno)); >> > >>> return false; >> > >>> + } else { >> > >>> +#ifdef RTE_LIBEAL_USE_HPET >> > >>> + if (rte_eal_hpet_init(1) < 0) { >> > >>> + VLOG_ERR("HPET is not enabled, using TSC as default >> > >> timer\n"); >> > >>> + } >> > >>> +#endif >> > >>> } >> > >>> >> > >>> if (VLOG_IS_DBG_ENABLED()) { >> > >>> >> > >>> Kindly let me know your inputs on how to overcome this issue. >> > >>> >> > >>> Thanks, >> > >>> Ravi >> > >>> _______________________________________________ >> > >>> dev mailing list >> > >>> dev@openvswitch.org >> > >>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev >> > >> >> > >> >> > >> >> > >> -- >> > >> Best regards, Tonghao >> > >> >> > > _______________________________________________ >> > > dev mailing list >> > > dev@openvswitch.org >> > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >> > > >> > >> >> >> -- >> Best regards, Tonghao -- Best regards, Tonghao ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-27 11:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAFb4SLBvP2fVbKM8xjeLN07+zfL29vxDd6FDvMNiNuiv4jtO1Q@mail.gmail.com> [not found] ` <CAMDZJNVNYLv0E3suXtyTMc+Dwym+HOw+S38BNQHYuBHYV43Sfg@mail.gmail.com> [not found] ` <CAFb4SLAd68BTMHsxhyy7S9CGC413zNEYZ_8Sasem1maHczuOgQ@mail.gmail.com> 2020-04-13 23:20 ` [dpdk-dev] [ovs-dev] OvS DPDK crash when HPET timer enabled Ilya Maximets 2020-04-14 0:32 ` Tonghao Zhang 2020-04-14 21:27 ` Ravi Kerur 2020-04-27 11:06 ` Tonghao Zhang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).