From owner-freebsd-bugs@freebsd.org Thu Jun 8 08:47:56 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68362BF9C0C for ; Thu, 8 Jun 2017 08:47:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42D2279CA6 for ; Thu, 8 Jun 2017 08:47:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v588luUe079039 for ; Thu, 8 Jun 2017 08:47:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219856] panic: wrong offset 472559440 for sectorsize 2048 Date: Thu, 08 Jun 2017 08:47:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 08:47:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219856 Bug ID: 219856 Summary: panic: wrong offset 472559440 for sectorsize 2048 Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: avg@FreeBSD.org I had an Audio CD in a DVD drive. I booted with that CD in and this is how it was reported: cd0: Removable CD-ROM SCSI device cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) cd0: 392MB (200919 2048 byte sectors) I see that there is some special code in scsi_cd.c that sets sector size to 2352 for Audio CDs, but that was not reflected in the report quoted above. Later I popped out the CD (using the physical eject button, if that matters) and popped in a UDF formatted DVD disk. That resulted in the following panic: panic: wrong offset 472559440 for sectorsize 2048 KDB: stack backtrace: db_trace_self_wrapper() at 0xffffffff8043517b =3D db_trace_self_wrapper+0x2b/frame 0xfffffe0504bc8870 kdb_backtrace() at 0xffffffff80685289 =3D kdb_backtrace+0x39/frame 0xfffffe0504bc8920 vpanic() at 0xffffffff8064ce8c =3D vpanic+0x14c/frame 0xfffffe0504bc8960 panic() at 0xffffffff8064cbd3 =3D panic+0x43/frame 0xfffffe0504bc89c0 g_io_request() at 0xffffffff805c3b81 =3D g_io_request+0x3e1/frame 0xfffffe0504bc8a00 g_read_data() at 0xffffffff805c48e7 =3D g_read_data+0x77/frame 0xfffffe0504= bc8a40 g_part_gpt_probe() at 0xffffffff805df0d1 =3D g_part_gpt_probe+0x111/frame 0xfffffe0504bc8a80 G_PART_PROBE() at 0xffffffff805daa0b =3D G_PART_PROBE+0x4b/frame 0xfffffe0504bc8aa0 g_part_probe() at 0xffffffff805da366 =3D g_part_probe+0xc6/frame 0xfffffe0504bc8af0 g_part_taste() at 0xffffffff805d8de7 =3D g_part_taste+0x147/frame 0xfffffe0504bc8b30 g_new_provider_event() at 0xffffffff805c7a0b =3D g_new_provider_event+0x10b= /frame 0xfffffe0504bc8b50 one_event() at 0xffffffff805c2a4f =3D one_event+0xff/frame 0xfffffe0504bc8b= 70 g_run_events() at 0xffffffff805c2875 =3D g_run_events+0x65/frame 0xfffffe0504bc8b90 g_event_procbody() at 0xffffffff805c4f38 =3D g_event_procbody+0x58/frame 0xfffffe0504bc8ba0 fork_exit() at 0xffffffff80614800 =3D fork_exit+0xd0/frame 0xfffffe0504bc8b= f0 fork_trampoline() at 0xffffffff80837a7e =3D fork_trampoline+0xe/frame 0xfffffe0504bc8bf0 The actual DVD has size 680368 x 2048. I did some basic math and 472559440 =3D=3D 200919 * 2352 - 2048. Given that the code was probing GPT, the offset is consistent with mediasize still being the old size of the Audio CD while the sector size being 2048. Seems like the disk properties were not properly updated before posting the= new provider event. --=20 You are receiving this mail because: You are the assignee for the bug.=