Date: Mon, 29 Dec 2025 23:17:14 -0500 From: Ka Ho Ng <khng300@gmail.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Kristof Provost <kp@freebsd.org>, Ka Ho Ng <khng@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 112c453ba910 - stable/15 - geom(9): struct bio KBI fix Message-ID: <CANnchUb5LXUhn8xV1RQtnoJ6f-YyyLn3NG_cOkOwYZMAsR_cYg@mail.gmail.com> In-Reply-To: <CANnchUYrd-Q=dY4mVBER=gBvYixjuPEyJ1MCEc0P_3jWCnbH=g@mail.gmail.com> References: <69489316.252e6.179063dd@gitrepo.freebsd.org> <A07F2B80-9538-4001-ABE6-B1CA9B8414D5@FreeBSD.org> <aVNMO8nXoSNmnwJg@kib.kiev.ua> <CANnchUYrd-Q=dY4mVBER=gBvYixjuPEyJ1MCEc0P_3jWCnbH=g@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Mon, Dec 29, 2025 at 11:08 PM Ka Ho Ng <khng300@gmail.com> wrote: > On Mon, Dec 29, 2025 at 10:51 PM Konstantin Belousov <kostikbel@gmail.com> > wrote: > >> On Mon, Dec 29, 2025 at 10:22:50AM +0100, Kristof Provost wrote: >> > On 22 Dec 2025, at 1:38, Ka Ho Ng wrote: >> > > The branch stable/15 has been updated by khng: >> > > >> > > URL: >> https://cgit.FreeBSD.org/src/commit/?id=112c453ba91012f19ed140c56a3ac8fc929ddabb >> > > >> > > commit 112c453ba91012f19ed140c56a3ac8fc929ddabb >> > > Author: Ka Ho Ng <khng@FreeBSD.org> >> > > AuthorDate: 2025-12-21 22:45:03 +0000 >> > > Commit: Ka Ho Ng <khng@FreeBSD.org> >> > > CommitDate: 2025-12-22 00:37:40 +0000 >> > > >> > > geom(9): struct bio KBI fix >> > > >> > > The struct bio was changed after cb85c2e2e995 on the branch. To >> fix >> > > this, move BIO_ERROR flag to another value, and now >> BIO_ERROR_COMPAT >> > > occupies 0x1 instead. Also, introduce b_error_compat field at the >> > > place >> > > where the old bio_error was. >> > > >> > > This allows non-CAM(9) disk drivers and software volume manager >> > > modules >> > > compiled against 15.0-RELEASE kernel to work on 15-STABLE kernel >> > > again. >> > > >> > > Reviewed by: kib >> > > Differential Revision: https://reviews.freebsd.org/D54327 >> > > >> > > Approved by: re (cperciva) >> > >> > I’m seeing panics on boot now: >> > >> > vtnet0: Ethernet address: 58:9c:fc:0c:60:85 >> > vtnet0: netmap queues/slots: TX 1/1024, RX 1panic: Memory >> modified after >> > free 0xfffff800038b51a8 (424, g_bio) + 0 = deadc0dedeacc0de >> > >> > cpuid = 6 >> > time = 1 >> > KDB: stack backtrace: >> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >> > 0xfffffe008d5679a0 >> > vpanic() at vpanic+0x136/frame 0xfffffe008d567ad0 >> > panic() at panic+0x43/frame 0xfffffe008d567b30 >> > trash_ctor() at trash_ctor+0x74/frame 0xfffffe008d567b40 >> > item_ctor() at item_ctor+0x59/frame 0xfffffe008d567b90 >> > g_clone_bio() at g_clone_bio+0x1d/frame 0xfffffe008d567bb0 >> > g_part_start() at g_part_start+0x96/frame 0xfffffe008d567c40 >> > g_io_request() at g_io_request+0x2ca/frame 0xfffffe008d567c70 >> > g_read_data() at g_read_data+0x95/frame 0xfffffe008d567cb0 >> > g_raid_md_taste_intel() at g_raid_md_taste_intel+0x1d8/frame >> > 0xfffffe008d567e50 >> > g_raid_taste() at g_raid_taste+0x18e/frame 0xfffffe008d567ea0 >> > g_new_provider_event() at g_new_provider_event+0xaa/frame >> > 0xfffffe008d567ec0 >> > g_run_events() at g_run_events+0x104/frame 0xfffffe008d567ef0 >> > fork_exit() at fork_exit+0x82/frame 0xfffffe008d567f30 >> > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008d567f30 >> > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- >> > KDB: enter: panic >> > [ thread pid 13 tid 100069 ] >> > Stopped at kdb_enter+0x33: movq $0,0x121aa92(%rip) >> > db> >> > >> > With this commit (and the follow-up “geom(9): unset the BIO_ERROR_COMPAT >> > flag correctly”) reverted the VM boots again. >> >> Does the following help? >> >> diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c >> index dc90bd3add22..2368f863a248 100644 >> --- a/sys/kern/vfs_bio.c >> +++ b/sys/kern/vfs_bio.c >> @@ -4523,8 +4523,6 @@ biodone(struct bio *bp) >> bp->bio_flags |= BIO_ERROR_COMPAT; >> } >> done(bp); >> - bp->bio_error_compat = 0; >> - bp->bio_flags &= ~BIO_ERROR_COMPAT; >> } >> } >> >> >> Yep that fixes the issue. I committed this as 9cfd75a6f88f. > > Ka Ho > + the missing recipients and the mailing lists. Ka Ho [-- Attachment #2 --] <div dir="ltr"><div dir="ltr">On Mon, Dec 29, 2025 at 11:08 PM Ka Ho Ng <<a href="mailto:khng300@gmail.com">khng300@gmail.com</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Mon, Dec 29, 2025 at 10:51 PM Konstantin Belousov <<a href="mailto:kostikbel@gmail.com" target="_blank">kostikbel@gmail.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Dec 29, 2025 at 10:22:50AM +0100, Kristof Provost wrote:<br> > On 22 Dec 2025, at 1:38, Ka Ho Ng wrote:<br> > > The branch stable/15 has been updated by khng:<br> > > <br> > > URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=112c453ba91012f19ed140c56a3ac8fc929ddabb" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=112c453ba91012f19ed140c56a3ac8fc929ddabb</a><br> > > <br> > > commit 112c453ba91012f19ed140c56a3ac8fc929ddabb<br> > > Author: Ka Ho Ng <khng@FreeBSD.org><br> > > AuthorDate: 2025-12-21 22:45:03 +0000<br> > > Commit: Ka Ho Ng <khng@FreeBSD.org><br> > > CommitDate: 2025-12-22 00:37:40 +0000<br> > > <br> > > geom(9): struct bio KBI fix<br> > > <br> > > The struct bio was changed after cb85c2e2e995 on the branch. To fix<br> > > this, move BIO_ERROR flag to another value, and now BIO_ERROR_COMPAT<br> > > occupies 0x1 instead. Also, introduce b_error_compat field at the<br> > > place<br> > > where the old bio_error was.<br> > > <br> > > This allows non-CAM(9) disk drivers and software volume manager<br> > > modules<br> > > compiled against 15.0-RELEASE kernel to work on 15-STABLE kernel<br> > > again.<br> > > <br> > > Reviewed by: kib<br> > > Differential Revision: <a href="https://reviews.freebsd.org/D54327" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D54327</a><br> > > <br> > > Approved by: re (cperciva)<br> > <br> > I’m seeing panics on boot now:<br> > <br> > vtnet0: Ethernet address: 58:9c:fc:0c:60:85<br> > vtnet0: netmap queues/slots: TX 1/1024, RX 1panic: Memory modified after<br> > free 0xfffff800038b51a8 (424, g_bio) + 0 = deadc0dedeacc0de<br> > <br> > cpuid = 6<br> > time = 1<br> > KDB: stack backtrace:<br> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame<br> > 0xfffffe008d5679a0<br> > vpanic() at vpanic+0x136/frame 0xfffffe008d567ad0<br> > panic() at panic+0x43/frame 0xfffffe008d567b30<br> > trash_ctor() at trash_ctor+0x74/frame 0xfffffe008d567b40<br> > item_ctor() at item_ctor+0x59/frame 0xfffffe008d567b90<br> > g_clone_bio() at g_clone_bio+0x1d/frame 0xfffffe008d567bb0<br> > g_part_start() at g_part_start+0x96/frame 0xfffffe008d567c40<br> > g_io_request() at g_io_request+0x2ca/frame 0xfffffe008d567c70<br> > g_read_data() at g_read_data+0x95/frame 0xfffffe008d567cb0<br> > g_raid_md_taste_intel() at g_raid_md_taste_intel+0x1d8/frame<br> > 0xfffffe008d567e50<br> > g_raid_taste() at g_raid_taste+0x18e/frame 0xfffffe008d567ea0<br> > g_new_provider_event() at g_new_provider_event+0xaa/frame<br> > 0xfffffe008d567ec0<br> > g_run_events() at g_run_events+0x104/frame 0xfffffe008d567ef0<br> > fork_exit() at fork_exit+0x82/frame 0xfffffe008d567f30<br> > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008d567f30<br> > --- trap 0, rip = 0, rsp = 0, rbp = 0 ---<br> > KDB: enter: panic<br> > [ thread pid 13 tid 100069 ]<br> > Stopped at kdb_enter+0x33: movq $0,0x121aa92(%rip)<br> > db><br> > <br> > With this commit (and the follow-up “geom(9): unset the BIO_ERROR_COMPAT<br> > flag correctly”) reverted the VM boots again.<br> <br> Does the following help?<br> <br> diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c<br> index dc90bd3add22..2368f863a248 100644<br> --- a/sys/kern/vfs_bio.c<br> +++ b/sys/kern/vfs_bio.c<br> @@ -4523,8 +4523,6 @@ biodone(struct bio *bp)<br> bp->bio_flags |= BIO_ERROR_COMPAT;<br> }<br> done(bp);<br> - bp->bio_error_compat = 0;<br> - bp->bio_flags &= ~BIO_ERROR_COMPAT;<br> }<br> }<br> <br> <br></blockquote><div>Yep that fixes the issue. I committed this as 9cfd75a6f88f.</div><div><br></div><div>Ka Ho </div></div></div></div></blockquote><div>+ the missing recipients and the mailing lists.</div><div><br></div><div>Ka Ho</div></div></div>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANnchUb5LXUhn8xV1RQtnoJ6f-YyyLn3NG_cOkOwYZMAsR_cYg>
