Bug 201082 - gptzfsboot regression, "panic: bd_strategy: 114688 bytes I/O not multiple of block size"
Summary: gptzfsboot regression, "panic: bd_strategy: 114688 bytes I/O not multiple of ...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-23 21:41 UTC by Leif Pedersen
Modified: 2017-05-16 17:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Pedersen 2015-06-23 21:41:08 UTC
I have a machine (a Dell tower) on which the new gptzfsboot seems to malfunction. The version from 10.0 worked fine, and the version from 10.1 does not. The system has three SATA disks and one USB disk. The symptom is that when the USB disk is connected, gptzfsboot fails to boot. When I disconnect the USB disk, it boots fine. Changing the boot device order in the BIOS does not seem to affect it. The memstick USB image boots fine (although that doesn't use gptzfsboot). Below is the text I see with and without the USB disk attached.


== Failed boot with USB drive attached ==

BTX loader 1.00  BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS drive E: is disk2
BIOS drive F: is disk3
BIOS 631kB/2060672kB available memory

FreeBSD/x86 ZFS enabled bootstrap loader, Revision 1.1
(root@releng1.nyi.freebsd.org, Tue Nov 11 20:57:26 UTC 2014)
Consoles: internal video/keyboard
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS drive E: is disk2
BIOS drive F: is disk3
panic: bd_strategy: 114688 bytes I/O not multiple of block size
--> Press a key on the console to reboot <--


== Successful boot without USB drive attached ==

BTX loader 1.00  BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS drive E: is disk2
BIOS 631kB/2060672kB available memory

FreeBSD/x86 ZFS enabled bootstrap loader, Revision 1.1
(root@releng1.nyi.freebsd.org, Tue Nov 11 20:57:26 UTC 2014)
Loading: /boot/defaults/loader.conf
(menu appears)


== output of "gpart show" without USB disk ==

=>        34  5860533101  ada0  GPT  (2.7T)
          34         222     1  freebsd-boot  (111K)
         256  5836800000     2  freebsd-zfs  (2.7T)
  5836800256    23732872     3  freebsd-swap  (11G)
  5860533128           7        - free -  (3.5K)

=>        34  5860533101  ada1  GPT  (2.7T)
          34         222     1  freebsd-boot  (111K)
         256  5836800000     2  freebsd-zfs  (2.7T)
  5836800256    23732872     3  freebsd-swap  (11G)
  5860533128           7        - free -  (3.5K)

=>        34  1953525101  ada2  GPT  (932G)
          34         222     1  freebsd-boot  (111K)
         256  1887436800     2  freebsd-zfs  (900G)
  1887437056    66088079        - free -  (32G)


== dmesg after booting without USB disk ==

Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.1-RELEASE-p10 #0: Wed May 13 06:54:13 UTC 2015
    root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: Pentium(R) Dual-Core  CPU      E5800  @ 3.20GHz (3192.07-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x1067a  Family = 0x6  Model = 0x17  Stepping = 10
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xc00e3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE,OSXSAVE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  VT-x: HLT,PAUSE
  TSC: P-state invariant, performance statistics
real memory  = 2147483648 (2048 MB)
avail memory = 2012753920 (1919 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <120110 APIC1739>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
random: <Software, Yarrow> initialized
kbd1 at kbdmux0
acpi0: <DELL ECS    > on motherboard
acpi0: Power Button (fixed)
acpi0: reservation of ffc00000, 300000 (3) failed
acpi0: reservation of fee00000, 1000 (3) failed
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 7dd00000 (3) failed
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 450
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xbc00-0xbc07 mem 0xfe400000-0xfe7fffff,0xd0000000-0xdfffffff irq 16 at device 2.0 on pci0
agp0: <Intel G45 SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 32764k stolen memory
vgapci0: Boot video device
vgapci1: <VGA-compatible display> mem 0xfe200000-0xfe2fffff at device 2.1 on pci0
uhci0: <Intel 82801JI (ICH10) USB controller USB-D> port 0xb880-0xb89f irq 16 at device 26.0 on pci0
uhci0: LegSup = 0x2f00
usbus0 on uhci0
uhci1: <Intel 82801JI (ICH10) USB controller USB-E> port 0xb800-0xb81f irq 21 at device 26.1 on pci0
uhci1: LegSup = 0x2f00
usbus1 on uhci1
ehci0: <Intel 82801JI (ICH10) USB 2.0 controller USB-B> mem 0xfe3fa000-0xfe3fa3ff irq 18 at device 26.7 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci0
hdac0: <Intel 82801JI HDA Controller> mem 0xfe3f4000-0xfe3f7fff irq 22 at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 17 at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0
pci2: <ACPI PCI bus> on pcib2
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0xc800-0xc8ff mem 0xfdfff000-0xfdffffff,0xfdff8000-0xfdffbfff irq 18 at device 0.0 on pci2
re0: Using 1 MSI-X message
re0: Chip rev. 0x28000000
re0: MAC rev. 0x00100000
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Ethernet address: b8:ac:6f:e5:b7:91
uhci2: <Intel 82801JI (ICH10) USB controller USB-A> port 0xb400-0xb41f irq 23 at device 29.0 on pci0
uhci2: LegSup = 0x2f00
usbus3 on uhci2
uhci3: <Intel 82801JI (ICH10) USB controller USB-B> port 0xb080-0xb09f irq 19 at device 29.1 on pci0
uhci3: LegSup = 0x2f00
usbus4 on uhci3
uhci4: <Intel 82801JI (ICH10) USB controller USB-C> port 0xb000-0xb01f irq 18 at device 29.2 on pci0
uhci4: LegSup = 0x2f00
usbus5 on uhci4
ehci1: <Intel 82801JI (ICH10) USB 2.0 controller USB-A> mem 0xfe3f8000-0xfe3f83ff irq 23 at device 29.7 on pci0
usbus6: EHCI version 1.0
usbus6 on ehci1
pcib3: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci3: <ACPI PCI bus> on pcib3
pcib4: <PCI-PCI bridge> at device 1.0 on pci3
pci4: <PCI bus> on pcib4
sf0: <Adaptec ANA-62044 (rev 1) 10/100BaseTX> port 0xe800-0xe8ff mem 0xfeb80000-0xfebfffff irq 16 at device 4.0 on pci4
miibus1: <MII bus> on sf0
smcphy0: <Seeq 80220 10/100 media interface> PHY 1 on miibus1
smcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf0: Ethernet address: 00:00:d1:ee:98:ed
sf1: <Adaptec ANA-62044 (rev 1) 10/100BaseTX> port 0xe400-0xe4ff mem 0xfea80000-0xfeafffff irq 17 at device 5.0 on pci4
miibus2: <MII bus> on sf1
smcphy1: <Seeq 80220 10/100 media interface> PHY 1 on miibus2
smcphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf1: Ethernet address: 00:00:d1:ee:98:ee
sf2: <Adaptec ANA-62044 (rev 1) 10/100BaseTX> port 0xe000-0xe0ff mem 0xfea00000-0xfea7ffff irq 18 at device 6.0 on pci4
miibus3: <MII bus> on sf2
smcphy2: <Seeq 80220 10/100 media interface> PHY 1 on miibus3
smcphy2:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf2: Ethernet address: 00:00:d1:ee:98:ef
sf3: <Adaptec ANA-62044 (rev 1) 10/100BaseTX> port 0xd800-0xd8ff mem 0xfe900000-0xfe97ffff irq 19 at device 7.0 on pci4
miibus4: <MII bus> on sf3
smcphy3: <Seeq 80220 10/100 media interface> PHY 1 on miibus4
smcphy3:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf3: Ethernet address: 00:00:d1:ee:98:f0
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel ICH10 AHCI SATA controller> port 0xac00-0xac07,0xa880-0xa883,0xa800-0xa807,0xa480-0xa483,0xa400-0xa41f mem 0xfe3f2000-0xfe3f27ff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.20 with 6 3Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
acpi_button0: <Power Button> on acpi0
orm0: <ISA Option ROM> at iomem 0xcc800-0xcd7ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
ppc0: cannot reserve I/O port range
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
random: unblocking device.
usbus0: 12Mbps Full Speed USB v1.0
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
            to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
hdacc0: <Realtek ALC887 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC887 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC887 (Analog 7.1+HP/2.0)> at nid 20,22,21,23,27 and 24,25,26 on hdaa0
hdacc1: <Intel Eaglelake HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Eaglelake Audio Function Group> at nid 1 on hdacc1
pcm1: <Intel Eaglelake (HDMI 8ch)> at nid 3 on hdaa1
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 480Mbps High Speed USB v2.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 12Mbps Full Speed USB v1.0
usbus6: 480Mbps High Speed USB v2.0
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen3.1: <Intel> at usbus3
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen2.1: <Intel> at usbus2
uhub2: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen1.1: <Intel> at usbus1
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen5.1: <Intel> at usbus5
uhub4: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5
ugen4.1: <Intel> at usbus4
uhub5: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen6.1: <Intel> at usbus6
uhub6: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus6
ses0 at ahciem0 bus 0 scbus4 target 0 lun 0
ses0: <AHCI SGPIO Enclosure 1.00 0001> SEMB S-E-S 2.00 device
ses0: SEMB SES Device
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST3000DM001-1CH166 CC29> ATA-9 SATA 3.x device
ada0: Serial Number Z1F45C12
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 2861588MB (5860533168 512 byte sectors: 16H 63S/T 16383C)
ada0: quirks=0x1<4K>
ada0: Previously was known as ad4
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <ST3000DM001-1CH166 CC29> ATA-9 SATA 3.x device
ada1: Serial Number Z1F45BNQ
cd0 at ahcich3 bus 0 scbus3 target 0 lun 0
cd0: <HL-DT-ST DVD+-RW GH70N A100> Removable CD-ROM SCSI-0 device 
cd0: Serial Number K11B4DF1521
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 2861588MB (5860533168 512 byte sectors: 16H 63S/T 16383C)
ada1: quirks=0x1<4K>
ada1: Previously was known as ad6
ada2 at ahcich2 bus 0 scbus2 target 0 lun 0
ada2: <WDC WD10EALX-759BA0 15.01H15> ATA-8 SATA 3.x device
ada2: Serial Number WD-WCATR6856342
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada2: Previously was known as ad8
SMP: AP CPU #1 Launched!
Timecounter "TSC-low" frequency 1596034528 Hz quality 1000
uhub5: 2 ports with 2 removable, self powered
uhub4: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub0: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
GEOM_MIRROR: Device mirror/elrond-swap launched (2/2).
Root mount waiting for: usbus6 usbus2
Root mount waiting for: usbus6 usbus2
uhub2: 6 ports with 6 removable, self powered
uhub6: 6 ports with 6 removable, self powered
Trying to mount root from zfs:elrond/_root []...
ugen3.2: <DELL> at usbus3
ukbd0: <DELL Dell USB Entry Keyboard, class 0/0, rev 2.00/0.80, addr 2> on usbus3
kbd2 at ukbd0
cryptosoft0: <software crypto> on motherboard
GEOM_ELI: Device mirror/elrond-swap.eli created.
GEOM_ELI: Encryption: AES-XTS 128
GEOM_ELI:     Crypto: software
sf1: Tx underrun -- increasing Tx threshold to 384 bytes
tun0: link state changed to UP
sf0: Tx underrun -- increasing Tx threshold to 384 bytes
Comment 1 Poul-Henning Kamp freebsd_committer 2017-05-16 11:33:52 UTC
I'm seeing this also on a machine I just installed.

If the USB disk is plugged in, I get 

    panic: bd_strategy: 130560 bytes I/O not multiple of block size

If I unplug, the system boots just fine.

The USB disk has no valid labels (neither MBR, BSD or GPT)

11.0-RELEASE, amd64, installed from official memstick & freebsd-update'd today.
Comment 2 Poul-Henning Kamp freebsd_committer 2017-05-16 17:03:45 UTC
Tsoome helped me diagnose this.

As a workaround, picking up /boot/zfsloader from -current works.