Bug 2213383

Summary: openvswitch 3.1.1: ovs-vsctl kiled by SIGABRT (at boot)
Product: Red Hat Enterprise Linux Fast Datapath Reporter: ovs-bugzilla <ovs-bugzilla>
Component: openvswitch3.1Assignee: David Marchand <dmarchan>
Status: CLOSED ERRATA QA Contact: Rick Alongi <ralongi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: FDP 23.KCC: ctrautma, jhsiao, ralongi, tredaelli
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openvswitch3.1-3.1.0-37.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-06 20:05:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ovs-bugzilla 2023-06-08 02:10:54 UTC
+++ This bug was initially created as a clone of Bug #2211747 +++

openvswitch-3.1.1-2.fc38.x86_64 crashes at boot with "ovs-vsctl kiled by SIGABRT".

I found in the logs:
====================
--giu 01 20:34:15 dave.idp.it ovs-vsctl[2625]: ovs|00001|util|EMER|../lib/cpu.c:40: assertion __get_cpuid_max(leaf & X86_LEAF_MASK, NULL) >= leaf failed in x86_has_isa()
giu 01 20:34:16 dave.idp.it ovs-vsctl[2639]: ovs|00001|util|EMER|../lib/cpu.c:40: assertion __get_cpuid_max(leaf & X86_LEAF_MASK, NULL) >= leaf failed in x86_has_isa()
--

And I verified (running with qemu) that it is the same problem I have with bash on this specific CPU (Bug 2211733).
cpu family	: 16
model		: 6
model name	: AMD Athlon(tm) II X2 280 Processor
stepping	: 3

Maybe the problem comes from a shared component?


Reproducible: Always

Comment 1 ovs-bugzilla 2023-06-08 02:10:57 UTC
* Wed Jun 07 2023 Open vSwitch CI <ovs-ci> - 3.1.0-37
- Merging upstream branch-3.1 [RH git: 31e7facba9]
    Commit list:
    3fcb817840 cpu: Fix cpuid check for some AMD processors. (#2211747)
    01f0668fdf tc: Fix crash on malformed reply from kernel.

Comment 5 Rick Alongi 2023-06-28 15:57:45 UTC
Reproduced the issue using a RHEL-8.6 VM with AMD Phenom CPU setting with openvswitch3.1-3.1.0-17.el8fdp, verified fix using openvswitch3.1-3.1.0-39.el8fdp:

[root@netqe40 ~]# cat g3.xml 
<domain type='kvm'>
  <name>g3</name>
  <memory unit='KiB'>4194304</memory>
  <vcpu placement='static'>3</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact' check='none'>
    <model fallback='allow'>phenom</model>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/g3.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <interface type='bridge'>
      <source bridge='virbr0'/>
    </interface>
    <interface type='bridge'>
      <source bridge='ovsbr0'/>
      <virtualport type='openvswitch'>
      <parameters/>
      </virtualport>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>
[root@netqe40 ~]# virsh define g3.xml 
Domain 'g3' defined from g3.xml

[root@netqe40 ~]# virsh start g3
Domain 'g3' started

[root@netqe40 ~]# virsh console g3
Connected to domain 'g3'
Escape character is ^] (Ctrl + ])

Red Hat Enterprise Linux 8.6 (Ootpa)
Kernel 4.18.0-372.9.1.el8.x86_64 on an x86_64

Activate the web console with: systemctl enable --now cockpit.socket

localhost login: root
Password: 
[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.6 (Ootpa)

[root@localhost ~]# rpm -qa | grep openvswitch
openvswitch-selinux-extra-policy-1.0-30.el8fdp.noarch
openvswitch3.1-3.1.0-17.el8fdp.x86_64
[root@localhost ~]# ovs-vsctl
(null): ../lib/cpu.c:40: assertion __get_cpuid_max(leaf & X86_LEAF_MASK, NULL) >= leaf failed in x86_has_isa()
Aborted (core dumped)
[root@localhost ~]#

# Upgrade to openvswitch3.1-3.1.0-39.el8fdp:

[root@localhost ~]# rpm -qa | grep openvswitch
openvswitch-selinux-extra-policy-1.0-30.el8fdp.noarch
openvswitch3.1-3.1.0-39.el8fdp.x86_64

# As seen below, the issue is resolved:

[root@localhost ~]# ovs-vsctl
ovs-vsctl: missing command name (use --help for help)
[root@localhost ~]# ovs-vsctl show
18ec54b7-a9ce-47bd-8abe-bea09ad1bafc
    ovs_version: "3.1.2"

Comment 7 errata-xmlrpc 2023-07-06 20:05:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (openvswitch3.1 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:3994