Date: Tue, 14 Oct 2025 06:24:44 +0300 From: Sulev-Madis Silber <freebsd-current-freebsd-org111@ketas.si.pri.ee> To: freebsd-current@freebsd.org Subject: Re: openat("./...", O_CREAT) fails even though the directory exists Message-ID: <0CA02375-9E2C-4507-8DD2-819FC66413BA@ketas.si.pri.ee> In-Reply-To: <CAJ-VmokFAkPunKD=X5x4YVAcJRzQYL9TJ0zzTX4nWKKB2HcXiQ@mail.gmail.com> References: <aOy5LUUu5DCwY_XZ@amaryllis.le-fay.org> <2507674.THHZn3L5Ee@ravel> <aOzF-JAOyg-T-Ule@amaryllis.le-fay.org> <6142242.Zv9zXsTiuT@ravel> <aOzTBEsi_KKFDiwa@amaryllis.le-fay.org> <CAJ-Vmo=x7w-Us8fwG6O6k5qJ_QV0bCJgxF4mAMFFQd2Y4c7yeQ@mail.gmail.com> <51721B50-CDEB-4B93-9CA6-1B2141180869@ketas.si.pri.ee> <CAJ-VmokFAkPunKD=X5x4YVAcJRzQYL9TJ0zzTX4nWKKB2HcXiQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On October 13, 2025 9:57:54 PM GMT+03:00, Adrian Chadd <adrian@freebsd=2Eo= rg> wrote: >On Mon, 13 Oct 2025 at 11:22, Sulev-Madis Silber < >freebsd-current-freebsd-org111@ketas=2Esi=2Epri=2Eee> wrote: > >> >> >> On October 13, 2025 9:06:02 PM GMT+03:00, Adrian Chadd <adrian@freebsd= =2Eorg> >> wrote: >> >=2E=2E=2E >> > >> >On Mon, 13 Oct 2025 at 03:23, Lexi Winter <ivy@freebsd=2Eorg> wrote: >> > >> >> Olivier Certner wrote in <6142242=2EZv9zXsTiuT@ravel>: >> >> > > i suspect the fix will be in pkgbase somewhere: for example, we >> >> > > could restart sendmail on upgrade, or tell the user to do that= =2E >> >> > >> >> > Most probably it will need too, yes=2E >> >> >> >> proposed fix at https://reviews=2Efreebsd=2Eorg/D53061=2E i really = don't >> like >> >> this (nothing else restarts services on upgrade) but this is probabl= y >> the >> >> least disruptive solution for users=2E >> >> >> > >> >I'm curious - why are we NOT restarting services after an upgraded >> package? >> > >> > >> >-a >> >> i hope this wasn't proposal of blanket restarts everywhere=2E this coul= d get >> bad quickly=2E i recall friends cursing linux distros going one step fu= rther, >> starting everything that's installed with default config >> >> many things would happily run after update, nginx even has special no >> interrupt upgrade which replaces binary >> >> for sshd it would maybe ok but who knows=2E all around restarting is ba= d=2E at >> least optout would be needed >> >> what if it needs config change or other kind of adjustments before admi= n >> decides to restart it=2E or wants to choose time >> >> >The only reason I'd like services not to be restarted is in case it's a >last ditch attempt to recover a broken system=2E >Otherwise: > >* your currently executing binary can be referencing libraries, files, et= c >which themselves are deleted but won't be freed until you kill the proces= s; >* the binary itself may be deleted, but it won't be freed until the proce= ss >is killed; >* the binary may be pointing to old paths / binaries / etc (think web >servers, mail servers, etc) which no longer exist until you kill/restart >the process (as ivy saw); > >So yes, i'd like services to be restarted when the package itself is >reinstalled=2E This gets hilarious when you start thinking about the >underlying libraries being upgraded and old ones being deleted, but like, >in theory package management should handle that for me too as it should >know all of those dependencies=2E > >If the package system doesn't do that then I'm going to need to reboot my >system after a non-trivial package upgrade anyway, as a bunch of stuff ma= y >have changed and it may behave unpredictably until it reboots=2E > > > >-adrian yes reboots are useful as a test too=2E and all up there are reasonable but now you need to make sure that machine is not doing any work=2E i gues= s one would say that machine should never be doing any useful work when you= start touching it but this changes going live immediately would turn some of those practices= upside down where you upgrade and hope to later restart it in one go and how to even restart? do you restart on every library being upgraded, a= nd finally for the binary itself? i realize that leaving thing hanging there without binaries found or pulli= ng a lib out underneath would cause bad things to happen in some cases but = isn't that like being often done? one other option would be to create complete new system and boot into it= =2E that would need data decoupling and so on and when do you restart? some things might need stop first before you dele= te the files off, then start=2E in the middle there's nothing running=2E ho= pefully nothing accesses system then=2E eg you have made it externally impo= ssible but at least some situations i see much more interruptions this messes up some admin brains for sure also what order the things should get upgraded and restarted at? what if p= ackage dep order is the wrong one? also if you can't get the machine isolated, and you did just stop daemons,= do they come back up out of sequence as you upgrade? yeah restarting things as upgrade goes would make entire life completely d= ifferent maybe it helps on good sysadmin practices but you bet it raises ton of peo= ple cursing like what you mean it got restarted, i thought i just upgraded = it, i meant to commit later or even maybe turn my actions back if ports starts doing that, it needs warnings=2E many warnings also what about those setups where install environment isn't really the ru= n environment? like one jail installs, other runs it from ro fs=2E i bet th= ose are special enough that admin is aware of it btw, if this change would go into effect, where do people learn that? ther= e are number of cases of major release doing changes or about to do changes= that are being only told in release notes casually=2E like, btw, 32bit is = deprecated, or btw, different shell, or btw, home dir location changes=2E a= nd person could be like wow wow wow wait www=2E=2E=2E wh wha what? now hold= on why i never knew i recall https://forums=2Efreebsd=2Eorg/threads/ars-technica-article-focus= ed-on-wireguard-regarding-freebsd=2E79537/ but i also recall other things=2E let's not make service autorestarting on= e of them i once had like honest question that nobody answered, why is breaking code= being introduced between alphas and betas and rc's? or between their versi= ons? isn't it like, alpha is where things don't work, beta is where things = work, rc when it's perfect and release when it's done? instead of that, mid= -alpha is where new nic driver appears, beta is where new zfs comes, etc=2E= i didn't pull out exact things but you get the idea=2E oh after the releas= e we found out that we need to patch it=2E the code that needed patching is= only in that new release good thing is that we still have those 1-2 older releases one can hang out= in and watch this freshly out of factory train running on either other peo= ple's systems or in their test env but that restarting, would it come from pkg or via certain release? before freebsd was like where's the gas lever, we need to add some pace=2E= now it's like where's the brake handle, need to slow down? i recall being very pissed about xo back then=2E that got others pissed idea was good, i like json now i was pointed at bugs in vmstat loop run=2E generates broken json=2E n= ormal run generates padded entries=2E then i found more bugs in w=2E padded= entry=2E if you set locale to one where decimal separator is comma, it dir= ectly goes out as invalid json=2E i gave up on workload and was thinking of= asking juniper itself if they could allocate some time to this=2E i don't = seem to have brain wired for reading xo functions=2E i reported 2 of those = bugs, 1 is still out=2E and i lost energy to find more=2E yet i want it all= to be nice warm and fuzzy i don't know if it's inevitable that those things happen but i don't like = bugs but i admit that lost sshd in upgrade could be bug too, if it won't come u= p, what then? pray and go back? in one place i had static dropbear as secon= d means to access=2E didn't have oob mgmt there=2E not all things have=2E s= o yeah, i don't know what good way is=2E for ssh for other things servers can be sysadminned in various ways depends on need=2E but i bet if= all services start restarting, there would be lot of (bad) surprises=2E an= d this would be another change nobody notices where/who/what was it, iirc here or somewhere near it went like, change was presented in a file in bottom of a locked file ca= binet in a back room of office with sign beware of a dog recently i found very bad bug in cu and maybe in sc(/getty?) that mysterio= usly corrupts data and sends out to in and in sc, to other console as input= =2E and was asked if i knew that cu is old and buggy thing and no normal pe= rson uses it=2E yet every example has it in=2E manpage has example of usb s= erials=2E looked recent enough to me! i mean how would one learn stuff if (s)he's not in "inner circle"=2E thing= s just happen and without his/her control=2E that part i don't really like in my entire path to this day from 4=2E6 i don't know how many things i ar= e supposed or not supposed to be using but so far it worked=2E like ntpdate= is deprecated but why is it still in? what's replacement, ntpd -g? but tha= t was bg? often changes could be found in last minute at worst possible time where y= ou can't get the system back up because you missed one line in some notes could probably split it all up into smaller bits and put into better speci= fic fbsd design lists like arch@ but those are things i see also, me, or perhaps many, don't see the behind scene talks, they just see= the end eg with that boot loader issue=2E got people mad=2E i went and looked why = that change was made=2E turned out there was entire long thread where thing= s went out things went in=2E not all did fit=2E unfortunately end result pi= ssed into coffee cup of that particular admin and he took a big sip without= looking i bet that change where bridge members aren't supposed to have ip's is goi= ng to bit many too for years to end=2E i can get the logic, but not fully= =2E i mean this is all happening inside same kernel anyway, so why? i think= i had issues with it in past and did realize this was a bad config but=2E= =2E=2E yes, those are changes that make people mad i had people asking wtf is going on in fbsd=2E i just shrug and say i gues= s somebody had an idea, that got traction and was implemented eg, pkgbase=2E very good idea=2E supposedly old idea too=2E but nobody tri= ed much=2E there wasn't even a tiny nudge=2E all of sudden there was a big = push and lot more bugs popped out=2E i bet pkgbase bugs continue well into = 15 and maybe even 16 or more=2E that's a huge breaking change that needs pr= oduction release testing=2E because people apparently aren't using it befor= e that much=2E you know, that thing, let's wait until it gets ready, but it= can be ready until you use it for real=2E i do already=2E found bugs, repo= rted=2E good so yeah, changes can be difficult!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0CA02375-9E2C-4507-8DD2-819FC66413BA>