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 2076267 - sysctl --system disables abrt-hook-ccpp
Summary: sysctl --system disables abrt-hook-ccpp
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: abrt
Version: 8.1
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: abrt
QA Contact: CS System Management SST QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-18 13:45 UTC by Paulo Andrade
Modified: 2023-06-30 08:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-30 08:18:08 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1657158 1 high CLOSED In ABRT + systemd-coredump environment, "sysctl --system" disables abrt-hook-ccpp 2023-09-15 01:27:57 UTC
Red Hat Issue Tracker RHELPLAN-119123 0 None None None 2022-04-18 13:50:16 UTC

Description Paulo Andrade 2022-04-18 13:45:58 UTC
When configuring the system to use abrt-ccpp instead of systemd-coredump,
if running "sysctl --system", it will override kernel.core_pattern

To reproduce the issue, assuming it is using systemd-coredump, what
should be default, run:


# systemctl disable abrt-journal-core.service
# systemctl mask abrt-journal-core.service
# systemctl stop abrt-journal-core.service
# systemctl enable abrt-ccpp.service
# systemctl start abrt-ccpp.service

  After above steps, might need to run:

# systemctl daemon-reload

or reboot.

After that /proc/sys/kernel/core_pattern should show it is using
abrt-hook-ccpp.

The problem is that if running "sysctl --system" will change back to
use systemd-coredump, leaving the system in a confusing state.


It should be possible to use abrt-ccpp instead of systemd-coredump
and also be able to run "sysctl --system", without any hacking around
to save/restore /proc/sys/kernel/core_pattern

Comment 1 Michal Sekletar 2022-04-19 13:02:03 UTC
I think it should be ABRT package that will ship/create sysctl snippet that would override the default one.

Comment 2 David Tardon 2022-04-19 17:17:01 UTC
To expand comment 1 a bit: the way abrt sets up kernel.core_pattern is just incompatible with `sysctl --system`. abrt-ccpp.service changes the core_pattern on the fly, on start/stop of the service, but sysctl configuration *on disk* remains unchanged. Hence, when `sysctl --system` is run, it just reapplies that configuration, overriding the value previously written by abrt-ccpp.service. There are two simple ways to fix this: 1/ Ship a config. file for sysctl that overrides the kernel.core_pattern set by systemd's config. file (which is /usr/lib/sysctl.d/50-coredump.conf, so something like /usr/lib/sysctl.d/60-abrt.conf would do.) Then kernel.core pattern would be set to abrt just by installing abrt (or a subpackage of abrt that contains the C++ hook). 2/ Also write the core_pattern to a temporary config. file in /run/sysctl.d on start of abrt-ccpp.service (and remove the file again on stop).


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