Bug 2148855

Summary: Please backport [PATCH] teamd: stop iterating callbacks when a loop restart is requested
Product: Red Hat Enterprise Linux 8 Reporter: Lubomir Rintel <lrintel>
Component: libteamAssignee: Xin Long <lxin>
Status: CLOSED ERRATA QA Contact: LiLiang <liali>
Severity: high Docs Contact:
Priority: high    
Version: 8.7CC: liali, lxin, network-qe
Target Milestone: rcKeywords: Triaged
Target Release: 8.8   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libteam-1.31-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2148852 Environment:
Last Closed: 2023-05-16 09:03:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2148852    
Bug Blocks:    

Description Lubomir Rintel 2022-11-28 07:40:44 UTC
+++ This bug was initially created as a clone of Bug #2148852 +++

Please backport the following upstream commit:

ffc6a52 teamd: stop iterating callbacks when a loop restart is requested

https://github.com/jpirko/libteam/commit/ffc6a52bd285a476b547312012078af69220574b

This fixes a crash in a handover from initrd to real root that disrupts NetworkManager CI testing.

Thank you!

Comment 1 LiLiang 2022-12-07 01:57:34 UTC
As this issue is difficult to reproduce, I did a sanity check only.

[root@dell-per740-17 ~]# /usr/bin/teamd -o -n -U -D -N -t team0 -gg
Using team device "team0".
Using PID file "/var/run/teamd/team0.pid"
This program is not intended to be run as root.
Added loop callback: daemon, 0x55a082977c80
Added loop callback: libteam_events, 0x55a082977c80
Added loop callback: workq, 0x55a082977c80
Failed to get team runner name from config.
Using default team runner "roundrobin".
usock: Using sockpath "/var/run/teamd/team0.sock"
Added loop callback: usock, 0x55a082977c80
Added loop callback: dbus_dispatch, 0x55a08297e2e0
Added loop callback: dbus_watch, 0x55a08297bc30
Added loop callback: dbus_watch, 0x55a08297bc80
dbus: connected to 8365bade0d0bf268b8e1ca73638ff12e with name :1.30
<ifinfo_list>
 9: team0: 22:42:22:ea:7a:48: 0 
</ifinfo_list>
<port_list>
</port_list>
<changed_option_list>
</changed_option_list>
Added loop callback: dbus_timeout, 0x55a08297c9b0
Removed loop callback: dbus_timeout, 0x55a08297c9b0
dbus: have name org.libteam.teamd.team0
1.31 successfully started.
Added loop callback: usock_acc_conn, 0x55a082982820
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
Added loop callback: usock_acc_conn, 0x55a082982c60
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
<ifinfo_list>
*9: team0: 22:42:22:ea:7a:48: 0 
</ifinfo_list>
Added loop callback: usock_acc_conn, 0x55a08297f140
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
usock: calling method "PortAdd"
port_devname "ens1f0"
ens1f0: Adding port (found ifindex "6").
<ifinfo_list>
*9: team0: 22:42:22:ea:7a:48: 0 
</ifinfo_list>
<port_list>
*6: ens1f0: down 0Mbit HD 
</port_list>
ens1f0: Using implicit link watch.
ens1f0: Got link watch from port config.
Added loop callback: lw_ethtool_delay, 0x55a082982530
Removed loop callback: usock_acc_conn, 0x55a08297f140
<ifinfo_list>
*9: team0: b8:59:9f:06:56:6c: 0 
*6: ens1f0: *b8:59:9f:06:56:6c: 9 
</ifinfo_list>
<changed_option_list>
*queue_id (port:ens1f0) 0 
*priority (port:ens1f0) 0 
*user_linkup_enabled (port:ens1f0) false 
*user_linkup (port:ens1f0) false 
*enabled (port:ens1f0) true 
</changed_option_list>
<port_list>
*6: ens1f0: up 25000Mbit FD 
</port_list>
ens1f0: ethtool-link went up.
<changed_option_list>
*priority (port:ens1f0) 0 
</changed_option_list>
usock: calling method "ConfigDumpActual"
<changed_option_list>
*user_linkup (port:ens1f0) true 
</changed_option_list>
Added loop callback: usock_acc_conn, 0x55a08297bd40
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
usock: calling method "PortAdd"
port_devname "ens1f1"
ens1f1: Adding port (found ifindex "7").
<ifinfo_list>
 9: team0: b8:59:9f:06:56:6c: 0 
 6: ens1f0: b8:59:9f:06:56:6c: 9 
</ifinfo_list>
<port_list>
*7: ens1f1: down 0Mbit HD 
 6: ens1f0: up 25000Mbit FD 
</port_list>
ens1f1: Using implicit link watch.
ens1f1: Got link watch from port config.
Added loop callback: lw_ethtool_delay, 0x55a082980900
Removed loop callback: usock_acc_conn, 0x55a08297bd40
<changed_option_list>
*queue_id (port:ens1f1) 0 
*priority (port:ens1f1) 0 
*user_linkup_enabled (port:ens1f1) false 
*user_linkup (port:ens1f1) false 
*enabled (port:ens1f1) true 
</changed_option_list>
<port_list>
*7: ens1f1: up 25000Mbit FD 
 6: ens1f0: up 25000Mbit FD 
</port_list>
ens1f1: ethtool-link went up.
<changed_option_list>
*priority (port:ens1f1) 0 
</changed_option_list>
<changed_option_list>
*user_linkup (port:ens1f1) true 
</changed_option_list>
Removed loop callback: usock_acc_conn, 0x55a082982820
Got SIGINT, SIGQUIT or SIGTERM.
Removed loop callback: lw_ethtool_delay, 0x55a082980900
Removed loop callback: lw_ethtool_delay, 0x55a082982530
Exiting...
Removed loop callback: usock_acc_conn, 0x55a082982c60
Removed loop callback: usock, 0x55a082977c80
Removed loop callback: workq, 0x55a082977c80
Removed loop callback: libteam_events, 0x55a082977c80
Removed loop callback: daemon, 0x55a082977c80
[root@dell-per740-17 ~]#

Comment 5 LiLiang 2022-12-08 00:45:57 UTC
set verified according to comment #2

Comment 7 errata-xmlrpc 2023-05-16 09:03:11 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 (libteam 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:2956