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 1268336 - systemd-analyze set-log-level manpage fix
Summary: systemd-analyze set-log-level manpage fix
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks: 1203710 1289485 1313485
TreeView+ depends on / blocked
 
Reported: 2015-10-02 14:39 UTC by Zdenek Pytela
Modified: 2019-09-12 09:01 UTC (History)
4 users (show)

Fixed In Version: systemd-219-20.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 00:44:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2216 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2016-11-03 13:24:51 UTC

Description Zdenek Pytela 2015-10-02 14:39:27 UTC
Description of problem:

When the following command is run without further arguments, it coredumps:

  # systemd-analyze set-log-level
This command expects one argument only.
*** Error in `systemd-analyze': munmap_chunk(): invalid pointer: 0x00007fffb89565a0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7bc67)[0x7f39c273dc67]
/lib64/libdbus-1.so.3(dbus_error_free+0x31)[0x7f39c2caae81]
systemd-analyze(+0x32ff)[0x7f39c31082ff]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f39c26e3af5]
systemd-analyze(+0x39dd)[0x7f39c31089dd]

Version-Release number of selected component (if applicable):
systemd-208-20.el7_1.6.x86_64

How reproducible:
always

Steps to Reproduce:
1. run: systemd-analyze set-log-level

Actual results:
error message and coredump

Expected results:
just an error message

Additional info:
According to manual page, this sustemd subcommand requires level number as an argument. The binary should not coredump though.

Comment 4 Lukáš Nykrýn 2015-10-05 08:52:46 UTC
The coredump is fixed in 7.2. I will submit a patch to upstream regarding the manpage.

Comment 5 Lukáš Nykrýn 2015-10-05 10:21:56 UTC
https://github.com/systemd/systemd/pull/1462

Comment 6 Zdenek Pytela 2015-10-07 08:22:42 UTC
Thanks for the fix. There is no need to accelerate to RHEL 7.1 at the moment.

However, there are two outstanding questions:

1. Is it possible to determine the current log level? I was not able to find it in any manual page or other resources.

2. According to the systemd(1) manual page, log-level subcommand should accept either a numerical log level or syslog symbolic names. If an incorrect argument is passed, rather cryptic message is displayed:

# systemd-analyze set-log-level 42
Failed to issue method call: Access denied

Can we also consider this to be a bug?

Comment 7 Lukáš Nykrýn 2015-10-07 08:58:21 UTC
> 1. Is it possible to determine the current log level? I was not able to find
> it in any manual page or other resources.
I am not sure if there is a nice interface for it. It is visible on dbus.

[lnykryn@notas lnykryn-systemd]$ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LogLevel 
s "info"

> 2. According to the systemd(1) manual page, log-level subcommand should
> accept either a numerical log level or syslog symbolic names. If an
> incorrect argument is passed, rather cryptic message is displayed:
> 
> # systemd-analyze set-log-level 42
> Failed to issue method call: Access denied
> 
> Can we also consider this to be a bug?

There is already a bug that error messages are cryptic. We need to fix it somehow.

Comment 9 Lukáš Nykrýn 2016-02-15 14:46:21 UTC
pushed to staging -> https://github.com/lnykryn/systemd-rhel/commit/ffe00d391c0cfc52897820bb19c6a0b8a43680d8 -> post

Comment 11 Frantisek Sumsal 2016-09-02 09:04:24 UTC
Verified with systemd-219-27.el7.

Old version:
# man systemd-analyze
<...>
systemd-analyze [OPTIONS...] set-log-level [LEVEL]
<...>
# systemd-analyze set-log-level
This command expects one argument only.
*** Error in `systemd-analyze': free(): invalid size: 0x00007fff3a983340 ***
<...>
Aborted
# echo $?
134

New version:
# man systemd-analyze
<...>
systemd-analyze [OPTIONS...] set-log-level LEVEL
<...>
# systemd-analyze set-log-level
This command expects one argument only.
# echo $?
1

Comment 13 errata-xmlrpc 2016-11-04 00:44:11 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://rhn.redhat.com/errata/RHBA-2016-2216.html


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