Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ This bug was initially created as a clone of Bug #1503452 +++
Description of problem:
Crash in the last command:
% export LANG=en_US.UTF-8
[hedayat@hv ~]% date
Wed Oct 18 10:54:07 +0330 2017
[hedayat@hv ~]% timedatectl
Local time: Wed 2017-10-18 11:24:10 +0400
Universal time: Wed 2017-10-18 07:24:10 UTC
RTC time: Wed 2017-10-18 07:24:10
Time zone: Asia/Folan (+0400, +0400)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
[hedayat@hv ~]%
[hedayat@hv ~]% export LANG=fa_IR.UTF-8
[hedayat@hv ~]% date
چهارشنبه ۱۸ اكتبر ۱۷، ساعت ۱۰:۵۴:۲۴ (+0330)
[hedayat@hv ~]% timedatectl
Assertion 'xstrftime: a[] must be big enough' failed at ../src/timedate/timedatectl.c:105, function print_status_info(). Aborting.
zsh: abort (core dumped) timedatectl
Version-Release number of selected component (if applicable):
systemd-234-8.fc27.x86_64
How reproducible:
Depends on the current day of week. Happens on Wednesdays & Thursdays in fa_IR locale
--- Additional comment from Jan Synacek on 2017-10-18 09:41:44 CEST ---
src/basic/time-util.h:75:#define FORMAT_TIMESTAMP_MAX (3+1+10+1+8+1+6+1+6+1)
src/timedate/timedatectl.c:75: char a[FORMAT_TIMESTAMP_MAX];
src/timedate/timedatectl.c:105 xstrftime(a, "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm));
It seems that the maximum format length assumption only holds for non-wide/variable encoded characters.
--- Additional comment from Zbigniew Jędrzejewski-Szmek on 2017-10-18 16:32:23 CEST ---
https://github.com/systemd/systemd/pull/7123
Note that using the same reproducer as in the original bug report didn't reproduce the problem for me. It should be fixed anyway, as the assumption in the code is simply wrong.
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://access.redhat.com/errata/RHBA-2018:0711