DPDK patches and discussions
 help / color / mirror / Atom feed
* SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM
@ 2023-09-22 17:48 Bernd Schubert
  2023-09-22 18:02 ` Bernd Schubert
  2023-09-25  9:53 ` David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: Bernd Schubert @ 2023-09-22 17:48 UTC (permalink / raw)
  To: dev

Hello,

I'm trying to compile our tools on an older lab system and get

Program received signal SIGILL, Illegal instruction.
0x00007ffff434c766 in rte_cpu_get_flag_enabled (feature=feature@entry=RTE_CPUFLAG_RTM) at ../lib/eal/x86/rte_cpuflags.c:173
173		return (regs[feat->reg] >> feat->bit) & 1;
(gdb) bt
#0  0x00007ffff434c766 in rte_cpu_get_flag_enabled (feature=feature@entry=RTE_CPUFLAG_RTM) at ../lib/eal/x86/rte_cpuflags.c:173
#1  0x00007ffff3ffb572 in rte_rtm_init () at ../lib/eal/x86/rte_spinlock.c:14
##2  0x00007ffff7fc947e in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe088, env=env@entry=0x7fffffffe098)
     at ./elf/dl-init.c:70
#3  0x00007ffff7fc9568 in call_init (env=0x7fffffffe098, argv=0x7fffffffe088, argc=1, l=<optimized out>) at ./elf/dl-init.c:33
#4  _dl_init (main_map=0x7ffff7ffe2e0, argc=1, argv=0x7fffffffe088, env=0x7fffffffe098) at ./elf/dl-init.c:117
#5  0x00007ffff7fe32ea in _dl_start_user () from /lib64/ld-linux-x86-64.so.2


This already has been reported here
https://inbox.dpdk.org/users/C7FF2508-D633-404E-95AF-5F604D8E8E4B@intel.com/t/
but I don't see a solution there. It just ends up asking for the line numbers.
Well, the line is


      __cpuid_count(feat->leaf, feat->subleaf,
              regs[RTE_REG_EAX], regs[RTE_REG_EBX],
              regs[RTE_REG_ECX], regs[RTE_REG_EDX]);

     /* check if the feature is enabled */
     return (regs[feat->reg] >> feat->bit) & 1; ====> line 173


Maybe this should catch SIGILL?



Thanks,
Bernd




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM
  2023-09-22 17:48 SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM Bernd Schubert
@ 2023-09-22 18:02 ` Bernd Schubert
  2023-09-25 17:11   ` Bernd Schubert
  2023-09-25  9:53 ` David Marchand
  1 sibling, 1 reply; 4+ messages in thread
From: Bernd Schubert @ 2023-09-22 18:02 UTC (permalink / raw)
  To: dev; +Cc: Bernd Schubert

> 
> This already has been reported here
> https://inbox.dpdk.org/users/C7FF2508-D633-404E-95AF-5F604D8E8E4B@intel.com/t/
> but I don't see a solution there. It just ends up asking for the line 
> numbers.
> Well, the line is
> 
> 
>       __cpuid_count(feat->leaf, feat->subleaf,
>               regs[RTE_REG_EAX], regs[RTE_REG_EBX],
>               regs[RTE_REG_ECX], regs[RTE_REG_EDX]);
> 
>      /* check if the feature is enabled */
>      return (regs[feat->reg] >> feat->bit) & 1; ====> line 173
> 
> 
> Maybe this should catch SIGILL?
> 

Hmm, after disabling 2 flags in that function (fast workaround) it continues with

reflect_32bits (val=<optimized out>) at ../lib/net/rte_net_crc.c:96
96			if ((val & (1U << i)) != 0)
(gdb) bt
#0  reflect_32bits (val=<optimized out>) at ../lib/net/rte_net_crc.c:96
#1  crc32_eth_init_lut (poly=poly@entry=79764919, lut=lut@entry=0x7ffff70b9d40 <crc32_eth_lut>) at ../lib/net/rte_net_crc.c:109
#2  0x00007ffff3ffcc99 in rte_net_crc_scalar_init () at ../lib/net/rte_net_crc.c:137
#3  rte_net_crc_init () at ../lib/net/rte_net_crc.c:337
#4  0x00007ffff7fc947e in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe078, env=env@entry=0x7fffffffe088)
     at ./elf/dl-init.c:70
#5  0x00007ffff7fc9568 in call_init (env=0x7fffffffe088, argv=0x7fffffffe078, argc=1, l=<optimized out>) at ./elf/dl-init.c:33
#6  _dl_init (main_map=0x7ffff7ffe2e0, argc=1, argv=0x7fffffffe078, env=0x7fffffffe088) at ./elf/dl-init.c:117
#7  0x00007ffff7fe32ea in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#8  0x0000000000000001 in ?? ()
#9  0x00007fffffffe356 in ?? ()
#10 0x0000000000000000 in ?? ()



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM
  2023-09-22 17:48 SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM Bernd Schubert
  2023-09-22 18:02 ` Bernd Schubert
@ 2023-09-25  9:53 ` David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2023-09-25  9:53 UTC (permalink / raw)
  To: Bernd Schubert; +Cc: dev

On Fri, Sep 22, 2023 at 7:48 PM Bernd Schubert
<bs_lists@aakef.fastmail.fm> wrote:
>
> I'm trying to compile our tools on an older lab system and get
>
> Program received signal SIGILL, Illegal instruction.
> 0x00007ffff434c766 in rte_cpu_get_flag_enabled (feature=feature@entry=RTE_CPUFLAG_RTM) at ../lib/eal/x86/rte_cpuflags.c:173
> 173             return (regs[feat->reg] >> feat->bit) & 1;
> (gdb) bt
> #0  0x00007ffff434c766 in rte_cpu_get_flag_enabled (feature=feature@entry=RTE_CPUFLAG_RTM) at ../lib/eal/x86/rte_cpuflags.c:173
> #1  0x00007ffff3ffb572 in rte_rtm_init () at ../lib/eal/x86/rte_spinlock.c:14
> ##2  0x00007ffff7fc947e in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe088, env=env@entry=0x7fffffffe098)
>      at ./elf/dl-init.c:70
> #3  0x00007ffff7fc9568 in call_init (env=0x7fffffffe098, argv=0x7fffffffe088, argc=1, l=<optimized out>) at ./elf/dl-init.c:33
> #4  _dl_init (main_map=0x7ffff7ffe2e0, argc=1, argv=0x7fffffffe088, env=0x7fffffffe098) at ./elf/dl-init.c:117
> #5  0x00007ffff7fe32ea in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
>
>
> This already has been reported here
> https://inbox.dpdk.org/users/C7FF2508-D633-404E-95AF-5F604D8E8E4B@intel.com/t/
> but I don't see a solution there. It just ends up asking for the line numbers.
> Well, the line is
>
>
>       __cpuid_count(feat->leaf, feat->subleaf,
>               regs[RTE_REG_EAX], regs[RTE_REG_EBX],
>               regs[RTE_REG_ECX], regs[RTE_REG_EDX]);
>
>      /* check if the feature is enabled */
>      return (regs[feat->reg] >> feat->bit) & 1; ====> line 173
>
>
> Maybe this should catch SIGILL?

SIGILL is a sign that some unsupported instruction (for your old cpu)
has been executed.
Did you try building dpdk with -Dplatform=generic meson option?


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM
  2023-09-22 18:02 ` Bernd Schubert
@ 2023-09-25 17:11   ` Bernd Schubert
  0 siblings, 0 replies; 4+ messages in thread
From: Bernd Schubert @ 2023-09-25 17:11 UTC (permalink / raw)
  To: dev

On 9/22/23 20:02, Bernd Schubert wrote:
>>
>> This already has been reported here
>> https://inbox.dpdk.org/users/C7FF2508-D633-404E-95AF-5F604D8E8E4B@intel.com/t/
>> but I don't see a solution there. It just ends up asking for the line 
>> numbers.
>> Well, the line is
>>

Sorry for the noise, it was actually our build system causing the issue. 
It was explicitly asking for haswell, which is one step ahead my lab 
system (ivybridge).


Bernd


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-25 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22 17:48 SIGILL in rte_cpu_get_flag_enabled / RTE_CPUFLAG_RTM Bernd Schubert
2023-09-22 18:02 ` Bernd Schubert
2023-09-25 17:11   ` Bernd Schubert
2023-09-25  9:53 ` David Marchand

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).