Bug 2211358

Summary: Assertion 'sz <= d->buffer_filled' failed at ../src/libsystemd/sd-event/sd-event.c:3229, function event_inotify_data_drop()
Product: Red Hat Enterprise Linux 8 Reporter: Martin Pitt <mpitt>
Component: systemdAssignee: David Tardon <dtardon>
Status: POST --- QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.9CC: dtardon, jamacku, systemd-maint-list
Target Milestone: rcKeywords: Bugfix, Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: CockpitTest
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Martin Pitt 2023-05-31 08:42:54 UTC
Description of problem: In our Cockpit tests on RHEL/CentOS 8, the (Python) bridge often triggers this assertion in libsystemd when using the inotify API.


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

systemd-239-76.el8.x86_64.rpm


How reproducible: Always


Steps to Reproduce:

We often see this in Cockpit's integration tests, e.g. in [1], with a full journal [2]. But this can be reproduced/investigated in a more accessible way with our systemd_ctypes library:

  git clone https://github.com/allisonkarlitskaya/systemd_ctypes
  # disable the test skip
  sed -i '/crashes on RHEL 8 systemd/d' systemd_ctypes/test/test_pathwatch.py

  podman run -it --rm -v ./systemd_ctypes:/src -w /src quay.io/centos/centos:stream8

Inside the container:

  dnf install -y python3-pip python3-dbus dbus-daemon systemd-libs; pip3 install tox
  tox -e py3 -- -sv -k testRootDirectoryIdentity

Actual results:

crashes with

  Assertion 'sz <= d->buffer_filled' failed at ../src/libsystemd/sd-event/sd-event.c:3229, function event_inotify_data_drop(). Aborting.


Expected results: Works, like on RHEL 9 and Fedora.


Additional info:

[1] https://cockpit-logs.us-east-1.linodeobjects.com/pull-18860-20230531-072427-a3d937fe-centos-8-stream-pybridge/log.html#264
[2] https://cockpit-logs.us-east-1.linodeobjects.com/pull-18860-20230531-072427-a3d937fe-centos-8-stream-pybridge/TestIPA-testClientCertAuthentication-centos-8-stream-127.0.0.2-2501-FAIL.log.gz

Comment 1 Martin Pitt 2023-05-31 08:54:52 UTC
>  # disable the test skip
>  sed -i '/crashes on RHEL 8 systemd/d' test/test_pathwatch.py

Sorry, of course that needs to happen in the checkout dir:

  sed -i '/crashes on RHEL 8 systemd/d' systemd_ctypes/test/test_pathwatch.py

Comment 2 Plumber Bot 2023-08-04 15:51:25 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/396