Date: Wed, 24 May 2023 09:25:24 -0500 From: Kyle Evans <kevans@freebsd.org> To: Hans Petter Selasky <hps@selasky.org> Cc: Emmanuel Vadot <manu@bidouilliste.com>, Kyle Evans <kevans@freebsd.org>, John Baldwin <jhb@freebsd.org>, Mark Johnston <markj@freebsd.org>, Warner Losh <imp@bsdimp.com>, Konstantin Belousov <kostikbel@gmail.com>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>, Jessica Clarke <jrtc27@freebsd.org> Subject: Re: [RFC] An idea for general kernel post-processing automation in FreeBSD Message-ID: <CACNAnaH555ZreAB962nvSkhpgtBO9RVnCPSnPEk_tRLr-cWgCg@mail.gmail.com> In-Reply-To: <39e6793a-33f9-8f48-30d3-eaa30d321452@selasky.org> References: <b0461320-fb92-95cf-609b-3550eb30a589@selasky.org> <CANCZdfowk1oQnw30hk%2BA-pSq0_QK52dahF6x3AUi=A76J18R9w@mail.gmail.com> <ZGq03_RdpqXppA-h@kib.kiev.ua> <394775eb-1000-60d9-2ddd-5c2aca6c99ea@selasky.org> <CANCZdfq4D3N12c6h_Hy7Mvyg_d%2BpZBnN39CvpDU14-qDEhMFXQ@mail.gmail.com> <b6300144-41bb-53c9-b103-117547ff8a27@selasky.org> <08ba506f-66c5-35eb-e992-ecf9dfeccf93@selasky.org> <ZGy_3w4nUmTNxTm9@nuc> <eac6b35d-0d00-45d3-5925-7fcaccedac7e@FreeBSD.org> <CACNAnaHvz-BFRW193ZEr1wx%2BO7G_%2B1B68yHQ-TpYbX6=ferA1Q@mail.gmail.com> <20230524082850.ffc8793b6bb1b47325ae0139@bidouilliste.com> <39e6793a-33f9-8f48-30d3-eaa30d321452@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 24, 2023 at 4:47=E2=80=AFAM Hans Petter Selasky <hps@selasky.or= g> wrote: > > >> IMO sorting at runtime is a minor feature by itself, too. I mentioned > >> in one of the reviews somewhere, we have in the past have had bugs due > >> to poor specification of sysinit order within a subsystem -- I'm > >> recalling a specific one that wasn't even that long ago, maybe three > >> or four years, that manu@ had hit because he did or didn't include > >> some device in his config that ended up shifting link order of other > >> objects and reversing two sysinits into an order that wasn't actually > >> functional. > > Yes this problem was a pain to debug (I mean just to understand the > > actual problem), and iirc it was never solved, I only had the issue on > > one machine that I don't use anymore and the problem went away and > > re-apears from time to time when sysinits where added. > > > >> We can still add some bits to test that (preferably a > >> tunable to reverse order within a subsystem rather than having to > >> re-link the kernel) even with sorting at link-time, but it sure does > >> look a lot less fragile if we have to sort it anyways and we just > >> reverse one criteria. > > I think if you could just diff two plaintext files, listing all the > constructors in the correct order, that would be of great help when > problems arise in this area. You cannot always rely on having a console > during bringup. > Maybe? That's making a lot of assumptions about the failure mode of a black box, and sysinit ordering is probably the last thing I'd expect for 95+% of fail-to-boot scenarios. My point was really just that it does come up sometimes, and it'd be really useful to be able to quickly and easily test a different ordering in CI (+ reproduce the different ordering outside of CI). > > At the mention of manu@, I remember how difficult it was to bringup the > graphics driver code and kernel modules which are common among FreeBSD > desktop users. What do you do, if all you have is a black screen, and > you need to debug something? > I'm sorry, but staring at a list of 1000+ ordered sysinits isn't going to help you any more than staring at a list of 1000+ unordered sysinits in debugging anything when you don't have a console and thus, very little direction to start debugging in. Thanks, Kyle Evans
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaH555ZreAB962nvSkhpgtBO9RVnCPSnPEk_tRLr-cWgCg>