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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 13 Oct 2025 at 11:22, Sulev-Madis Silber <<a href="mailto:freebsd-current-freebsd-org111@ketas.si.pri.ee">freebsd-current-freebsd-org111@ketas.si.pri.ee</a>> wrote:<br></div><blockquote class="gmail_quote" style="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="mailto:adrian@freebsd.org" target="_blank">adrian@freebsd.org</a>> wrote:<br> >...<br> ><br> >On Mon, 13 Oct 2025 at 03:23, Lexi Winter <<a href="mailto:ivy@freebsd.org" target="_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 example, we<br> >> > > could restart sendmail on upgrade, or tell the user to do that.<br> >> ><br> >> > Most probably it will need too, yes.<br> >><br> >> proposed fix at <a href="https://reviews.freebsd.org/D53061" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D53061</a>. i really don't like<br> >> this (nothing else restarts services on upgrade) but this is probably 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 further, starting everything that's installed with default config<br> <br> many things would happily run after update, nginx even has special no interrupt 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 decides 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 broken system.<br></div><div>Otherwise:<br><br>* your currently executing binary can be referencing libraries, files, etc which themselves are deleted but won't be freed until you kill the process;</div><div>* the binary itself 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 (think web servers, mail servers, etc) which no longer exist until you kill/restart the process (as ivy saw);</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div><br></div><div>-adrian</div><div><br></div></div></div>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokFAkPunKD=X5x4YVAcJRzQYL9TJ0zzTX4nWKKB2HcXiQ>
