Bug 2211358 - Assertion 'sz <= d->buffer_filled' failed at ../src/libsystemd/sd-event/sd-event.c:3229, function event_inotify_data_drop()
Summary: Assertion 'sz <= d->buffer_filled' failed at ../src/libsystemd/sd-event/sd-ev...
Keywords:
Status: POST
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard: CockpitTest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-31 08:42 UTC by Martin Pitt
Modified: 2023-08-04 15:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-plumbers systemd-rhel8 pull 396 0 None open Fix memory corruption 2023-06-07 10:32:25 UTC
Github systemd systemd pull 21270 0 None Merged sd-event: fix memory corruption 2023-06-07 04:59:44 UTC
Red Hat Issue Tracker RHELPLAN-158675 0 None None None 2023-05-31 08:43:49 UTC

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


Note You need to log in before you can comment on or make changes to this bug.