libera/#devuan/ Monday, 2024-10-07

gnarfacehmm, i really thought that linux-source package had the debian/ directory...02:46
fsmithredgnarface, me too, but i see it's not. Maybe this? https://salsa.debian.org/kernel-team/linux03:01
gnarfacehmm, no, it's definitely there, or at least was last time i downloaded it03:06
gnarfacemy on-disk copy of 6.1.85 still has it03:06
gnarfacebut maybe the problem is i mistakenly suggested "apt-get install linux-source" instead of "apt-get source linux-source" which is what is actually in my history on that machine03:07
gnarfacei can't imagine why there'd be a difference for that particular package, but this part of the way debian does things never quite made sense to me anyway03:08
gnarfacewell, anyway, if Alverstone comes back, someone please suggest to try it again with "apt-get source linux-image" instead03:08
fsmithredoh right... apt-get source, not install. I did it wrong.03:36
gnarfacedid you just try again? is it still there or did they actually remove it from the most recent versions?03:37
fsmithredyes, the correct command gives the correct result03:39
fsmithredand wow that debian dir is full.03:39
gnarfaceyea there's a huge stack of patches in there, and while they do sometimes mysteriously break other things, over time i've noticed they usually mysteriously fix them03:40
gnarfacelots of backported security stability and bug fixes03:41
gnarfaceymmv i suppose03:41
gnarfacehmm, i could have sworn i had to get that package specifically with "apt-get install ..." before too though, weird03:49
onefangfirefox-esr locked up it's window, and I can't kill it.  Not even killall -KILL worked.06:02
onefangI could reboot, but I have another process that'll take hours to complete that I can't interrupt.06:03
gnarfaceisn't it killall -9?06:04
gnarfaceno, wait, killall works different06:04
gnarfacedo "kill -9 [pid]"06:04
gnarfacethen wait a couple seconds06:04
debdog"kill dash nine | and the process is mine" heehee06:04
gnarfaceif there's multiple firefox processes, put them all on the command-line in a list06:04
onefangExcept there's 152 of them.  lol06:05
gnarfacewoah, that's too many06:05
gnarfacesomething definitely went wrong06:05
debdogyou'll have to find the one with the lowest PID06:05
gnarface"ps aux --forest" might help, there should be a hierarchy06:05
gnarfacethe controlling one won't necessarily be the lowest PID, just probably06:06
onefangI just locked up two terminals trying that.  lol06:06
gnarfacedoh06:06
gnarfacewell, then, you could always try to pipe through cut and grep06:07
onefangAh btop can show a tree, and it was already running.  Killing the base one didn't help.06:10
gnarfaceonly one choice then06:11
gnarfaceyou gotta get them all onto one kill -9 command-line06:11
onefangFind something else to do for a few hours, then reboot.  Or that.  lol06:11
gnarface"killall -9 firefox-esr" didn't help?06:12
gnarfacefor some reason i seem to recall it didn't allow -9 but i'm not sure06:12
onefangIt allows it, but doesn't do anything.06:13
onefangLooks like any use of the ps command locks up, but btop and pstree work fine.06:18
gnarfaceheh, what site were you using so i know not to go there?06:30
onefangI was 14 pages deep on the 44 comment pages about Ars Technica changing their UI.  Doubt if that was the problem, I regularly read longerl comment sections there.06:31
gnarfacehmm06:32
gnarfaceinteresting problem, but at this point it might be better to just reboot it06:33
onefangMostly it was lots of people making the same complaints about the excess blank space, which is my main complaint to.06:33
onefangYep, already resigned to waiting out the few hours for that other thing to finish, then rebooting.06:33
rwponefang, I think this one line command should send a kill to all of the firefox processes: kill $(ps -ef | awk '/[f]irefox/{print$2}')07:28
rwpPreview the list of processes with: ps -ef | awk '/[f]irefox/{print$0}'07:28
rwpIf kill -9 does not kill the process then it means either 1) the parent process has not waited upon the child or 2) it is in an uninterruptible "D" state waiting for DMA I/O to complete writing into it's memory space.07:29
rwpMost likely it means the parent has not waited for the child.  Kill the parent.  Child processes are inherited by the init 1 process when their parent exits.  The init 1 process waits for all and the process is then reaped.07:30
rwpThe reason processes hang around until the parent wait(2)'s on them is so the parent can receive the exit code and status from the child.07:31
onefangps command is still just hanging until I kill it.07:35
onefangBut at least it does the honourable thing, and actually dies.07:36
rwpThe ps command is hanging?07:56
rwpIf so then can't really blame firefox for not being killed then.  Hopefully your long running task finishes.  You might have to reboot anyway.07:57
CueXXIIIsounds like a hanging (network) filesystem07:59
onefangYep, any variation of the ps command I have tried just hangs until I Ctrl-C it.08:02
CueXXIIIdoes df --all hang, too?08:03
onefangNope.  pstree and btop are not hanging either.08:04
CueXXIIIok, so no fs issue probably. you can try strace ps and see, where it hangs08:04
onefangTime to reboot.  Considering the sorts of things that are going wrong, I'm not expecting the shutdown part to go smoothly.  Likely I'll have to sit through 20 TB of spinning rust getting fscked.  Also have to deal with a kernel update.  This'll take a while.08:19
onefangSeems fine now.09:16
gnarfaceimpending block device failure seems possible, but could be indistinguishable from a driver bug09:21
gnarfacefirefox devolving into a heavy fork bomb also seems possible though09:22
CueXXIIIi'm pondering whether installing a 32bit version of firefox will limit its memory hunger09:25
onefangCould also just have been my RAM gremlin.  It tends to like firefox.09:28
Alverstoneunder runit, who runs sysv init scripts and why adding the same named service to svdir overrides that? I installed dhcpcd5 and it was being started using its /etc/init.d script, which is stupid, so I made a runit service for it and whoosh the /etc/init.d script is no longer used but my service is preferred instead10:00
AlverstoneWho's responsible?10:00
avir327Alverstone: Probably the sysv init script (line 37).11:24
Alverstoneavir327, please be more specific which script exactly? I've never used sysvinit11:31
avir327Alverstone: A quick look at the (original Debian) package shows, that the sysv init script (/etc/init.d/dhcpcd) checks for already running instances.11:36
fsmithredAlverstone, it would be even stupider if you installed a service and it didn't start. I guess you can blame the debian technical committee for not making all the devs write run scripts for the services they maintain. They're only required to support the default init system in debian.11:45
Alverstonebut who the heck invokes it at all? i looked through /etc/runit/{1,2} and only /etc/rcS.d is executed by runit. Why does dhcpcd get invoked by /etc/init.d at all? It is symlinked somewhere in sysv runit stages, but why would runit care?11:45
fsmithredI don't know where in the code that decision gets made.11:46
Alverstonedoes runit handle it internally?11:46
AlverstoneI can't find any documentation11:47
fsmithredThis looks like it might help: https://salsa.debian.org/debian/runit/-/blob/master/debian/README-flagfiles11:50
Alverstonemight be it11:55
fsmithredalso look in /usr/share/doc/runit  There are some html help pages.11:59
fsmithredIf you can't find it, ask Lorenzo. Also, he might be interested in adding your run scripts to the runit-services package.12:01
gnarfaceAlverstone: hey just fyi if you get that linux source package with "apt-get source linux-source" instead of "apt-get install linux-source" it has a debian/ directory12:07
gnarfacesorry if i gave you bad instructions, i remembered it wrong apparently12:08
Alverstonegnarface, correct, but I don't see much a point. Also, I learned that firmware still goes separately. Anyway it's easier to just build from upstream. Debian patches and etc might break something and I don't want any of that12:14
AlverstoneI have no knowledge to test it in a sane manner12:14
AlverstoneAnd I don't have a spare machine I don't mind killing for fun :D12:25
Alverstonefsmithred, my run scripts are nothing fancy actually, but just in case, how do I contact Lorenzo on this matter?12:26
fsmithredAlverstone, he'll probably reply to your forum post, but you could also file a wishlist bug report against the runit-services package. https://bugs.debian.org/cgi-bin/pkgreport.cgi?dist=unstable;package=runit-services12:47
AlverstoneCan I tag people on the forum?14:25
AlverstoneHow do I check that I'm in chroot?14:32
Alverstonesystemd has systemctl is-system-running14:32
Alverstonemaybe by checking that /var/run is not empty?14:33
fsmithredAlverstone, I usually just do ls to see where I am. If I suddenly got transported to the root of the filesystem, I'm in a chroot.14:36
AlverstoneI am hacking a script though14:36
fsmithredthere's no private message system on the forum14:36
fsmithreddo you recall running the chroot command recently?14:37
fsmithredmaybe check command history14:37
AlverstoneI am hacking a script that must determine whether it's running in chroot or not14:37
fsmithredoh14:37
fsmithredattaching som AI is probably not an option14:38
Alverstonea bit too involved :D14:39
fsmithredI would ask google. There are probably a few ways to do it, but you could be fooled if things are bind-mounted14:39
Alverstonepeople suggest using /proc/self/mountinfo14:41
Alverstonelinuxism ofc14:41
fsmithredcheck what reboot does - when I try to do that in chroot I get an error message.14:41
fsmithredsomehow it knows14:41
Alverstonecalls `init 6`14:42
Alverstonewhich in turn `chmod =100 /run/runit.reboot`14:42
Alverstonehmm14:43
Alverstonea bit runit specific14:43
Alverstonebut maybe who cares since I am going to stick to runit anyway?14:43
AlverstoneI think I will rather use /proc. Linux specific is better than init specific and it's not like I'm going to be using BSDs anytime soon. It's not like the software is even supported for BSDs that I am hacking14:47
fsmithredoh, check runlevel14:47
Alverstoneon BSDs14:47
Alverstonefsmithred, how?14:47
fsmithredhave the script run the command, runlevel and look for the answer "unknown"14:51
fsmithredthat's what I get when I do that in chroot14:52
Alverstonesays 'N 2'14:54
AlverstoneBTW I found a Debian utility `ischroot` which works on /proc/1/mountinfo + /proc/self/mountinfo14:55
AlverstoneJudging by strace it's a C oneliner14:55
AlverstoneI guess I can do that in shell :)14:55
Alverstonefsmithred, just so you know, I chroot devuan from debian14:56
Alverstoneso it's systemd to runit14:56
fsmithredwhat do you look for in /proc/self/mountinfo?14:57
fsmithredmine has info in it - I'm in a chroot and /proc is mounted along with /sys and /dev which is a common way to do chroot14:58
fsmithredyou could also check to see if you're in devuan - /etc/os-release or /etc/devuan_version15:00
Alverstonefsmithred, it might be a guess, but for the true root, the ID of the parent mount is 115:03
Alverstonedamn my chroot is on different block device15:04
Alverstoneneed to put it on the same one to check!15:04
Alverstone4.5 GB of rsyncing15:05
Alverstoneyeah15:05
Alverstonein chroot, however, the parent mount ID is not 1. If it checks out on a chroot on the same block device as true /, then I go with this method15:06
Alverstoneif not15:07
Alverstonewell, life never promised anything15:07
Alverstonesee man proc_pid_mountinfo(5)15:08
fsmithredno manual entry...15:10
fsmithredafk15:11
Alverstonefsmithred, man7.org. that's some weird stuff tbh why wouldn't it be distributed15:13
AlverstoneYep, I figured it out. If chroot is on the same block device, then there isn't / in mountinfo at all. If it's on a different block device, then it has a parent ID which is not equal to 1. Perfect. Now lets hope linux devs don't break it15:16
kaz_BTW any documentation on how to decode the `sv status`?16:28
AlverstoneBTW any documentation on how to decode the `sv status`?16:32
rwpBack in 2012 I filed this bug against ischroot and AFAIK it still has not been fixed: https://bugs.debian.org/68503418:01
rwpIt only works if /proc is also mounted.  Which I almost never have mounted in a chroot.18:02
rwpThat's just an FYI...18:02
freemAlverstone: what is it to decode in `sv status` ?18:07
freemstatus: $DAEMON (pid $DAEMON_PID) $(ps -oetimes $DAEMON_PID);18:08
freemand same for logger if any18:09
freemerr... s/status/$STATUS/ ofc18:09
freemwhich can be various stuff, such as run, down, etc18:09
freemone important detail to keep in mind though is that the PID and elapsed time are for runsv's child, which is the ./run being executed. It is not necessarily the actual process image of the daemon per se18:11
Alverstonerwp, correct, I rely on /proc. If there is no proc, there can be no doubt it is a chroot.19:36
Alverstonefreem, I want to exactly understand every field and I can't exactly find a man explaining it19:36
freemwhich field do you not undestand?19:37
Alverstonehonestly?19:37
AlverstoneI don't understand anything beyond run:19:37
freemyes. Only stupid questions are those which are not asked.19:37
Alverstoneonly vaguely19:37
freemso, "run:" is actually "${STATUS}:", it could have other values than run19:37
freemin this command: % sv status mpd19:38
freemrun: mpd: (pid 4508) 19645s; run: log: (pid 4506) 19645s19:38
freemI have my userland "mpd" daemon (the name of the directory which contains the `run` file) in state "run" since 19645 seconds19:38
freemthe part after the ";" are same information, but for the logger if you have setup one19:39
freemI have a generic logger I just reuse all the time19:39
freemoh19:39
freemand PID is the PID of the process that runsv is watching19:39
AlverstoneI just reuse svlogd everywhere, why not?19:39
freemthat is what I do as well :)19:40
freemthis is the file I symlink for all system daemons for example: % cat /etc/runit/log.run | upl19:40
freemhttps://p.mort.coffee/4Xc19:40
AlverstoneI just noticed dhcpcd writes to syslog so svlogd is redundant, but on the other hand grepping is easier with svlogd19:41
freemI have a slightly different one for my user stuff, since runsvdir even handles i3 here. I did that as a fun experiment, but really I should use another tiling WM for that19:41
freemit depends19:41
freemI always configure my daemons to avoid them writting to a possibly down syslog daemon19:41
freemquite often it requires passing a --debug flag or something, but that is also required to avoid them to double fork anyway19:42
Alverstonedhcpcd hasn't got configurations for syslog19:42
Alverstonedoesn't matter, because I don't care19:42
freemdunno. I wrote my own stuff using busybox's udhcpcd19:42
AlverstoneI don't wanna write my stuff. Wanna it to just work19:42
freemI use neither ifupdown nor network-manager here19:43
freemwell, I can help you if you want to understand the output of sv, at least19:43
AlverstoneI've been using dhcpcd5 for years I'm reluctant to change it, because it's very flexible and does its thing alright19:43
freemI don't know for every daemon existing if they handle things nicely or not though19:43
freemI understand19:43
freemand you can just have a syslogd running somewhere anyway19:44
freemsometimes there's no choice :)19:44
freem(i.e. PAM debugging)19:44
Alverstoneif there's no syslog then dhcpcd simply doesn't write to it. It doesn't fail19:44
freemtrue19:44
Alverstone:)19:44
freemsome do that as well :p19:44
AlverstoneSome software does its own logging at all19:44
Alverstoneindependent of the system19:45
freemanyway, if you have a question for runit, feel free to ping me, I'll try to help. I don't say I will always be able to, mind you19:45
Alverstonenot very smart imo, but can't fix others19:45
freemyes, I have had problems with such as well19:45
Alverstoneno, if I ping you, you'll have to answer ;D19:45
freemi'll try, for sure :)19:45
freemI really like runit, and think it's a shame it's not more used19:45
freemit's not perfect, but every tool have it's pros and cons19:46
AlverstoneWell I haven't got experience with runit so far but my brief acquaintance with it is a pleasant one19:46
freemI have been happy with it since many years now19:46
Alverstonesystemd is a breeze actually so long as you don't try to write a service more complex that one-shot19:47
freemeven if that means I had to write all my scripts, but... well.. most are one-liners, really19:47
Alverstonescripts are not hard to write in most cases19:47
Alverstoneand I often boiled down my systemd services to scripts anyway19:48
Alverstonebecause it's easier to write a script than to understand how to use another-os-as-pid-1-daemon19:48
freemsystemd have few nice features though: allowing daemons to report when they are ready, for example. Integration of cron in the daemon manager is not stupid neither, and dependency handling can *sometimes* be very useful19:48
Alverstonea few good features is no excuse for bullying me19:49
Alverstone:D19:49
freemI think most of that could be easier to handle with a daemontools' child, but... well, someone have to try and fail a few times before doing it :)19:49
Alverstoneanyway, I'm waiting till somebody takes something like runit, adds some cool features enterprise wants, and releases it, so we can both have a good init and no systemd19:50
freemI actually used runit in enterprise in the past19:50
Alverstoneapparently they want some features that are only present in systemd19:50
Alverstonehaven't found a use case on desktop though19:50
freemofc, it was because I revamped the whole "embedded" system... so that we could get many nice features *and* trivial to understand systems19:50
freemwe're probably talking about that in #devuan-offtopic though?19:51
freemI'd be curious to know about those features you're talking about, I'm tinkering with runit's codebase for my own fun, since few days (making it into modern C11+POSIX-2008 for example)19:52
dvbstgnarface: you told me to change the stuff in /etc/rc*, so i did, and it doesnt work either way, it still teleports me to tty7 and disables me from doing anything at all on the system19:52
freemso maybe I could see if that requires stuff inside runit's code itself, or just some tooling on top (the most likely)19:52
Alverstonefreem, I'll answer in offtop19:53
freemthanks19:53
fsmithreddvbst, did you do 'update-rc.d -f lightdm remove'?20:26
dvbstno, i just moved the files to a different place and removed the symlinks20:27
fsmithredor better disable instead of remove20:27
fsmithredand lightdm is still running?20:27
fsmithredyou moved which files?20:29
dvbstidk if its running, i suspected it to be running because thats the thing that is on tty7 right after booting, i cannot verify that because i cant do anything20:30
fsmithredyou see a graphical login screen?20:30
dvbstand i moved the /etc/rc*.d/*S*lightdm* files20:30
dvbsti do not, because i do not have the nvidia drivers installed20:31
dvbsti cant install them on the normal system, because it keeps switching me to tty7 and i cant do anything, and the drivers refuse to install in a chroot20:31
fsmithredand you can't get to a console.20:31
dvbsti would sudo apt purge lightdm and then sudo apt install lightdm but i know this will fuck up my system and i wont be able to reinstall20:32
dvbstyes i cant20:32
fsmithredI was going to suggest 'chmod -x /etc/init.d/lightdm' but I now think that won't help since you removed the links.20:32
dvbsti can add them back in20:33
fsmithredthey won't help. I don't think lightdm is the problem, but I don't understand that low-level stuff enough to say whether you have no conole or just can't see it.20:34
fsmithredOh, there's an idea. Assume you have a console login screen that you can't see and log in and type a command.20:35
fsmithredsomething that will respond with sound or reboot.20:35
dvbstno20:36
fsmithredyou tried booting with 'nomodeset' in the boot command?20:37
dvbstno i havent, i can try that20:37
fsmithredthat might give you a console20:37
dvbstoh yea, i think i might be able to install the drivers with booting in single user mode or something like that20:37
fsmithredif you really disabled lightdm, you should end up in multi-user non-graphical20:39
dvbstwow, i wish i remembered about this single user mode sooner, ive been putting fixing my computer off for like few weeks20:47
dvbstit did the job20:47
fsmithredcool20:49
dvbstight guys, thanks for trying to help me and sorry to waste your time once again20:50
fsmithredmaybe you learned some tricks you can use later20:51
dvbstyes20:52
Alverstonesysvinit boot scripts are pretty damn complex. Say I want a boot script to success very badly, how do I go into emergency shell upon failure?21:33
AlverstoneOr boot isn't something that can fail/21:39
AlverstoneOr boot isn't something that can fail?21:39
AlverstoneI just don't understand it, /etc/runit/1 doesn't handle handle errors in any way. the /etc/rcS.d doesn't have a single script that makes use of a emergency shell21:39
Alverstonewhich all together means21:39
AlverstoneI should Do It Myself?21:40
rwpsysvinit moves through runlevels.  It boots first to single user mode and continues *through* single user mode to multi user mode.21:43
rwpIf something fails trying to get to single user mode it usually drops to the boot loader prompt.21:43
rwpAfter getting through single user mode if something fails in the multi user mode then it is already past single user and will drop into multi user mode.21:43
rwpThe goal is to get the system online as much as possible at any given time.  It will be up to the system operator to perform any rescue or maintenance if there is a failure along the way.21:43
rwpThe systemd approach is completely different.  I can't tell you how many times I have gotten onto the console of various systemd controlled systems and found systemd halted.  Because systemd handles failure as a condition to halt.  Making it damn hard to fix when you can't log into the system to fix it.  Most of the time it needs a boot to rescue media.21:45
rwpThe sysvinit approach to try to keep going and get to the login: prompt so that the operator can log in and fix things if needed is a much better approach.21:45
rwpI haven't grok'd runit enough to know how runit handles errors during the boot phase.  But I am hoping it is more like sysvinit in trying to keep going to a login: prompt.21:46
Alverstoneas far as I can see errors are a joke, they're completely ignored, probably expecting all scripts that follow to handle any possible failures gracefully21:47
Alverstoneis it safe to set FANCYTTY to yes?21:51
Alverstonefor some reason it's disabled by default21:51
Alverstone /lib/lsb/init-functions21:52
Alverstoneor is there a configuration file?21:52
Alverstoneput it in /lib/lsb/init-functions.d, hope I'm not implementing a wheel21:54
rwpFANCYTTY is yes by default.  So, certainly it is okay to set it to yes.  (I happen to always set it to no because, yes is the default.)22:01
Alverstonemy /lib/lsb/init-functions sets it to empty...22:02
Alverstoneprobably because I use runit?22:02
Alverstonewhere is your FANCYTTY set to yes by default?22:02
rwpProbably at this moment in time you are the #2 world wide leading expert on using runit with Debian/Devuan.22:03
Alverstonewho's the #1?22:04
rwpFile /etc/lsb-base-logging.sh: line 216: [ -z $FANCYTTY ] && return 0 || true22:04
rwpLorenzo22:04
rwpThat line 216 is actually buggy, but works by accident.22:04
rwpIf FANCYTTY is not set then what the shell sees is [ -z ] which has 1 argument "-z" and that being a non-zero sized string is true.  It's true so that's the same as if -z "$FANCYTTY" were empty.22:05
rwpWorks by accident.  I reported that at some point but since it is accidentally functioning nothing ever got fixed.22:06
rwpAnd it's somewhat a clue that the author was having trouble with the syntax of that line because they appended || true there.  Which also says the script is probably running with set -e active.  Which is also a bad idea.  See the bash FAQ for rationale.22:08
rwphttp://mywiki.wooledge.org/BashFAQ/10522:09
Alverstoneisn't is sh22:11
Alverstoneisn't it sh though22:11
Alverstoneanyway22:11
Alverstone /lib/lsb/init-functions doesn't set -e22:11
Alverstonebut the sourcing script might22:11
Alverstonedoesn't matter since runit stage 1 ignores exit statuses completey22:12
Alverstonedoesn't matter since runit stage 1 ignores exit statuses completely22:12
Alverstonenot saying it's bad, just the way i expected22:12
Alverstonejust not the way i expected22:12
rwpIf the sh is running with set -e then the control flow of the shell is changed in subtle and buggy ways.  It's bad.22:17
rwpAnd it doesn't matter that the caller ignores exit codes.  The problem is that the sh -e will behave incorrectly sometimes and then it's incorrect.  That's nothing to do with the caller.22:18
Alverstonedoesn't it just exit upon a failure? i agree that ppl putting it everywhere are probably overcomplicating things. which bugs exactly do you mean22:19
Alverstonei saw scripts where people would use set -e and then append || true to almost every like22:20
Alverstoneline*22:20
rwpThat's a classic anti-pattern.  Set -e and then use ||true everywhere to defeat it!22:22
Alverstonewell i do use that flag sometimes, when proceeding after failure is dangerous22:24

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!