Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2148852

Summary: Please backport [PATCH] teamd: stop iterating callbacks when a loop restart is requested
Product: Red Hat Enterprise Linux 9 Reporter: Lubomir Rintel <lrintel>
Component: libteamAssignee: Xin Long <lxin>
Status: CLOSED ERRATA QA Contact: LiLiang <liali>
Severity: high Docs Contact:
Priority: high    
Version: 9.1CC: lrintel, mleitner, network-qe
Target Milestone: rcKeywords: Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libteam-1.31-16.el9_1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2148855 (view as bug list) Environment:
Last Closed: 2023-01-23 15:23:31 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:    
Bug Blocks: 2148855    

Description Lubomir Rintel 2022-11-28 07:28:20 UTC
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-11-28 08:16:00 UTC
Hi Lubomir,

Can you paste the reproducer?

I didn't find it at https://github.com/jpirko/libteam/commit/ffc6a52bd285a476b547312012078af69220574b.

I tried "/usr/bin/teamd -o -n -U -D -N -t team0 -gg", but can't reproduce this bug.

BR,
Liang Li.

Comment 2 Lubomir Rintel 2022-12-02 12:37:37 UTC
(In reply to LiLiang from comment #1)
> Hi Lubomir,
> 
> Can you paste the reproducer?
> 
> I didn't find it at
> https://github.com/jpirko/libteam/commit/
> ffc6a52bd285a476b547312012078af69220574b.
> 
> I tried "/usr/bin/teamd -o -n -U -D -N -t team0 -gg", but can't reproduce
> this bug.
> 
> BR,
> Liang Li.

This is fairly difficult to reproduce.
The crash happens when the D-Bus daemon is killed off.

fpokryvk of NetworkManager QE can certainly help you reproduce the problem, they got a test.

Comment 7 LiLiang 2022-12-08 02:23:18 UTC
As this bug is difficult to reproduce, I did sanity check only.

[root@dell-per740-17 ~]# rpm -q teamd
teamd-1.31-16.el9_1.x86_64
[root@dell-per740-17 ~]# rpm -q libteam
libteam-1.31-16.el9_1.x86_64
[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, 0x557797e7ec70
Added loop callback: libteam_events, 0x557797e7ec70
Added loop callback: workq, 0x557797e7ec70
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, 0x557797e7ec70
Added loop callback: dbus_dispatch, 0x557797e82ce0
Added loop callback: dbus_watch, 0x557797e806f0
Added loop callback: dbus_watch, 0x557797e80740
dbus: connected to 4ab40f239cac11dd49a69f1893864151 with name :1.321
<ifinfo_list>
 74: team0: a6:68:fc:b0:88:e7: 0 
</ifinfo_list>
<port_list>
</port_list>
<changed_option_list>
</changed_option_list>
Added loop callback: dbus_timeout, 0x557797e836f0
Removed loop callback: dbus_timeout, 0x557797e836f0
dbus: have name org.libteam.teamd.team0
1.31 successfully started.
<changed_option_list>
*mode roundrobin 
</changed_option_list>
Added loop callback: usock_acc_conn, 0x557797e84e40
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
Added loop callback: usock_acc_conn, 0x557797e83750
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
<ifinfo_list>
*74: team0: a6:68:fc:b0:88:e7: 0 
</ifinfo_list>
Added loop callback: usock_acc_conn, 0x557797e83800
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
usock: calling method "PortAdd"
port_devname "ens1f0np0"
ens1f0np0: Adding port (found ifindex "6").
<ifinfo_list>
*74: team0: a6:68:fc:b0:88:e7: 0 
</ifinfo_list>
<port_list>
*6: ens1f0np0: down 0Mbit HD 
</port_list>
ens1f0np0: Using implicit link watch.
ens1f0np0: Got link watch from port config.
Added loop callback: lw_ethtool_delay, 0x557797e86840
Removed loop callback: usock_acc_conn, 0x557797e83800
<ifinfo_list>
*74: team0: b8:59:9f:06:56:6c: 0 
*6: ens1f0np0: *b8:59:9f:06:56:6c: 74 
</ifinfo_list>
<changed_option_list>
*queue_id (port:ens1f0np0) 0 
*priority (port:ens1f0np0) 0 
*user_linkup_enabled (port:ens1f0np0) false 
*user_linkup (port:ens1f0np0) false 
*enabled (port:ens1f0np0) true 
</changed_option_list>
<port_list>
*6: ens1f0np0: up 25000Mbit FD 
</port_list>
ens1f0np0: ethtool-link went up.
<changed_option_list>
*priority (port:ens1f0np0) 0 
</changed_option_list>
<changed_option_list>
*user_linkup (port:ens1f0np0) true 
</changed_option_list>
usock: calling method "ConfigDumpActual"
Added loop callback: usock_acc_conn, 0x557797e83eb0
usock: calling method "ConfigDump"
usock: calling method "ConfigDumpActual"
usock: calling method "StateDump"
usock: calling method "PortAdd"
port_devname "ens1f1np1"
ens1f1np1: Adding port (found ifindex "7").
<ifinfo_list>
 74: team0: b8:59:9f:06:56:6c: 0 
 6: ens1f0np0: b8:59:9f:06:56:6c: 74 
</ifinfo_list>
<port_list>
*7: ens1f1np1: down 0Mbit HD 
 6: ens1f0np0: up 25000Mbit FD 
</port_list>
ens1f1np1: Using implicit link watch.
ens1f1np1: Got link watch from port config.
Added loop callback: lw_ethtool_delay, 0x557797e913c0
Removed loop callback: usock_acc_conn, 0x557797e83eb0
<changed_option_list>
*queue_id (port:ens1f1np1) 0 
*priority (port:ens1f1np1) 0 
*user_linkup_enabled (port:ens1f1np1) false 
*user_linkup (port:ens1f1np1) false 
*enabled (port:ens1f1np1) true 
</changed_option_list>
Removed loop callback: usock_acc_conn, 0x557797e84e40
<port_list>
*7: ens1f1np1: up 25000Mbit FD 
 6: ens1f0np0: up 25000Mbit FD 
</port_list>
ens1f1np1: ethtool-link went up.
<changed_option_list>
*priority (port:ens1f1np1) 0 
</changed_option_list>
<changed_option_list>
*user_linkup (port:ens1f1np1) true 
</changed_option_list>
Got SIGINT, SIGQUIT or SIGTERM.
Removed loop callback: lw_ethtool_delay, 0x557797e913c0
Removed loop callback: lw_ethtool_delay, 0x557797e86840
Exiting...
Removed loop callback: usock_acc_conn, 0x557797e83750
Removed loop callback: usock, 0x557797e7ec70
Removed loop callback: workq, 0x557797e7ec70
Removed loop callback: libteam_events, 0x557797e7ec70
Removed loop callback: daemon, 0x557797e7ec70
[root@dell-per740-17 ~]#

Comment 13 errata-xmlrpc 2023-01-23 15:23:31 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:0344