Date: Mon, 13 Oct 2025 11:57:54 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Sulev-Madis Silber <freebsd-current-freebsd-org111@ketas.si.pri.ee> Cc: freebsd-current@freebsd.org Subject: Re: openat("./...", O_CREAT) fails even though the directory exists Message-ID: <CAJ-VmokFAkPunKD=X5x4YVAcJRzQYL9TJ0zzTX4nWKKB2HcXiQ@mail.gmail.com> In-Reply-To: <51721B50-CDEB-4B93-9CA6-1B2141180869@ketas.si.pri.ee> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000f5441a06410ed89f Content-Type: text/plain; charset="UTF-8" On Mon, 13 Oct 2025 at 11:22, Sulev-Madis Silber < freebsd-current-freebsd-org111@ketas.si.pri.ee> wrote: > > > On October 13, 2025 9:06:02 PM GMT+03:00, Adrian Chadd <adrian@freebsd.org> > wrote: > >... > > > >On Mon, 13 Oct 2025 at 03:23, Lexi Winter <ivy@freebsd.org> wrote: > > > >> Olivier Certner wrote in <6142242.Zv9zXsTiuT@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. > >> > > >> > Most probably it will need too, yes. > >> > >> proposed fix at https://reviews.freebsd.org/D53061. i really don't > like > >> this (nothing else restarts services on upgrade) but this is probably > the > >> least disruptive solution for users. > >> > > > >I'm curious - why are we NOT restarting services after an upgraded > package? > > > > > >-a > > i hope this wasn't proposal of blanket restarts everywhere. this could get > bad quickly. i recall friends cursing linux distros going one step further, > 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. all around restarting is bad. at > least optout would be needed > > what if it needs config change or other kind of adjustments before admin > decides to restart it. 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. Otherwise: * your currently executing binary can be referencing libraries, files, etc which themselves are deleted but won't be freed until you kill the process; * the binary itself may be deleted, but it won't be freed until the process 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. 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. 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 may have changed and it may behave unpredictably until it reboots. -adrian --000000000000f5441a06410ed89f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, 13 Oct = 2025 at 11:22, Sulev-Madis Silber <<a href=3D"mailto:freebsd-current-fre= ebsd-org111@ketas.si.pri.ee">freebsd-current-freebsd-org111@ketas.si.pri.ee= </a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">= <br> <br> On October 13, 2025 9:06:02 PM GMT+03:00, Adrian Chadd <<a href=3D"mailt= o:adrian@freebsd.org" target=3D"_blank">adrian@freebsd.org</a>> wrote:<b= r> >...<br> ><br> >On Mon, 13 Oct 2025 at 03:23, Lexi Winter <<a href=3D"mailto:ivy@fre= ebsd.org" target=3D"_blank">ivy@freebsd.org</a>> wrote:<br> ><br> >> Olivier Certner wrote in <6142242.Zv9zXsTiuT@ravel>:<br> >> > > i suspect the fix will be in pkgbase somewhere: for exam= ple, we<br> >> > > could restart sendmail on upgrade, or tell the user to d= o that.<br> >> ><br> >> > Most probably it will need too, yes.<br> >><br> >> proposed fix at <a href=3D"https://reviews.freebsd.org/D53061" rel= =3D"noreferrer" target=3D"_blank">https://reviews.freebsd.org/D53061</a>.= =C2=A0 i really don't like<br> >> this (nothing else restarts services on upgrade) but this is proba= bly the<br> >> least disruptive solution for users.<br> >><br> ><br> >I'm curious - why are we NOT restarting services after an upgraded = package?<br> ><br> ><br> >-a<br> <br> i hope this wasn't proposal of blanket restarts everywhere. this could = get bad quickly. i recall friends cursing linux distros going one step furt= her, starting everything that's installed with default config<br> <br> many things would happily run after update, nginx even has special no inter= rupt upgrade which replaces binary<br> <br> for sshd it would maybe ok but who knows. all around restarting is bad. at = least optout would be needed<br> <br> what if it needs config change or other kind of adjustments before admin de= cides to restart it. or wants to choose time<br> <br></blockquote><div><br></div><div>The only reason I'd like services = not to be restarted is in case it's a last ditch attempt to recover a b= roken system.<br></div><div>Otherwise:<br><br>* your currently executing bi= nary can be referencing libraries, files, etc which themselves are deleted = but won't be freed until you kill the process;</div><div>* the binary i= tself may be deleted, but it won't be freed until the process is killed= ;</div><div>* the binary may be pointing to old paths / binaries / etc (thi= nk web servers, mail servers, etc) which no longer exist until you kill/res= tart the process (as ivy saw);</div><div><br></div><div>So yes, i'd lik= e services to be restarted when the package itself is reinstalled. This get= s hilarious when you start thinking about the underlying libraries being up= graded and old ones being deleted, but like, in theory package management s= hould handle that for me too as it should know all of those dependencies.</= div><div><br></div><div>If the package system doesn't do that then I= 9;m going to need to reboot my system after a non-trivial package upgrade a= nyway, as a bunch of stuff may have changed and it may behave unpredictably= until it reboots.</div><div><br></div><div><br></div><div><br></div><div>-= adrian</div><div><br></div></div></div> --000000000000f5441a06410ed89f--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokFAkPunKD=X5x4YVAcJRzQYL9TJ0zzTX4nWKKB2HcXiQ>