Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553246 - sys-process/atop init.d script: pidfile isn't set in start function
Summary: sys-process/atop init.d script: pidfile isn't set in start function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 590466
  Show dependency tree
 
Reported: 2015-06-25 18:34 UTC by silver_ghost
Modified: 2017-08-02 12:57 UTC (History)
0 users

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 silver_ghost 2015-06-25 18:34:52 UTC
So rc-status shows atop is crashed.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-06-25 21:13:59 UTC
+*atop-2.2 (25 Jun 2015)
+
+  25 Jun 2015; Lars Wendler <polynomial-c@gentoo.org> +atop-2.2.ebuild,
+  +files/atop-2.2-build.patch, +files/atop.rc-r1, +files/atopacct.rc:
+  Version bump. Added rewritten init script to fix bug #553246.
+

Let's hope this works. Feel free to reopen this bug in case it's not fixed for you.
Comment 2 silver_ghost 2015-06-27 21:52:20 UTC
I've emerged =sys-process/atop-2.2. It doesn't work. /etc/init.d/atop start freezes at first run. After Ctrl + C and running /etc/init.d/atop start one more time it shows:
 * Starting atop ...
 * start-stop-daemon: /etc/atop/atop.daily is already         [ !! ]
 * ERROR: atop failed to start

Adding  --pidfile /var/run/atop.pid to start-stop-daemon call in start function of init script worked for 1.27_p3.
Comment 3 Xiami 2017-03-23 07:50:46 UTC
/etc/atop/atop.daily is the main process and will not daemonize itself.
It seems we should add --background to start-stop-daemon, making it be:

start-stop-daemon --start --pidfile ${pidfile} \
        --exec /etc/atop/atop.daily --background
Comment 4 Alexey Grebenschikov 2017-05-12 21:49:08 UTC
I confirm that --background option in init.d script solves this issue.
Comment 5 silver_ghost 2017-06-30 22:06:56 UTC
(In reply to Alexey Grebenschikov from comment #4)
> I confirm that --background option in init.d script solves this issue.

I confirm this too. But atop crashes sometimes now with /var/log/atop/daily.log:
> existing file /var/log/atop/atop_20170701 has incompatible header
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-08-02 12:57:03 UTC
commit a1d059a3a560a5c93d3b9f6fe38d9789bf37b99c
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Wed Aug 2 14:55:16 2017

    sys-process/atop: Fixed init script for atop-2.2 (bug #553246).
    
    Package-Manager: Portage-2.3.6, Repoman-2.3.3


Also fixed in atop-2.3.0