Bug 88375 - timedatectl crashes when run with no arguments
Summary: timedatectl crashes when run with no arguments
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-13 19:00 UTC by Doug Richardson
Modified: 2015-01-22 05:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Doug Richardson 2015-01-13 19:00:59 UTC
timedatectl crashes when run with no arguments and also when run with the "status" command. I can reproduce this crash 100% of the time.

I believe this is the same bug as discussed on the systemd-devel list here, and apparently there is a patch available.
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026285.html

---------------------
Here's an example run
---------------------
$ timedatectl
      Local time: Tue 2015-01-13 18:32:56 UTC
  Universal time: Tue 2015-01-13 18:32:56 UTC
        RTC time: n/a
       Time zone: UTC (UTC, +0000)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
*** Error in `timedatectl': free(): invalid next size (fast): 0xb7d15100 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x68eb4)[0xb6e09eb4]
/usr/lib/libc.so.6(+0x6eba8)[0xb6e0fba8]
/usr/lib/libc.so.6(+0x6f56c)[0xb6e1056c]
======= Memory map: ========
b6c18000-b6da1000 r--p 00000000 b3:02 26459      /usr/lib/locale/locale-archive
b6da1000-b6ecc000 r-xp 00000000 b3:02 17205      /usr/lib/libc-2.20.so
b6ecc000-b6edb000 ---p 0012b000 b3:02 17205      /usr/lib/libc-2.20.so
b6edb000-b6edd000 r--p 0012a000 b3:02 17205      /usr/lib/libc-2.20.so
b6edd000-b6ede000 rw-p 0012c000 b3:02 17205      /usr/lib/libc-2.20.so
b6ede000-b6ee1000 rw-p 00000000 00:00 0
b6ee1000-b6ef6000 r-xp 00000000 b3:02 16986      /usr/lib/libpthread-2.20.so
b6ef6000-b6f05000 ---p 00015000 b3:02 16986      /usr/lib/libpthread-2.20.so
b6f05000-b6f06000 r--p 00014000 b3:02 16986      /usr/lib/libpthread-2.20.so
b6f06000-b6f07000 rw-p 00015000 b3:02 16986      /usr/lib/libpthread-2.20.so
b6f07000-b6f09000 rw-p 00000000 00:00 0
b6f09000-b6f26000 r-xp 00000000 b3:02 16982      /usr/lib/libgcc_s.so.1
b6f26000-b6f35000 ---p 0001d000 b3:02 16982      /usr/lib/libgcc_s.so.1
b6f35000-b6f36000 rw-p 0001c000 b3:02 16982      /usr/lib/libgcc_s.so.1
b6f36000-b6f3c000 r-xp 00000000 b3:02 17043      /usr/lib/librt-2.20.so
b6f3c000-b6f4b000 ---p 00006000 b3:02 17043      /usr/lib/librt-2.20.so
b6f4b000-b6f4c000 r--p 00005000 b3:02 17043      /usr/lib/librt-2.20.so
b6f4c000-b6f4d000 rw-p 00006000 b3:02 17043      /usr/lib/librt-2.20.so
b6f4d000-b6f6d000 r-xp 00000000 b3:02 17158      /usr/lib/ld-2.20.so
b6f6f000-b6f71000 rw-p 00000000 00:00 0
b6f79000-b6f7b000 rw-p 00000000 00:00 0
b6f7b000-b6f7c000 r-xp 00000000 00:00 0          [sigpage]
b6f7c000-b6f7d000 r--p 0001f000 b3:02 17158      /usr/lib/ld-2.20.so
b6f7d000-b6f7e000 rw-p 00020000 b3:02 17158      /usr/lib/ld-2.20.so
b6f7e000-b6fe8000 r-xp 00000000 b3:02 17337      /usr/bin/timedatectl
b6fe9000-b6feb000 r--p 0006a000 b3:02 17337      /usr/bin/timedatectl
b6feb000-b6fec000 rw-p 0006c000 b3:02 17337      /usr/bin/timedatectl
b7d13000-b7d34000 rw-p 00000000 00:00 0          [heap]
bec0c000-bec2d000 rw-p 00000000 00:00 0          [stack]
ffff0000-ffff1000 r-xp 00000000 00:00 0          [vectors]
Aborted (core dumped)


----------------------------------------
Here's the stack of the core dump in gdb
----------------------------------------
$ coredumpctl gdb
           PID: 292 (timedatectl)
           UID: 1000 (doug)
           GID: 1000 (doug)
        Signal: 6 (ABRT)
     Timestamp: Tue 2015-01-13 18:49:16 UTC (6min ago)
  Command Line: timedatectl status
    Executable: /usr/bin/timedatectl
 Control Group: /user.slice/user-1000.slice/session-c2.scope
          Unit: session-c2.scope
         Slice: user-1000.slice
       Session: c2
     Owner UID: 1000 (doug)
       Boot ID: ea0e041f464749139100ae3258cb15af
    Machine ID: f27614a02caf4d7b89f87843b94e7beb
      Hostname: alarmpi
      Coredump: /var/lib/systemd/coredump/core.timedatectl.1000.ea0e041f464749139100ae3258cb15af.292.1421174956000000.lz4
       Message: Process 292 (timedatectl) of user 1000 dumped core.

GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "armv6l-unknown-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/timedatectl...(no debugging symbols found)...done.
[New LWP 292]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `timedatectl status'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb6d77f60 in raise () from /usr/lib/libc.so.6
(gdb) t a a bt

Thread 1 (Thread 0xb6f1a210 (LWP 292)):
#0  0xb6d77f60 in raise () from /usr/lib/libc.so.6
#1  0xb6d7935c in abort () from /usr/lib/libc.so.6
#2  0xb6db4eb8 in __libc_message () from /usr/lib/libc.so.6
#3  0xb6dbaba8 in malloc_printerr () from /usr/lib/libc.so.6
#4  0xb6dbb56c in _int_free () from /usr/lib/libc.so.6
#5  0xb6f82dac in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)


---------------------------------------
Here's the information about my systemd
---------------------------------------
$ pacman -Qi systemd
Name           : systemd
Version        : 218-1
Description    : system and service manager
Architecture   : armv6h
URL            : http://www.freedesktop.org/wiki/Software/systemd
Licenses       : GPL2  LGPL2.1  MIT
Groups         : None
Provides       : nss-myhostname  systemd-tools=218  udev=218
Depends On     : acl  bash  dbus  glib2  kbd  kmod  hwids  libcap  libgcrypt  libsystemd  libidn  lz4  pam  libseccomp  util-linux  xz
Optional Deps  : python: systemd library bindings
                 cryptsetup: required for encrypted block devices [installed]
                 libmicrohttpd: remote journald capabilities
                 quota-tools: kernel-level quota management
                 systemd-sysvcompat: symlink package to provide sysvinit binaries [installed]
                 polkit: allow administration as unprivileged user
Required By    : device-mapper  libusb  lvm2  netctl  procps-ng  systemd-sysvcompat
Optional For   : None
Conflicts With : nss-myhostname  systemd-tools  udev
Replaces       : nss-myhostname  systemd-tools  udev
Installed Size :  32.69 MiB
Packager       : Arch Linux ARM Build System <builder+xu5@archlinuxarm.org>
Build Date     : Thu 18 Dec 2014 07:18:20 PM UTC
Install Date   : Mon 12 Jan 2015 05:59:14 PM UTC
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By   : SHA256 Sum
Comment 1 Zbigniew Jedrzejewski-Szmek 2015-01-22 05:58:33 UTC
Fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=e17fb3c1dd.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.