previous
2022-08-07
---------- 2022-08-08 ----------
08:41:14 <leafwiz> Hey there. I have a daemon with a init script that seems not to work properly. Its the smokeping package. When I do a smokeping stop the service is still running
08:41:45 <leafwiz> I would expect it to log a termination to syslog
08:43:35 <leafwiz> Not sure what is wrong. the pid file seems fine
08:44:18 <leafwiz> when I give a stop command I get an output that it is stopping but nothing in syslog
08:46:01 <gnarface> did you run it as root or as a regular user?
08:46:41 <gnarface> and by "smokeping stop" you mean "/etc/init.d/smokeping stop" right?
08:52:06 <leafwiz> gnarface . I ran it as root, and yes, /etc/init.d/smokeping stop
08:54:16 <gnarface> you said nothing in syslog, did you also check daemon.log?
09:16:49 <leafwiz> gnarface: it is the same there
09:18:07 <gnarface> hmm, can't be sure what's going wrong sorry
09:18:28 <gnarface> which release are you on?
09:26:46 <gnarface> leafwiz: which release are you on? is this chimaera?
09:27:34 <leafwiz> gnarface: i'm on stable
09:27:55 <gnarface> was it an upgrade or a fresh install?
09:28:34 <leafwiz> I think it was a fresh install. But it has been autoupdating a while now
09:29:05 <gnarface> there's some bugs on bugs.debian.org related to upgrades from the previous release, i wonder if it could be related
09:30:06 <leafwiz> okay. yeah, I can do a fresh install on a system. And reinstall smokeping.
09:30:25 <gnarface> well, it might not come to that, just check those bugs and see if the config mangling happened to your configs too
09:30:26 <leafwiz> Because it seems like a obvious fault so yeah. prob something wrong with my system
09:30:52 <gnarface> it's probably also something much easier to fix than a full reinstall
09:31:01 <gnarface> i'm not making any allegations i'm just guessing still
09:31:19 <leafwiz> Sure, yeah. I don't want to do a full install on my prod system. I have a vmware at home I can do a test install on
09:32:33 <gnarface> did it ever work right or is this the first time you've tried to stop it?
09:32:59 <gnarface> there also might be something obvious if you look at the script itself, maybe related to missing some package
09:34:39 <leafwiz> The thing is. I started smokeing in debug mode, and then it might change fileownerships
09:35:05 <gnarface> hmm, i don't know enough about it to know for sure
09:35:34 <gnarface> i was just thinking that maybe it does some check assuming some shell tool is installed but gets a false positive because it's not installed
09:36:07 <gnarface> but if it used to stop right then probably not
09:38:10 <leafwiz> https://paste.pics/3e2786fcede8e8c98a68d486fbfa012b
09:38:45 <leafwiz> So I see output from the log_daemon_msg, but it seems the start-stop-daemon does not wortk
09:41:26 <gnarface> i'm not gonna click on that sorry, but i'll take your word for it
09:41:37 <gnarface> if you paste the init script at paste.debian.net i'll take a look and see if i get any ideas
09:44:48 <leafwiz> aha.. yeah. sorry. Just my copy paste did't work from vim.
09:45:33 <gnarface> highlight + middle-click paste didn't work?
09:46:08 <gnarface> paste.debian.net will allow you to select a file
09:46:28 <leafwiz> Just when I\m in vim there is issues.
09:46:28 <leafwiz> root@gnafle:/etc/smokeping/config.d# start-stop-daemon --oknodo --stop --pidfile /var/run/smokeping/smokeping.pid --exec /usr/sbin/smokeping --signal 15
09:46:29 <leafwiz> No /usr/sbin/smokeping found running; none killed.
09:46:44 <leafwiz> I ran the command manually
09:46:58 <leafwiz> root@gnafle:/etc/smokeping/config.d# ps aux | grep smoke
09:46:58 <leafwiz> smokepi+ 25979 0.0 0.2 98644 36068 ? Ss 15:39 0:00 /usr/bin/perl /usr/sbin/smokeping --config=/etc/smokeping/config
09:46:59 <leafwiz> smokepi+ 25980 0.0 0.2 98644 37524 ? S 15:39 0:00 /usr/sbin/smokeping [IRTT]
09:46:59 <leafwiz> smokepi+ 25981 0.0 0.2 98644 37716 ? S 15:39 0:00 /usr/sbin/smokeping [FPing]
09:47:00 <leafwiz> root 26649 0.0 0.0 14160 9312 pts/1 S+ 16:35 0:00 vi /etc/init.d/smokeping
09:47:06 <gnarface> careful, don't get hit by the flood protect
09:47:12 <gnarface> you can just /msg me stuff like that if you have to
09:47:37 <leafwiz> yeah, was about to ask.. nyes. Okay. But there is the lines
09:48:21 <gnarface> and the pid file you say is present and has the right pid?
09:48:45 <gnarface> seems weird
09:48:57 <gnarface> i wonder if it's a bug in start-stop-daemon
09:49:21 <gnarface> i would be tempted to just hack the script and replace that with a call to killall
09:49:33 <leafwiz> mm.. so maybe the start-stop-daemon expects /usr/sbin/smokeping ,and it sees /usr/bin/perl as well
09:49:38 <leafwiz> heh.. yeah
09:49:52 <gnarface> but /usr/sbin/smokeping has to be there doesn't it? make sure it's there
09:49:58 <leafwiz> But I could also hack the script by putting in /usr/bin/perl
09:50:05 <leafwiz> in the daemon path
09:51:58 <leafwiz> naah. that did't work.
09:52:14 <leafwiz> jupp, a killall would prob work.. ;)
09:55:56 <leafwiz> a killall didn't work.. but a kil $(cat pidfile) did work.
09:56:04 <gnarface> killall didn't work?!?!
09:56:09 <gnarface> now something seems really weird
09:56:09 <leafwiz> nope..
09:56:45 <gnarface> one thing... do you have "chimaera" in your sources.list or actually the word "stable" instead?
09:57:22 <leafwiz> I just get a "no process found"
09:57:35 <leafwiz> I think its because it is started as a perl process
09:57:40 <gnarface> maybe
09:57:49 <leafwiz> smokepi+ 27086 0.0 0.2 98616 36056 ? Ss 16:56 0:00 /usr/bin/perl /usr/sbin/smokeping --config=/etc/smokeping/config
09:58:09 <gnarface> is the perl process the one whose pid goes in the pid file?
09:58:21 <leafwiz> I have the word `stable'
09:58:26 <gnarface> so i have another theory
09:58:59 <gnarface> if you had the word stable in there since the last release, and you've had auto-updates happening, you might be experiencing problems with an incomplete upgrade
09:59:29 <leafwiz> aha.. maybe.
09:59:45 <leafwiz> I run apt update && apt upgrade in a crontab
09:59:47 <gnarface> since the release changed from beowulf to chimaera, but the auto-update thingy might not actually do a dist-upgrade
10:00:14 <gnarface> try "apt-get update && apt-get --no-install-recommends upgrade && apt-get --no-install-recommends dist-upgrade"
10:00:58 <leafwiz> one packaged wanted to be updated
10:01:13 <gnarface> look like anything relevant to this?
10:01:17 <leafwiz> coontainerd.io , been running docker on int
10:01:26 <gnarface> bummer
10:01:43 <leafwiz> yeah.. Well. I managed to hack it at least.
10:01:59 <leafwiz> Can be something to do with killall not working
10:02:13 <gnarface> hang out, maybe someone else around here has an idea what's really going on
10:02:45 <leafwiz> Sure. yeah.
10:03:57 <gnarface> if you're up for burning more time on it, it would be valuable to know if this is also misbehaving the same way on debian stable
10:04:09 <gnarface> if it's not, then we should escalate here
10:08:02 <leafwiz> Sure, I could check when I get home. I don't have any debian stable available here.
10:10:00 <gnarface> it's not like a big deal, especially if you have a solution that works for you for now, but something broken with init stuff that's not broken the same way in debian will get attention here faster
10:10:18 <gnarface> especially if it's in the stable release
10:10:25 <leafwiz> yeah, I suspect it might be a systemv issue only
10:10:55 <leafwiz> But it will be interesting to see. I will check it up when I'm home.
10:35:50 <golinux> https://www.devuan.org/os/releases
10:36:07 <golinux> Read the section "Codenames or suites?"
10:36:35 <golinux> leafwiz: ^^^
13:10:01 <rwp> golinux, leafwiz is no longer in the channel but I installed smokeping and will confirm there is a bug and it does not stop correctly.
13:10:15 <rwp> I'll see if I can't chase it down...
13:28:40 <golinux> rwp: He was here when I posted that.
13:43:00 <leafwiz> Hey. Earlier I chatted about the init script in smokeping package does not work. I have tried on my homesystem that was installed a month ago. Stable. Same result
13:43:21 <leafwiz> Or the script is unable to stop the smokeping daemon
13:43:35 <gnarface> it has been independently confirmed moments ago, leafwiz
13:43:39 <rwp> Hi leafwiz. I installed smokeping here and will confirm there is a bug in the init script and it does not kill things properly.
13:44:02 <leafwiz> Cool. Good to hear. So people know about it.
13:44:35 <rwp> I'll dig into it a little big more here in a bit. It's definitely a Debian upstream problem.
13:44:42 <leafwiz> Ah. Misread, moments ago. But that it also good. :)
13:45:15 <rwp> However... It's in an init script. So... I am not optimistic about Debian being receptive to a fix there.
13:45:29 <leafwiz> mm.. yeah, that is my feeling as well.
13:45:47 <leafwiz> But does devuan maintain inits scripts themself?
13:47:54 <leafwiz> Oh well. We will see how it develops. hope for the best
13:48:25 <leafwiz> Maybe some init lovers will give it the good graces
13:51:15 <gnarface> there's some forked packages that might have inits i think, and there's also a separate package of missing init scripts around here somewhere too
13:51:40 <gnarface> the preference would be for debian to fix it if they will though
13:58:50 <leafwiz> Its strange. Even though the pid file has the correct pid, and the daemon has the correct fullpath name the start-stop-daemon says "No /usr/sbin/smokeping found running; none killed."
14:00:57 <gnarface> it might be checking the name and finding /usr/bin/perl, you might be right about that
14:01:14 <gnarface> the pid in the file is the one pointing to the perl process that launches it, isn't it?
14:02:29 <leafwiz> well.. in work I got the path of the perl process, and then the smokepingscript , but at home, with both stable devuan, I only get the path of the smokeping script
14:02:59 <leafwiz> but it is a /usr/bin/perl script
14:03:20 <leafwiz> So I'm unsure of how the system handles that type of programs.
14:04:38 <leafwiz> I also tried to feed the start-stop-daemon with the correct user since it runs under the user `smokeping' but no go
14:05:25 <gnarface> hmm, i wonder if --ppid would work
14:05:38 <gnarface> for parent process pid
14:05:59 <gnarface> i'm just looking at the man page for ideas
14:06:13 <gnarface> maybe there's just a forgotten flag or something
14:06:23 <leafwiz> start-stop-daemon --oknodo --stop --retry 3 --pidfile $PIDFILE --exec /usr/bin/perl --signal 15
14:06:31 <leafwiz> This worked, or killed it
14:07:04 <gnarface> ah, --exec, good call
14:07:19 <leafwiz> Jupp. Just copied from the init file
14:07:31 <leafwiz> but yeah, my suspicions was on the process-name
14:10:30 <leafwiz> Okay, so the init script needs to be changed to: start-stop-daemon --oknodo --stop --retry 3 --pidfile $PIDFILE --signal 15 -u smokeping
14:11:05 <leafwiz> "Don't use --exec $DAEMON when stopping, as this doesn't work if you're trying to stop the daemon after having replaced the executable as part of"
14:11:06 <leafwiz> https://serverfault.com/questions/706018/whats-the-proper-what-to-terminate-a-script-using-start-stop-daemon
14:11:36 <leafwiz> the start-stop will complain if you don't add the user option.
14:11:53 <leafwiz> And you should not use the --exec when dealing with scripts
14:14:19 <leafwiz> Or this is the correct version I would say:
14:14:19 <leafwiz> start-stop-daemon --oknodo --stop --retry 3 --quiet --pidfile $PIDFILE --user $DAEMON_USER --signal 15
14:16:23 <leafwiz> Jupp. All good now.
14:21:50 <leafwiz> http://sprunge.us/0X6s0t
14:22:07 <leafwiz> The init script
14:24:51 <leafwiz> gnarface: are you able to confirm it?
14:25:13 <leafwiz> And then the question is how do we send this patch to the correct people
14:25:20 <leafwiz> I have never done something like this
14:32:26 <gnarface> file it at bugs.devuan.org i would say
14:33:13 <gnarface> fix seems logical, i'm sure rwp can verify
14:37:17 <leafwiz> "Also remember that bugs in unforked packages (those that Devuan uses directly from Debian) should usually be reported to Debian's BTS unless you think you have found a Devuan specific problem. "
14:37:41 <leafwiz> So this is an unforked package I assume. So I can report to BTS
14:37:55 <gnarface> well that's probably true i guess
14:38:32 <gnarface> forgot about that part
14:38:52 <gnarface> they're probably just gonna remove it from the package though
14:40:47 <leafwiz> The init script?
14:41:27 <leafwiz> Well. Maybe they won't if I supply a patch
14:41:48 <gnarface> worth a try
15:16:04 <leafwiz> ubs.. I used the reportbug tool, and it send the bugreport to devuan. Oh well. They will prob forward it for me, or something :)
15:23:54 <leafwiz> Another thing. Why is it that so many distributions with debian is using the driver name as the device name for the nic ? In stead of eth0 or wlan0 ? What is it that one gains by doing this?
15:24:16 <leafwiz> Or some distribution, but happily not Devuan
15:25:20 <gnarface> i think they're just trying to be annoying actually but the excuse is that it's for disambiguation
15:25:32 <gnarface> bsd does something similar
15:25:33 <leafwiz> I ran into this in work. Trying to help a field technician, and he had to type in that long nic name in a console terminal. was a bit annoying
15:26:28 <leafwiz> They succeed in being annoying, because the crappy nic name was so long! Like a hex password.. >P
15:27:20 <leafwiz> I complained to debian to day.. And they gave me a long list, but I dunno. That list was written with quite the attitude.
15:27:27 <leafwiz> So I didn't read it
15:27:55 <leafwiz> (or the list was not long. It was a list with some topics)
15:28:29 <leafwiz> Oh well. I just hope Devuan is able to maintain the classic naming scheme.
15:28:41 <leafwiz> Its one of those things I like with linux
15:30:04 <leafwiz> Like the two things that I liked with linux when I was a yungster was the systemv startup scripts, everything is a file. And the simple naming conventions for the hw devices. That was for me quite impressive.
15:30:19 <gnarface> there's a kernel command-line parameter you can set to change it if you need to
15:31:09 <leafwiz> yeah, and that is nice. Its just that I miss those simple and nice names in default install.
15:33:09 <leafwiz> Its fine. I have devuan.
15:50:15 <wikan> hi, is anyone using lxc under devuan?
15:50:26 <wikan> it is even possible to use unprivigeled containers?
15:51:28 <gnarface> not sure, but maybe check the forum while you wait for someone here who knows
15:52:11 <wikan> well i browse internet now
15:52:16 <wikan> systemd is a fucking cancer
15:54:05 <wikan> well i found something...
16:15:14 <wikan> lxc doesnt work
16:17:33 <gnarface> qemu works
16:19:06 <wikan> but slower
16:20:09 <gnarface> with kvm it's pretty fast
16:20:31 <wikan> if you have cpu that suuport virtualization
16:21:25 <wikan> i am too old i think
16:21:42 <wikan> fuck, i must drop every software i use
16:21:58 <gnarface> linux-vservers maybe?
16:22:10 <wikan> what it is?
16:26:09 <gnarface> kernel level para-virtualization, it used to be part of debian a long time ago until it was pulled, but with some effort (custom kernel patch+build) you can get it working again
16:26:35 <wikan> i read about it
16:26:52 <wikan> well i quit this shit
16:26:53 <gnarface> it's a good choice if you don't have hardware virtualization acceleration and only need to support linux guests
16:27:33 <wikan> it is annoying if you do something and someone tells you to fuck yourself
16:28:01 <wikan> non stop something changes
16:28:23 <wikan> i thought the arguments of commands is the max I can expect
16:28:49 <wikan> but as i see... one update and you are fucked
16:44:31 <rwp> leafwiz, gnarface, I see lots of discussion so I assume the problem is resolved without reading it in detail.
16:44:52 <rwp> leafwiz, gnarface, But I dug into things and this is the bug ticket on the problem. Already fixed in Sid. https://bugs.debian.org/989354
16:45:56 <rwp> leafwiz, gnarface, And the problem was created due to: https://bugs.debian.org/922395
16:46:30 <rwp> So even if this comes afterward I am hoping it adds some detail to things regardless. :-)
16:57:53 <brocashelm> someone was having a bad day...
2022-08-08
next