Bug 1268336 - systemd-analyze set-log-level manpage fix
systemd-analyze set-log-level manpage fix
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.1
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: systemd-maint
Frantisek Sumsal
:
Depends On:
Blocks: 1203710 1289485 1313485
  Show dependency treegraph
 
Reported: 2015-10-02 10:39 EDT by Zdenek Pytela
Modified: 2016-11-03 20:44 EDT (History)
4 users (show)

See Also:
Fixed In Version: systemd-219-20.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 20:44:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zdenek Pytela 2015-10-02 10:39:27 EDT
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 04:52:46 EDT
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 06:21:56 EDT
https://github.com/systemd/systemd/pull/1462
Comment 6 Zdenek Pytela 2015-10-07 04:22:42 EDT
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 04:58:21 EDT
> 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 09:46:21 EST
pushed to staging -> https://github.com/lnykryn/systemd-rhel/commit/ffe00d391c0cfc52897820bb19c6a0b8a43680d8 -> post
Comment 11 Frantisek Sumsal 2016-09-02 05:04:24 EDT
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-03 20:44:11 EDT
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.