Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588066 - sys-power/apcupsd-3.14.13 crash on power failure event
Summary: sys-power/apcupsd-3.14.13 crash on power failure event
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-05 12:36 UTC by fkater
Modified: 2016-10-17 18:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fkater 2016-07-05 12:36:13 UTC
apcupsd-3.14.13 crashes on power failure event. Tested with glibc-2.23-r2,
gcc-5.4.0, with or without lto. There is /bin/mail installed but IMHO this
does not cause the crash.  apcupsd-3.14.8 does NOT crash, so do not remove
that older version yet.

This is what journalctl -b -1 has:

Jul 05 13:03:45 p-710 apcupsd[260]: Running on UPS batteries.
Jul 05 13:03:45 p-710 apcupsd[260]: /etc/apcupsd/onbattery: line 18: /bin/mail: No such file or directory
Jul 05 13:03:45 p-710 apcupsd[260]: *** buffer overflow detected ***: /sbin/apcaccess terminated
Jul 05 13:03:45 p-710 apcupsd[260]: ======= Backtrace: =========
Jul 05 13:03:45 p-710 apcupsd[260]: /lib64/libc.so.6(+0x6fc2b)[0x7ff133d30c2b]
Jul 05 13:03:45 p-710 apcupsd[260]: /lib64/libc.so.6(__fortify_fail+0x37)[0x7ff133db91e7]
Jul 05 13:03:45 p-710 apcupsd[260]: /lib64/libc.so.6(+0xf62e0)[0x7ff133db72e0]
Jul 05 13:03:45 p-710 apcupsd[260]: /lib64/libc.so.6(+0xf8157)[0x7ff133db9157]
Jul 05 13:03:45 p-710 apcupsd[260]: /sbin/apcaccess[0x402c94]
Jul 05 13:03:45 p-710 apcupsd[260]: /sbin/apcaccess[0x402dc0]
Jul 05 13:03:45 p-710 apcupsd[260]: /sbin/apcaccess[0x4016b0]
Jul 05 13:03:45 p-710 apcupsd[260]: /lib64/libc.so.6(__libc_start_main+0xf0)[0x7ff133ce1710]
Jul 05 13:03:45 p-710 apcupsd[260]: /sbin/apcaccess[0x401ae9]
Jul 05 13:03:45 p-710 apcupsd[260]: ======= Memory map: ========
Jul 05 13:03:45 p-710 apcupsd[260]: 00400000-00406000 r-xp 00000000 00:10 2389437                            /sbin/apcaccess
Jul 05 13:03:45 p-710 apcupsd[260]: 00605000-00606000 r--p 00005000 00:10 2389437                            /sbin/apcaccess
Jul 05 13:03:45 p-710 apcupsd[260]: 00606000-00608000 rw-p 00006000 00:10 2389437                            /sbin/apcaccess
Jul 05 13:03:45 p-710 apcupsd[260]: 01c8f000-01cb0000 rw-p 00000000 00:00 0                                  [heap]
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff13389f000-7ff1338b5000 r-xp 00000000 00:10 2154878                    /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff1338b5000-7ff133ab4000 ---p 00016000 00:10 2154878                    /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133ab4000-7ff133ab5000 r--p 00015000 00:10 2154878                    /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133ab5000-7ff133ab6000 rw-p 00016000 00:10 2154878                    /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133ab6000-7ff133ac0000 r-xp 00000000 00:10 2225431                    /lib64/libnss_files-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133ac0000-7ff133cbf000 ---p 0000a000 00:10 2225431                    /lib64/libnss_files-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133cbf000-7ff133cc0000 r--p 00009000 00:10 2225431                    /lib64/libnss_files-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133cc0000-7ff133cc1000 rw-p 0000a000 00:10 2225431                    /lib64/libnss_files-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133cc1000-7ff133e51000 r-xp 00000000 00:10 2225551                    /lib64/libc-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff133e51000-7ff134050000 ---p 00190000 00:10 2225551                    /lib64/libc-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff134050000-7ff134054000 r--p 0018f000 00:10 2225551                    /lib64/libc-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff134054000-7ff134056000 rw-p 00193000 00:10 2225551                    /lib64/libc-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff134056000-7ff13405a000 rw-p 00000000 00:00 0
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff13405a000-7ff13407d000 r-xp 00000000 00:10 2225550                    /lib64/ld-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff134274000-7ff134277000 rw-p 00000000 00:00 0
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff13427b000-7ff13427d000 rw-p 00000000 00:00 0
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff13427d000-7ff13427e000 r--p 00023000 00:10 2225550                    /lib64/ld-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff13427e000-7ff13427f000 rw-p 00024000 00:10 2225550                    /lib64/ld-2.23.so
Jul 05 13:03:45 p-710 apcupsd[260]: 7ff13427f000-7ff134280000 rw-p 00000000 00:00 0
Jul 05 13:03:45 p-710 apcupsd[260]: 7fff87baf000-7fff87bd0000 rw-p 00000000 00:00 0                          [stack]
Jul 05 13:03:45 p-710 apcupsd[260]: 7fff87bf8000-7fff87bfb000 r--p 00000000 00:00 0                          [vvar]
Jul 05 13:03:45 p-710 apcupsd[260]: 7fff87bfb000-7fff87bfd000 r-xp 00000000 00:00 0                          [vdso]
Jul 05 13:03:45 p-710 apcupsd[260]: ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Jul 05 13:03:45 p-710 apcupsd[260]: /etc/apcupsd/onbattery: line 18:   299 Aborted                 (core dumped) /sbin/apcaccess status
Jul 05 13:03:45 p-710 apcupsd[260]: wall: cannot get tty name: Inappropriate ioctl for device
Jul 05 13:04:06 p-710 apcupsd[260]: Reached run time limit on batteries.
Jul 05 13:04:06 p-710 apcupsd[260]: Initiating system shutdown!
Jul 05 13:04:06 p-710 apcupsd[260]: User logins prohibited
Jul 05 13:04:06 p-710 apcupsd[260]: wall: cannot get tty name: Inappropriate ioctl for device
Jul 05 13:04:06 p-710 apcupsd[260]: wall: cannot get tty name: Inappropriate ioctl for device
Jul 05 13:04:06 p-710 shutdown[311]: shutting down for system halt


Reproducible: Always
Comment 1 fkater 2016-10-17 18:48:00 UTC
The new version apcupsd-3.14.14 fixes the issue.

Test was:
- install new version
- pull out power from UPS.
- correct shutdown
- plug in power to UPS
- correct reboot
- check of previous demsg: no crash of apcupsd