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 1644223

Summary: Race condition with fslist channels
Product: Red Hat Enterprise Linux 7 Reporter: Martin Pitt <mpitt>
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED ERRATA QA Contact: Jan Ščotka <jscotka>
Severity: high Docs Contact:
Priority: high    
Version: 7.6CC: tbowling, toneata, vferschm
Target Milestone: rcKeywords: ZStream
Target Release: 7.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Previously, the Cockpit web interface terminated unexpectedly in some cases with a "the session has crashed" error message. This update fixes a race condition with the fslist channels, and the crash no longer occurs.
Story Points: ---
Clone Of:
: 1644346 (view as bug list) Environment:
Last Closed: 2019-08-06 13:11:28 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: 1644346, 1657383    

Description Martin Pitt 2018-10-30 09:31:02 UTC
Description of problem: Cockpit's fslist1 channel is being used in many cockpit pages, such as Docker, file autocompletion in the "SSH key" dialog or "Create new VM" on Machines.

This code has a race condition, which is caught by the upstream test/verify/check-authorize test. If it fails, the bridge crashes with

Oct 09 13:54:05 m1 systemd-coredump[1652]: Process 1564 (cockpit-bridge) of user 1000 dumped core.
                                           
                                           Stack trace of thread 1564:
                                           #0  0x00007fcbf8928855 _g_log_abort (libglib-2.0.so.0)
                                           #1  0x00007fcbf8929b8d g_logv (libglib-2.0.so.0)
                                           #2  0x00007fcbf8929d63 g_log (libglib-2.0.so.0)
                                           #3  0x000055b0a990546a cockpit_channel_control (cockpit-bridge)
                                           #4  0x000055b0a98e4465 on_files_listed (cockpit-bridge)
                                           #5  0x00007fcbf8e95d9f next_async_callback_wrapper (libgio-2.0.so.0)
                                           #6  0x00007fcbf8ecfe04 g_task_return_now (libgio-2.0.so.0)
                                           #7  0x00007fcbf8ecfe3d complete_in_idle_cb (libgio-2.0.so.0)
                                           #8  0x00007fcbf891f1cb g_idle_dispatch (libglib-2.0.so.0)
                                           #9  0x00007fcbf892288d g_main_context_dispatch (libglib-2.0.so.0)
                                           #10 0x00007fcbf8922c58 g_main_context_iterate.isra.21 (libglib-2.0.so.0)
                                           #11 0x00007fcbf8922cf0 g_main_context_iteration (libglib-2.0.so.0)
                                           #12 0x000055b0a98de06c main (cockpit-bridge)
                                           #13 0x00007fcbf782a11b __libc_start_main (libc.so.6)
                                           #14 0x000055b0a98dec4a _start (cockpit-bridge)

which for the user results in a spontaneous disconnect of their session:

https://fedorapeople.org/groups/cockpit/logs/pull-10252-20181009-132929-35c774e7-verify-fedora-atomic/TestReauthorize-testBasic-fedora-atomic-127.0.0.2-2301-FAIL.png


This got fixed upstream in https://github.com/cockpit-project/cockpit/commit/9cde72ba36102 , and this would be good to backport to RHEL 7.

Version-Release number of selected component (if applicable):

cockpit-173-7.el7

How reproducible: Difficult. It happened pretty often in our upstream CI, due to the sheer mass of test runs that we do. Since the fix, it has never crashed again, so I am fairly confident in it. Also, our tests ensure that this did not break anything else.

Comment 4 Martin Pitt 2019-01-03 12:03:34 UTC
Already in the upstream rhel-7.6 branch, and in the 173.1 release (in RHEL 7.6.1).

Comment 8 errata-xmlrpc 2019-08-06 13:11:28 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, 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-2019:2262