2.6.39rc: kobject-related reboot after RAID array initialization(?) post-QUEUE_FLAG_REENTER-removal
After this change:
commit c21e6beba8835d09bb80e34961430b13e60381c5
Author: Jens Axboe <[email protected]> Date: Tue Apr 19 13:32:46 2011 +0200
block: get rid of QUEUE_FLAG_REENTER
We are currently using this flag to check whether it's safe to call into ->request_fn(). If it is set, we punt to kblockd. But we get a lot of false positives and excessive punts to kblockd, which hurts performance.
The only real abuser of this infrastructure is SCSI. So export the async queue run and convert SCSI over to use that. There's room for improvement in that SCSI need not always use the async call, but this fixes our performance issue and they can fix that up in due time.
my system panics and reboots in early userspace. It is slightly difficult to figure out where -- the reboot happens so fast -- but it is either triggered by
/sbin/mdadm --assemble --scan --auto=md
(with mdadm v2.6.9, yes, I know, it's quite old but it works)
or by
/sbin/lvm vgscan --ignorelockingfailure --mknodes
(most probably the former, since I don't see any sign of lvm running in the text that blinks up right before the reboot, and the oops below mentions md1, not anything lvmish.
netconsole reports this (ignore the fact that md1 is resyncing, that's because of previous instances of this bug!):
[ 6.773532] md: md0 stopped. [ 6.976368] md: bind<sdb1> [ 6.978284] md: bind<sda1> [ 6.980162] bio: create slab <bio-1> at 1 [ 6.981992] md/raid1:md0: active with 2 out of 2 mirrors [ 6.983745] md0: detected capacity change from 0 to 271319040 [ 6.987345] md: md1 stopped. [ 6.989411] md0: unknown partition table [ 7.000464] md: bind<sdb3> [ 7.002247] md: bind<sda3> [ 7.003998] md/raid1:md1: not clean -- starting background reconstruction [ 7.005669] md/raid1:md1: active with 2 out of 2 mirrors [ 7.007330] md1: detected capacity change from 0 to 486936436736 [ 7.008982] md: resync of RAID array md1 [ 7.008984] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. [ 7.008985] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync. [ 7.008988] md: using 128k window, over a total of 475523864 blocks. [ 7.008990] md: resuming resync of md1 from checkpoint. [ 7.176568] md1: unknown partition table [ 7.350823] general protection fault: 0000 [#1] PREEMPT SMP [ 7.353166] last sysfs file: /sys/devices/virtual/block/md1/dev [ 7.355496] CPU 1 [ 7.355514] Modules linked in: [ 7.360073] [ 7.362310] Pid: 0, comm: kworker/0:0 Not tainted 2.6.39-rc4-00119-g584f790-dirty #11 System manufacturer System Product Name /P6T [ 7.364629] RIP: 0010:[<ffffffff8122bb01>] [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.366921] RSP: 0018:ffff88033fc0e510 EFLAGS: 00010202 [ 7.369178] RAX: 0000000400000008 RBX: 3d9e2838ffff8813 RCX: 0000000000000003 [ 7.371417] RDX: ffff8803396feec8 RSI: ffff8803391ea800 RDI: 3d9e2838ffff8813 [ 7.373621] RBP: ffff88033fc0e520 R08: ffff88033fc0e530 R09: 00000000000003e8 [ 7.375827] R10: 0000000001887509 R11: 0000000200000000 R12: ffff8803391ea800 [ 7.378040] R13: ffff8803396fee00 R14: ffff88033d9e2848 R15: 0000000000001055 [ 7.380265] FS: 0000000000000000(0000) GS:ffff88033fc40000(0000) knlGS:0000000000000000 [ 7.382514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 7.384765] CR2: 00000000004051d0 CR3: 000000033a22c000 CR4: 00000000000006e0 [ 7.387037] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 7.389325] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 7.391610] Process kworker/0:0 (pid: 0, threadinfo ffff88033e256000, task ffff88033e254300) [ 7.393914] Stack: [ 7.396196] ffff88033fc0e530 ffff88033d9e2800 ffff88033fc0e530 ffffffff81367f19 [ 7.398544] ffff88033fc0e580 ffffffff81381614 ffff88033a2669c0 3d9e2838ffff8803 [ 7.400876] 0000000000000053 ffff8803396fee00 0000000000000202 0000000000000246 [ 7.403207] Call Trace: [ 7.405481] Code: 89 de 48 c7 c7 d8 ee 7d 81 31 c0 e8 c8 7b 33 00 e8
9d 79 33 00 5b 41 5c c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 85 ff 74 36 <f6> 47 3c 01 75 20 49 89 f8 48 8b 0f 48 c7 c2 ed ee 7d 81 be 53
[ 7.411141] RIP [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.413725] RSP <ffff88033fc0e510> [ 7.416289] ---[ end trace 2a57282106bd5f52 ]--- [ 7.418831] Kernel panic - not syncing: Fatal exception in interrupt [ 7.421364] Pid: 0, comm: kworker/0:0 Tainted: G D 2.6.39-rc4-00119-g584f790-dirty #11 [ 7.423926] Call Trace:
(There is no call trace, ever. I guess it doesn't have time to get over the network before the panic?)
My .config (this one happens to have TuxOnIce built in, but this is not a requirement: the reboot happens in a pristine kernel too):
CONFIG_64BIT=yCONFIG_X86_64=yCONFIG_X86=yCONFIG_INSTRUCTION_DECODER=yCONFIG_OUTPUT_FORMAT="elf64-x86-64"CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"CONFIG_GENERIC_CMOS_UPDATE=yCONFIG_CLOCKSOURCE_WATCHDOG=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=yCONFIG_LOCKDEP_SUPPORT=yCONFIG_STACKTRACE_SUPPORT=yCONFIG_HAVE_LATENCYTOP_SUPPORT=yCONFIG_MMU=yCONFIG_ZONE_DMA=yCONFIG_NEED_DMA_MAP_STATE=yCONFIG_NEED_SG_DMA_LENGTH=yCONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_IOMAP=yCONFIG_GENERIC_BUG=yCONFIG_GENERIC_BUG_RELATIVE_POINTERS=yCONFIG_GENERIC_HWEIGHT=yCONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_ARCH_HAS_CPU_IDLE_WAIT=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_ARCH_HAS_CPU_RELAX=yCONFIG_ARCH_HAS_DEFAULT_IDLE=yCONFIG_ARCH_HAS_CACHE_LINE_SIZE=yCONFIG_HAVE_SETUP_PER_CPU_AREA=yCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=yCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=yCONFIG_HAVE_CPUMASK_OF_CPU_MAP=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_ZONE_DMA32=yCONFIG_ARCH_POPULATES_NODE_MAP=yCONFIG_AUDIT_ARCH=yCONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=yCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=yCONFIG_HAVE_INTEL_TXT=yCONFIG_X86_64_SMP=yCONFIG_X86_HT=yCONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" CONFIG_ARCH_CPU_PROBE_RELEASE=yCONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"CONFIG_CONSTRUCTORS=yCONFIG_HAVE_IRQ_WORK=yCONFIG_IRQ_WORK=yCONFIG_EXPERIMENTAL=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_CROSS_COMPILE=""CONFIG_LOCALVERSION=""CONFIG_LOCALVERSION_AUTO=yCONFIG_HAVE_KERNEL_GZIP=yCONFIG_HAVE_KERNEL_BZIP2=yCONFIG_HAVE_KERNEL_LZMA=yCONFIG_HAVE_KERNEL_XZ=yCONFIG_HAVE_KERNEL_LZO=yCONFIG_KERNEL_LZMA=yCONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=yCONFIG_POSIX_MQUEUE=yCONFIG_POSIX_MQUEUE_SYSCTL=yCONFIG_BSD_PROCESS_ACCT=yCONFIG_TASKSTATS=yCONFIG_TASK_DELAY_ACCT=yCONFIG_TASK_XACCT=yCONFIG_TASK_IO_ACCOUNTING=yCONFIG_AUDIT=yCONFIG_HAVE_GENERIC_HARDIRQS=yCONFIG_GENERIC_HARDIRQS=yCONFIG_HAVE_SPARSE_IRQ=yCONFIG_GENERIC_IRQ_PROBE=yCONFIG_GENERIC_IRQ_SHOW=yCONFIG_GENERIC_PENDING_IRQ=yCONFIG_IRQ_FORCED_THREADING=yCONFIG_SPARSE_IRQ=yCONFIG_TREE_PREEMPT_RCU=yCONFIG_PREEMPT_RCU=yCONFIG_RCU_FANOUT=8CONFIG_LOG_BUF_SHIFT=18CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=yCONFIG_CGROUPS=yCONFIG_CGROUP_SCHED=yCONFIG_FAIR_GROUP_SCHED=yCONFIG_NAMESPACES=yCONFIG_SCHED_AUTOGROUP=yCONFIG_RELAY=yCONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE="usr/initramfs.mutilate"CONFIG_INITRAMFS_ROOT_UID=99CONFIG_INITRAMFS_ROOT_GID=101CONFIG_RD_GZIP=yCONFIG_RD_BZIP2=yCONFIG_RD_LZMA=yCONFIG_RD_XZ=yCONFIG_RD_LZO=yCONFIG_INITRAMFS_COMPRESSION_LZMA=yCONFIG_CC_OPTIMIZE_FOR_SIZE=yCONFIG_SYSCTL=yCONFIG_ANON_INODES=yCONFIG_UID16=yCONFIG_SYSCTL_SYSCALL=yCONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=yCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_PCSPKR_PLATFORM=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_HAVE_PERF_EVENTS=yCONFIG_PERF_EVENTS=yCONFIG_VM_EVENT_COUNTERS=yCONFIG_PCI_QUIRKS=yCONFIG_SLAB=yCONFIG_TRACEPOINTS=yCONFIG_HAVE_OPROFILE=yCONFIG_JUMP_LABEL=yCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_USER_RETURN_NOTIFIER=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_OPTPROBES=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_ATTRS=yCONFIG_USE_GENERIC_SMP_HELPERS=yCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=yCONFIG_HAVE_DMA_API_DEBUG=yCONFIG_HAVE_HW_BREAKPOINT=yCONFIG_HAVE_MIXED_BREAKPOINTS_REGS=yCONFIG_HAVE_USER_RETURN_NOTIFIER=yCONFIG_HAVE_PERF_EVENTS_NMI=yCONFIG_HAVE_ARCH_JUMP_LABEL=yCONFIG_SLABINFO=yCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_STOP_MACHINE=yCONFIG_BLOCK=yCONFIG_BLK_DEV_BSG=yCONFIG_BLOCK_COMPAT=yCONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_DEADLINE=mCONFIG_IOSCHED_CFQ=yCONFIG_DEFAULT_CFQ=yCONFIG_DEFAULT_IOSCHED="cfq"CONFIG_PREEMPT_NOTIFIERS=yCONFIG_MUTEX_SPIN_ON_OWNER=yCONFIG_FREEZER=yCONFIG_TICK_ONESHOT=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_GENERIC_CLOCKEVENTS_BUILD=yCONFIG_SMP=yCONFIG_X86_SUPPORTS_MEMORY_FAILURE=yCONFIG_SCHED_OMIT_FRAME_POINTER=yCONFIG_NO_BOOTMEM=yCONFIG_MCORE2=yCONFIG_X86_INTERNODE_CACHE_SHIFT=6CONFIG_X86_CMPXCHG=yCONFIG_CMPXCHG_LOCAL=yCONFIG_X86_L1_CACHE_SHIFT=6CONFIG_X86_XADD=yCONFIG_X86_WP_WORKS_OK=yCONFIG_X86_INTEL_USERCOPY=yCONFIG_X86_USE_PPRO_CHECKSUM=yCONFIG_X86_P6_NOP=yCONFIG_X86_TSC=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=yCONFIG_X86_MINIMUM_CPU_FAMILY=64CONFIG_X86_DEBUGCTLMSR=yCONFIG_CPU_SUP_INTEL=yCONFIG_CPU_SUP_AMD=yCONFIG_CPU_SUP_CENTAUR=yCONFIG_HPET_TIMER=yCONFIG_HPET_EMULATE_RTC=yCONFIG_DMI=yCONFIG_GART_IOMMU=yCONFIG_SWIOTLB=yCONFIG_IOMMU_HELPER=yCONFIG_IOMMU_API=yCONFIG_NR_CPUS=8CONFIG_SCHED_SMT=yCONFIG_SCHED_MC=yCONFIG_PREEMPT=yCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_MCE=yCONFIG_X86_MCE_INTEL=yCONFIG_X86_MCE_THRESHOLD=yCONFIG_X86_THERMAL_VECTOR=yCONFIG_MICROCODE=mCONFIG_MICROCODE_INTEL=yCONFIG_MICROCODE_OLD_INTERFACE=yCONFIG_X86_MSR=mCONFIG_X86_CPUID=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_ARCH_DMA_ADDR_T_64BIT=yCONFIG_DIRECT_GBPAGES=yCONFIG_ARCH_SPARSEMEM_DEFAULT=yCONFIG_ARCH_SPARSEMEM_ENABLE=yCONFIG_ARCH_SELECT_MEMORY_MODEL=yCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000CONFIG_SELECT_MEMORY_MODEL=yCONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_EXTREME=yCONFIG_SPARSEMEM_VMEMMAP_ENABLE=yCONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=yCONFIG_SPARSEMEM_VMEMMAP=yCONFIG_HAVE_MEMBLOCK=yCONFIG_PAGEFLAGS_EXTENDED=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_COMPACTION=yCONFIG_MIGRATION=yCONFIG_PHYS_ADDR_T_64BIT=yCONFIG_ZONE_DMA_FLAG=1CONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_MMU_NOTIFIER=yCONFIG_KSM=yCONFIG_DEFAULT_MMAP_MIN_ADDR=4096CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=yCONFIG_TRANSPARENT_HUGEPAGE=yCONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=yCONFIG_X86_RESERVE_LOW=64CONFIG_MTRR=yCONFIG_X86_PAT=yCONFIG_ARCH_USES_PG_UNCACHED=yCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_SCHED_HRTICK=yCONFIG_PHYSICAL_START=0x1000000CONFIG_PHYSICAL_ALIGN=0x1000000CONFIG_HOTPLUG_CPU=yCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=yCONFIG_ARCH_HIBERNATION_HEADER=yCONFIG_HIBERNATE_CALLBACKS=yCONFIG_HIBERNATION=yCONFIG_PM_STD_PARTITION=""CONFIG_TOI_CORE=yCONFIG_TOI_SWAP=yCONFIG_TOI_CRYPTO=yCONFIG_TOI_USERUI=yCONFIG_TOI_USERUI_DEFAULT_PATH="/usr/sbin/tuxoniceui_text"CONFIG_TOI_DEFAULT_IMAGE_SIZE_LIMIT=-2CONFIG_TOI_REPLACE_SWSUSP=yCONFIG_TOI_IGNORE_LATE_INITCALL=yCONFIG_TOI_DEFAULT_WAIT=-1CONFIG_TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE=50000CONFIG_TOI_CHECKSUM=yCONFIG_TOI=yCONFIG_PM_SLEEP=yCONFIG_PM_SLEEP_SMP=yCONFIG_PM_RUNTIME=yCONFIG_PM=yCONFIG_ACPI=yCONFIG_ACPI_SLEEP=yCONFIG_ACPI_PROC_EVENT=yCONFIG_ACPI_BUTTON=yCONFIG_ACPI_FAN=yCONFIG_ACPI_PROCESSOR=yCONFIG_ACPI_HOTPLUG_CPU=yCONFIG_ACPI_THERMAL=yCONFIG_ACPI_CUSTOM_DSDT_FILE=""CONFIG_ACPI_BLACKLIST_YEAR=0CONFIG_X86_PM_TIMER=yCONFIG_ACPI_CONTAINER=yCONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_TABLE=yCONFIG_CPU_FREQ_STAT=yCONFIG_CPU_FREQ_STAT_DETAILS=yCONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=yCONFIG_CPU_FREQ_GOV_PERFORMANCE=yCONFIG_CPU_FREQ_GOV_ONDEMAND=yCONFIG_X86_ACPI_CPUFREQ=yCONFIG_CPU_IDLE=yCONFIG_CPU_IDLE_GOV_LADDER=yCONFIG_CPU_IDLE_GOV_MENU=yCONFIG_I7300_IDLE_IOAT_CHANNEL=yCONFIG_I7300_IDLE=yCONFIG_PCI=yCONFIG_PCI_DIRECT=yCONFIG_PCI_MMCONFIG=yCONFIG_PCI_DOMAINS=yCONFIG_DMAR=yCONFIG_DMAR_DEFAULT_ON=yCONFIG_DMAR_FLOPPY_WA=yCONFIG_PCIEPORTBUS=yCONFIG_PCIEAER=yCONFIG_PCIEASPM=yCONFIG_PCIE_PME=yCONFIG_ARCH_SUPPORTS_MSI=yCONFIG_PCI_MSI=yCONFIG_PCI_IOV=yCONFIG_PCI_IOAPIC=yCONFIG_PCI_LABEL=yCONFIG_ISA_DMA_API=yCONFIG_AMD_NB=yCONFIG_BINFMT_ELF=yCONFIG_COMPAT_BINFMT_ELF=yCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=yCONFIG_BINFMT_MISC=yCONFIG_IA32_EMULATION=yCONFIG_COMPAT=yCONFIG_COMPAT_FOR_U64_ALIGNMENT=yCONFIG_SYSVIPC_COMPAT=yCONFIG_HAVE_TEXT_POKE_SMP=yCONFIG_NET=yCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_INET_LRO=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_TCP_CONG_CUBIC=yCONFIG_DEFAULT_TCP_CONG="cubic"CONFIG_IPV6=yCONFIG_IPV6_PRIVACY=yCONFIG_RPS=yCONFIG_RFS_ACCEL=yCONFIG_XPS=yCONFIG_BT=yCONFIG_BT_L2CAP=yCONFIG_BT_SCO=yCONFIG_BT_RFCOMM=yCONFIG_BT_HCIBTUSB=yCONFIG_UEVENT_HELPER_PATH=""CONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_FW_LOADER=yCONFIG_FIRMWARE_IN_KERNEL=yCONFIG_EXTRA_FIRMWARE="radeon/R600_rlc.bin radeon/R700_rlc.bin"CONFIG_EXTRA_FIRMWARE_DIR="/usr/src/linux/linux-firmware"CONFIG_ARCH_NO_SYSDEV_OPS=yCONFIG_PNP=yCONFIG_PNPACPI=yCONFIG_BLK_DEV=yCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_CRYPTOLOOP=mCONFIG_BLK_DEV_NBD=mCONFIG_CDROM_PKTCDVD=yCONFIG_CDROM_PKTCDVD_BUFFERS=16CONFIG_MISC_DEVICES=yCONFIG_HAVE_IDE=yCONFIG_SCSI_MOD=yCONFIG_SCSI=yCONFIG_SCSI_DMA=yCONFIG_BLK_DEV_SD=yCONFIG_BLK_DEV_SR=yCONFIG_SCSI_MULTI_LUN=yCONFIG_SCSI_SCAN_ASYNC=yCONFIG_SCSI_WAIT_SCAN=mCONFIG_SCSI_LOWLEVEL=yCONFIG_ATA=yCONFIG_ATA_VERBOSE_ERROR=yCONFIG_ATA_ACPI=yCONFIG_SATA_PMP=yCONFIG_SATA_AHCI=yCONFIG_ATA_SFF=yCONFIG_ATA_BMDMA=yCONFIG_PATA_JMICRON=yCONFIG_MD=yCONFIG_BLK_DEV_MD=yCONFIG_MD_RAID1=yCONFIG_BLK_DEV_DM=yCONFIG_DM_CRYPT=yCONFIG_DM_SNAPSHOT=yCONFIG_DM_MIRROR=yCONFIG_DM_ZERO=yCONFIG_FIREWIRE=mCONFIG_FIREWIRE_OHCI=mCONFIG_FIREWIRE_OHCI_DEBUG=yCONFIG_FIREWIRE_SBP2=mCONFIG_NETDEVICES=yCONFIG_DUMMY=mCONFIG_MACVLAN=yCONFIG_MACVTAP=yCONFIG_MII=yCONFIG_NETDEV_1000=yCONFIG_R8169=yCONFIG_NETCONSOLE=yCONFIG_NETCONSOLE_DYNAMIC=yCONFIG_NETPOLL=yCONFIG_NET_POLL_CONTROLLER=yCONFIG_INPUT=yCONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1680CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1050CONFIG_INPUT_JOYDEV=yCONFIG_INPUT_EVDEV=yCONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=yCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_PS2_ALPS=yCONFIG_MOUSE_PS2_LOGIPS2PP=yCONFIG_MOUSE_PS2_SYNAPTICS=yCONFIG_MOUSE_PS2_LIFEBOOK=yCONFIG_MOUSE_PS2_TRACKPOINT=yCONFIG_INPUT_JOYSTICK=yCONFIG_JOYSTICK_ANALOG=yCONFIG_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_LIBPS2=yCONFIG_GAMEPORT=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_SERIAL_8250=yCONFIG_FIX_EARLYCON_MEM=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_PNP=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_8250_RUNTIME_UARTS=4CONFIG_SERIAL_CORE=yCONFIG_NVRAM=mCONFIG_HPET=yCONFIG_HPET_MMAP=yCONFIG_DEVPORT=yCONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_COMPAT=yCONFIG_I2C_CHARDEV=yCONFIG_I2C_HELPER_AUTO=yCONFIG_I2C_ALGOBIT=yCONFIG_I2C_I801=yCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=yCONFIG_POWER_SUPPLY=yCONFIG_HWMON=yCONFIG_SENSORS_CORETEMP=yCONFIG_SENSORS_PKGTEMP=yCONFIG_SENSORS_ATK0110=yCONFIG_THERMAL=yCONFIG_THERMAL_HWMON=yCONFIG_SSB_POSSIBLE=yCONFIG_MFD_SUPPORT=yCONFIG_MEDIA_SUPPORT=yCONFIG_VIDEO_DEV=yCONFIG_VIDEO_V4L2_COMMON=yCONFIG_VIDEO_MEDIA=yCONFIG_MEDIA_TUNER=yCONFIG_MEDIA_TUNER_SIMPLE=yCONFIG_MEDIA_TUNER_TDA8290=yCONFIG_MEDIA_TUNER_TDA827X=yCONFIG_MEDIA_TUNER_TDA18271=yCONFIG_MEDIA_TUNER_TDA9887=yCONFIG_MEDIA_TUNER_TEA5761=yCONFIG_MEDIA_TUNER_TEA5767=yCONFIG_MEDIA_TUNER_MT20XX=yCONFIG_MEDIA_TUNER_XC2028=yCONFIG_MEDIA_TUNER_XC5000=yCONFIG_MEDIA_TUNER_MC44S803=yCONFIG_VIDEO_V4L2=yCONFIG_VIDEO_CAPTURE_DRIVERS=yCONFIG_VIDEO_HELPER_CHIPS_AUTO=yCONFIG_V4L_USB_DRIVERS=yCONFIG_USB_VIDEO_CLASS=yCONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=yCONFIG_VGA_ARB=yCONFIG_VGA_ARB_MAX_GPUS=2CONFIG_DRM=yCONFIG_DRM_KMS_HELPER=yCONFIG_DRM_TTM=yCONFIG_DRM_RADEON=yCONFIG_DRM_RADEON_KMS=yCONFIG_FB=yCONFIG_FB_CFB_FILLRECT=yCONFIG_FB_CFB_COPYAREA=yCONFIG_FB_CFB_IMAGEBLIT=yCONFIG_BACKLIGHT_CLASS_DEVICE=yCONFIG_VGA_CONSOLE=yCONFIG_VGACON_SOFT_SCROLLBACK=yCONFIG_VGACON_SOFT_SCROLLBACK_SIZE=512CONFIG_DUMMY_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=yCONFIG_SOUND=yCONFIG_SOUND_OSS_CORE=yCONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=yCONFIG_SND_JACK=yCONFIG_SND_SEQUENCER=yCONFIG_SND_SEQ_DUMMY=mCONFIG_SND_OSSEMUL=yCONFIG_SND_MIXER_OSS=yCONFIG_SND_PCM_OSS=yCONFIG_SND_PCM_OSS_PLUGINS=yCONFIG_SND_SEQUENCER_OSS=yCONFIG_SND_HRTIMER=yCONFIG_SND_SEQ_HRTIMER_DEFAULT=yCONFIG_SND_DYNAMIC_MINORS=yCONFIG_SND_VERBOSE_PROCFS=yCONFIG_SND_VMASTER=yCONFIG_SND_DMA_SGBUF=yCONFIG_SND_PCI=yCONFIG_SND_HDA_INTEL=yCONFIG_SND_HDA_INPUT_JACK=yCONFIG_SND_HDA_GENERIC=yCONFIG_SND_HDA_POWER_SAVE=yCONFIG_SND_HDA_POWER_SAVE_DEFAULT=0CONFIG_HID_SUPPORT=yCONFIG_HID=yCONFIG_USB_HID=yCONFIG_HID_A4TECH=yCONFIG_HID_APPLE=yCONFIG_HID_BELKIN=yCONFIG_HID_CHERRY=yCONFIG_HID_CHICONY=yCONFIG_HID_CYPRESS=yCONFIG_HID_EZKEY=yCONFIG_HID_KYE=yCONFIG_HID_KENSINGTON=yCONFIG_HID_LOGITECH=yCONFIG_HID_MICROSOFT=yCONFIG_HID_MONTEREY=yCONFIG_USB_SUPPORT=yCONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB_ARCH_HAS_OHCI=yCONFIG_USB_ARCH_HAS_EHCI=yCONFIG_USB=yCONFIG_USB_DEVICEFS=yCONFIG_USB_DYNAMIC_MINORS=yCONFIG_USB_EHCI_HCD=yCONFIG_USB_UHCI_HCD=yCONFIG_USB_STORAGE=yCONFIG_RTC_LIB=yCONFIG_RTC_CLASS=yCONFIG_RTC_HCTOSYS=yCONFIG_RTC_HCTOSYS_DEVICE="rtc0"CONFIG_RTC_INTF_SYSFS=yCONFIG_RTC_INTF_PROC=yCONFIG_RTC_INTF_DEV=yCONFIG_RTC_DRV_CMOS=yCONFIG_DMADEVICES=yCONFIG_INTEL_IOATDMA=yCONFIG_DMA_ENGINE=yCONFIG_NET_DMA=yCONFIG_DCA=yCONFIG_FIRMWARE_MEMMAP=yCONFIG_DMIID=yCONFIG_EXT4_FS=yCONFIG_EXT4_USE_FOR_EXT23=yCONFIG_EXT4_FS_XATTR=yCONFIG_EXT4_FS_POSIX_ACL=yCONFIG_JBD2=yCONFIG_FS_MBCACHE=yCONFIG_FS_POSIX_ACL=yCONFIG_EXPORTFS=yCONFIG_FILE_LOCKING=yCONFIG_FSNOTIFY=yCONFIG_DNOTIFY=yCONFIG_INOTIFY_USER=yCONFIG_FANOTIFY=yCONFIG_QUOTA=yCONFIG_QUOTA_NETLINK_INTERFACE=yCONFIG_PRINT_QUOTA_WARNING=yCONFIG_QUOTA_TREE=yCONFIG_QFMT_V2=yCONFIG_QUOTACTL=yCONFIG_QUOTACTL_COMPAT=yCONFIG_FUSE_FS=yCONFIG_CUSE=yCONFIG_GENERIC_ACL=yCONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_UDF_FS=yCONFIG_UDF_NLS=yCONFIG_FAT_FS=mCONFIG_MSDOS_FS=mCONFIG_VFAT_FS=mCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"CONFIG_PROC_FS=yCONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_TMPFS_POSIX_ACL=yCONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=yCONFIG_CONFIGFS_FS=yCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_NFS_V3_ACL=yCONFIG_NFSD=yCONFIG_NFSD_V2_ACL=yCONFIG_NFSD_V3=yCONFIG_NFSD_V3_ACL=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_NFS_ACL_SUPPORT=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_PARTITION_ADVANCED=yCONFIG_MSDOS_PARTITION=yCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_NLS_CODEPAGE_437=yCONFIG_NLS_ASCII=mCONFIG_NLS_ISO8859_1=yCONFIG_NLS_ISO8859_15=mCONFIG_NLS_UTF8=mCONFIG_TRACE_IRQFLAGS_SUPPORT=yCONFIG_PRINTK_TIME=yCONFIG_DEFAULT_MESSAGE_LOGLEVEL=4CONFIG_ENABLE_WARN_DEPRECATED=yCONFIG_ENABLE_MUST_CHECK=yCONFIG_FRAME_WARN=1024CONFIG_STRIP_ASM_SYMS=yCONFIG_DEBUG_FS=yCONFIG_DEBUG_KERNEL=yCONFIG_LOCKUP_DETECTOR=yCONFIG_HARDLOCKUP_DETECTOR=yCONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0CONFIG_DETECT_HUNG_TASK=yCONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0CONFIG_SCHED_DEBUG=yCONFIG_SCHEDSTATS=yCONFIG_TIMER_STATS=yCONFIG_STACKTRACE=yCONFIG_DEBUG_BUGVERBOSE=yCONFIG_DEBUG_INFO=yCONFIG_DEBUG_MEMORY_INIT=yCONFIG_ARCH_WANT_FRAME_POINTERS=yCONFIG_FRAME_POINTER=yCONFIG_LATENCYTOP=yCONFIG_SYSCTL_SYSCALL_CHECK=yCONFIG_USER_STACKTRACE_SUPPORT=yCONFIG_NOP_TRACER=yCONFIG_HAVE_FTRACE_NMI_ENTER=yCONFIG_HAVE_FUNCTION_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=yCONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=yCONFIG_HAVE_DYNAMIC_FTRACE=yCONFIG_HAVE_FTRACE_MCOUNT_RECORD=yCONFIG_HAVE_SYSCALL_TRACEPOINTS=yCONFIG_HAVE_C_RECORDMCOUNT=yCONFIG_RING_BUFFER=yCONFIG_FTRACE_NMI_ENTER=yCONFIG_EVENT_TRACING=yCONFIG_CONTEXT_SWITCH_TRACER=yCONFIG_TRACING=yCONFIG_GENERIC_TRACER=yCONFIG_TRACING_SUPPORT=yCONFIG_FTRACE=yCONFIG_FUNCTION_TRACER=yCONFIG_BRANCH_PROFILE_NONE=yCONFIG_BLK_DEV_IO_TRACE=yCONFIG_DYNAMIC_FTRACE=yCONFIG_FTRACE_MCOUNT_RECORD=yCONFIG_HAVE_ARCH_KGDB=yCONFIG_HAVE_ARCH_KMEMCHECK=yCONFIG_STRICT_DEVMEM=yCONFIG_X86_VERBOSE_BOOTUP=yCONFIG_EARLY_PRINTK=yCONFIG_DEBUG_RODATA=yCONFIG_HAVE_MMIOTRACE_SUPPORT=yCONFIG_IO_DELAY_TYPE_0X80=0CONFIG_IO_DELAY_TYPE_0XED=1CONFIG_IO_DELAY_TYPE_UDELAY=2CONFIG_IO_DELAY_TYPE_NONE=3CONFIG_IO_DELAY_0X80=yCONFIG_DEFAULT_IO_DELAY_TYPE=0CONFIG_SECURITY=yCONFIG_SECURITYFS=yCONFIG_SECURITY_NETWORK=yCONFIG_SECURITY_PATH=yCONFIG_SECURITY_APPARMOR=yCONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=0CONFIG_DEFAULT_SECURITY_DAC=yCONFIG_DEFAULT_SECURITY=""CONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=yCONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=yCONFIG_CRYPTO=yCONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_AEAD2=yCONFIG_CRYPTO_BLKCIPHER=yCONFIG_CRYPTO_BLKCIPHER2=yCONFIG_CRYPTO_HASH=yCONFIG_CRYPTO_HASH2=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_PCOMP2=yCONFIG_CRYPTO_MANAGER=yCONFIG_CRYPTO_MANAGER2=yCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=yCONFIG_CRYPTO_WORKQUEUE=yCONFIG_CRYPTO_CBC=yCONFIG_CRYPTO_MD4=yCONFIG_CRYPTO_LZO=yCONFIG_HAVE_KVM=yCONFIG_HAVE_KVM_IRQCHIP=yCONFIG_HAVE_KVM_EVENTFD=yCONFIG_KVM_APIC_ARCHITECTURE=yCONFIG_KVM_MMIO=yCONFIG_KVM_ASYNC_PF=yCONFIG_VIRTUALIZATION=yCONFIG_KVM=yCONFIG_KVM_INTEL=yCONFIG_VHOST_NET=yCONFIG_VIRTIO=yCONFIG_VIRTIO_RING=yCONFIG_VIRTIO_PCI=mCONFIG_VIRTIO_BALLOON=yCONFIG_BINARY_PRINTF=yCONFIG_BITREVERSE=yCONFIG_GENERIC_FIND_FIRST_BIT=yCONFIG_GENERIC_FIND_NEXT_BIT=yCONFIG_GENERIC_FIND_LAST_BIT=yCONFIG_CRC16=yCONFIG_CRC_ITU_T=yCONFIG_CRC32=yCONFIG_ZLIB_INFLATE=yCONFIG_LZO_COMPRESS=yCONFIG_LZO_DECOMPRESS=yCONFIG_XZ_DEC=yCONFIG_XZ_DEC_X86=yCONFIG_XZ_DEC_POWERPC=yCONFIG_XZ_DEC_IA64=yCONFIG_XZ_DEC_ARM=yCONFIG_XZ_DEC_ARMTHUMB=yCONFIG_XZ_DEC_SPARC=yCONFIG_XZ_DEC_BCJ=yCONFIG_DECOMPRESS_GZIP=yCONFIG_DECOMPRESS_BZIP2=yCONFIG_DECOMPRESS_LZMA=yCONFIG_DECOMPRESS_XZ=yCONFIG_DECOMPRESS_LZO=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_CPU_RMAP=yCONFIG_NLATTR=y
Signature · 1 line
NULL && (void)
Quoted 95 lines · On Sun, 15 May 2011 23:05:32 +0100 Nix <[email protected]> wrote:
After this change:
commit
c21e6beba8835d09bb80e34961430b13e60381c5Author: Jens Axboe <[email protected]> Date: Tue Apr 19 13:32:46 2011 +0200block: get rid of
QUEUE_FLAG_REENTERWe are currently using this flag to check whether it's safe to call into ->request_fn(). If it is set, we punt to kblockd. But we get a lot of false positives and excessive punts to kblockd, which hurts performance.
The only real abuser of this infrastructure is SCSI. So export the async queue run and convert SCSI over to use that. There's room for improvement in that SCSI need not always use the async call, but this fixes our performance issue and they can fix that up in due time.
Signed-off-by Jens Axboe <[email protected]>my system panics and reboots in early userspace. It is slightly difficult to figure out where -- the reboot happens so fast -- but it is either triggered by
/sbin/mdadm--assemble --scan --auto=md(with mdadm v2.6.9, yes, I know, it's quite old but it works)
or by
/sbin/lvmvgscan --ignorelockingfailure --mknodes(most probably the former, since I don't see any sign of lvm running in the text that blinks up right before the reboot, and the oops below mentions md1, not anything lvmish.
netconsole reports this (ignore the fact that md1 is resyncing, that's because of previous instances of this bug!):
[ 6.773532] md: md0 stopped. [ 6.976368] md: bind<sdb1> [ 6.978284] md: bind<sda1> [ 6.980162] bio: create slab <bio-1> at 1 [ 6.981992] md/raid1:md0: active with 2 out of 2 mirrors [ 6.983745] md0: detected capacity change from 0 to 271319040 [ 6.987345] md: md1 stopped. [ 6.989411] md0: unknown partition table [ 7.000464] md: bind<sdb3> [ 7.002247] md: bind<sda3> [ 7.003998] md/raid1:md1: not clean -- starting background reconstruction [ 7.005669] md/raid1:md1: active with 2 out of 2 mirrors [ 7.007330] md1: detected capacity change from 0 to 486936436736 [ 7.008982] md: resync of RAID array md1 [ 7.008984] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. [ 7.008985] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync. [ 7.008988] md: using 128k window, over a total of 475523864 blocks. [ 7.008990] md: resuming resync of md1 from checkpoint. [ 7.176568] md1: unknown partition table [ 7.350823] general protection fault: 0000 [#1] PREEMPT SMP [ 7.353166] last sysfs file: /sys/devices/virtual/block/md1/dev [ 7.355496] CPU 1 [ 7.355514] Modules linked in: [ 7.360073] [ 7.362310] Pid: 0, comm: kworker/0:0 Not tainted 2.6.39-rc4-00119-g584f790-dirty #11 System manufacturer System Product Name /P6T [ 7.364629] RIP: 0010:[<ffffffff8122bb01>] [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.366921] RSP: 0018:ffff88033fc0e510 EFLAGS: 00010202 [ 7.369178] RAX: 0000000400000008 RBX: 3d9e2838ffff8813 RCX: 0000000000000003 [ 7.371417] RDX: ffff8803396feec8 RSI: ffff8803391ea800 RDI: 3d9e2838ffff8813 [ 7.373621] RBP: ffff88033fc0e520 R08: ffff88033fc0e530 R09: 00000000000003e8 [ 7.375827] R10: 0000000001887509 R11: 0000000200000000 R12: ffff8803391ea800 [ 7.378040] R13: ffff8803396fee00 R14: ffff88033d9e2848 R15: 0000000000001055 [ 7.380265] FS: 0000000000000000(0000) GS:ffff88033fc40000(0000) knlGS:0000000000000000 [ 7.382514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 7.384765] CR2: 00000000004051d0 CR3: 000000033a22c000 CR4: 00000000000006e0 [ 7.387037] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 7.389325] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 7.391610] Process kworker/0:0 (pid: 0, threadinfo ffff88033e256000, task ffff88033e254300) [ 7.393914] Stack: [ 7.396196] ffff88033fc0e530 ffff88033d9e2800 ffff88033fc0e530 ffffffff81367f19 [ 7.398544] ffff88033fc0e580 ffffffff81381614 ffff88033a2669c0 3d9e2838ffff8803 [ 7.400876] 0000000000000053 ffff8803396fee00 0000000000000202 0000000000000246 [ 7.403207] Call Trace: [ 7.405481] Code: 89 de 48 c7 c7 d8 ee 7d 81 31 c0 e8 c8 7b 33 00 e89d 79 33 00 5b 41 5c c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 85 ff 74 36 <f6> 47 3c 01 75 20 49 89 f8 48 8b 0f 48 c7 c2 ed ee 7d 81 be 53
[ 7.411141] RIP [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.413725] RSP <ffff88033fc0e510> [ 7.416289] ---[ end trace 2a57282106bd5f52 ]--- [ 7.418831] Kernel panic - not syncing: Fatal exception in interrupt [ 7.421364] Pid: 0, comm: kworker/0:0 Tainted: G D 2.6.39-rc4-00119-g584f790-dirty #11 [ 7.423926] Call Trace:
Quoted 2 lines
(There is no call trace, ever. I guess it doesn't have time to get over the network before the panic?)
That is unfortunate....
I'm having trouble seeing md implicated given the patch, but one never knows...
I'd try reverting just the __blk_run_queue part of the patch.
i.e. leave __blk_run_queue behaving how it did before the patch, but keep the blk_run_queue_async parts of the new code.
If that still crashes, then there must be someone going wrong when scsi calls the new blk_run_queue_async.
If it doesn't crash, then the recursion-protection of QUEUE_FLAG_REENTER must be protecting us from something else other than SCSI re-entering.
NeilBrown
Quoted 105 lines · NeilBrown
Quoted 95 lines · On Sun, 15 May 2011 23:05:32 +0100 Nix <[email protected]> wrote:
After this change:
commit
c21e6beba8835d09bb80e34961430b13e60381c5Author: Jens Axboe <[email protected]> Date: Tue Apr 19 13:32:46 2011 +0200block: get rid of
QUEUE_FLAG_REENTERWe are currently using this flag to check whether it's safe to call into ->request_fn(). If it is set, we punt to kblockd. But we get a lot of false positives and excessive punts to kblockd, which hurts performance.
The only real abuser of this infrastructure is SCSI. So export the async queue run and convert SCSI over to use that. There's room for improvement in that SCSI need not always use the async call, but this fixes our performance issue and they can fix that up in due time.
Signed-off-by Jens Axboe <[email protected]>my system panics and reboots in early userspace. It is slightly difficult to figure out where -- the reboot happens so fast -- but it is either triggered by
/sbin/mdadm--assemble --scan --auto=md(with mdadm v2.6.9, yes, I know, it's quite old but it works)
or by
/sbin/lvmvgscan --ignorelockingfailure --mknodes(most probably the former, since I don't see any sign of lvm running in the text that blinks up right before the reboot, and the oops below mentions md1, not anything lvmish.
netconsole reports this (ignore the fact that md1 is resyncing, that's because of previous instances of this bug!):
[ 6.773532] md: md0 stopped. [ 6.976368] md: bind<sdb1> [ 6.978284] md: bind<sda1> [ 6.980162] bio: create slab <bio-1> at 1 [ 6.981992] md/raid1:md0: active with 2 out of 2 mirrors [ 6.983745] md0: detected capacity change from 0 to 271319040 [ 6.987345] md: md1 stopped. [ 6.989411] md0: unknown partition table [ 7.000464] md: bind<sdb3> [ 7.002247] md: bind<sda3> [ 7.003998] md/raid1:md1: not clean -- starting background reconstruction [ 7.005669] md/raid1:md1: active with 2 out of 2 mirrors [ 7.007330] md1: detected capacity change from 0 to 486936436736 [ 7.008982] md: resync of RAID array md1 [ 7.008984] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. [ 7.008985] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync. [ 7.008988] md: using 128k window, over a total of 475523864 blocks. [ 7.008990] md: resuming resync of md1 from checkpoint. [ 7.176568] md1: unknown partition table [ 7.350823] general protection fault: 0000 [#1] PREEMPT SMP [ 7.353166] last sysfs file: /sys/devices/virtual/block/md1/dev [ 7.355496] CPU 1 [ 7.355514] Modules linked in: [ 7.360073] [ 7.362310] Pid: 0, comm: kworker/0:0 Not tainted 2.6.39-rc4-00119-g584f790-dirty #11 System manufacturer System Product Name /P6T [ 7.364629] RIP: 0010:[<ffffffff8122bb01>] [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.366921] RSP: 0018:ffff88033fc0e510 EFLAGS: 00010202 [ 7.369178] RAX: 0000000400000008 RBX: 3d9e2838ffff8813 RCX: 0000000000000003 [ 7.371417] RDX: ffff8803396feec8 RSI: ffff8803391ea800 RDI: 3d9e2838ffff8813 [ 7.373621] RBP: ffff88033fc0e520 R08: ffff88033fc0e530 R09: 00000000000003e8 [ 7.375827] R10: 0000000001887509 R11: 0000000200000000 R12: ffff8803391ea800 [ 7.378040] R13: ffff8803396fee00 R14: ffff88033d9e2848 R15: 0000000000001055 [ 7.380265] FS: 0000000000000000(0000) GS:ffff88033fc40000(0000) knlGS:0000000000000000 [ 7.382514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 7.384765] CR2: 00000000004051d0 CR3: 000000033a22c000 CR4: 00000000000006e0 [ 7.387037] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 7.389325] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 7.391610] Process kworker/0:0 (pid: 0, threadinfo ffff88033e256000, task ffff88033e254300) [ 7.393914] Stack: [ 7.396196] ffff88033fc0e530 ffff88033d9e2800 ffff88033fc0e530 ffffffff81367f19 [ 7.398544] ffff88033fc0e580 ffffffff81381614 ffff88033a2669c0 3d9e2838ffff8803 [ 7.400876] 0000000000000053 ffff8803396fee00 0000000000000202 0000000000000246 [ 7.403207] Call Trace: [ 7.405481] Code: 89 de 48 c7 c7 d8 ee 7d 81 31 c0 e8 c8 7b 33 00 e89d 79 33 00 5b 41 5c c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 85 ff 74 36 <f6> 47 3c 01 75 20 49 89 f8 48 8b 0f 48 c7 c2 ed ee 7d 81 be 53
[ 7.411141] RIP [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.413725] RSP <ffff88033fc0e510> [ 7.416289] ---[ end trace 2a57282106bd5f52 ]--- [ 7.418831] Kernel panic - not syncing: Fatal exception in interrupt [ 7.421364] Pid: 0, comm: kworker/0:0 Tainted: G D 2.6.39-rc4-00119-g584f790-dirty #11 [ 7.423926] Call Trace:Quoted 2 lines
(There is no call trace, ever. I guess it doesn't have time to get over the network before the panic?)
That is unfortunate....
I'm having trouble seeing md implicated given the patch, but one never knows...
Quoted 8 lines
I'd try reverting just the
__blk_run_queuepart of the patch.i.e. leave
__blk_run_queuebehaving how it did before the patch, but keep theblk_run_queue_asyncparts of the new code.
If that still crashes, then there must be someone going wrong when scsi calls the newblk_run_queue_async.
If it doesn't crash, then the recursion-protection ofQUEUE_FLAG_REENTERmust be protecting us from something else other than SCSI re-entering.
I don't think it's the re-enter part, it looks more like a missing reference to the queue. The problem is most likely there before the change as well, the difference is just that there's a bigger window where the caller can now drop the reference before the queue is run and thus accessed.
Signature · 1 line
Jens Axboe
Quoted 27 lines · NeilBrown
Quoted 25 lines · On Sun, 15 May 2011 23:05:32 +0100 Nix <[email protected]> wrote:
After this change:
commit
c21e6beba8835d09bb80e34961430b13e60381c5Author: Jens Axboe <[email protected]> Date: Tue Apr 19 13:32:46 2011 +0200block: get rid of
QUEUE_FLAG_REENTERWe are currently using this flag to check whether it's safe to call into ->request_fn(). If it is set, we punt to kblockd. But we get a lot of false positives and excessive punts to kblockd, which hurts performance.
The only real abuser of this infrastructure is SCSI. So export the async queue run and convert SCSI over to use that. There's room for improvement in that SCSI need not always use the async call, but this fixes our performance issue and they can fix that up in due time.
Signed-off-by Jens Axboe <[email protected]>my system panics and reboots in early userspace. It is slightly difficult to figure out where -- the reboot happens so fast -- but it is either triggered by
Quoted 7 lines
Quoted 7 lines
/sbin/mdadm--assemble --scan --auto=md(with mdadm v2.6.9, yes, I know, it's quite old but it works)
or by
/sbin/lvmvgscan --ignorelockingfailure --mknodes
No it isn't. I'm sorry for misleading you. I ran the commands manually one by one in an emergency boot shell until I got a panic, and md is blameless. More below.
Quoted 55 lines
Quoted 55 lines
(most probably the former, since I don't see any sign of lvm running in the text that blinks up right before the reboot, and the oops below mentions md1, not anything lvmish.
netconsole reports this (ignore the fact that md1 is resyncing, that's because of previous instances of this bug!):
[ 6.773532] md: md0 stopped. [ 6.976368] md: bind<sdb1> [ 6.978284] md: bind<sda1> [ 6.980162] bio: create slab <bio-1> at 1 [ 6.981992] md/raid1:md0: active with 2 out of 2 mirrors [ 6.983745] md0: detected capacity change from 0 to 271319040 [ 6.987345] md: md1 stopped. [ 6.989411] md0: unknown partition table [ 7.000464] md: bind<sdb3> [ 7.002247] md: bind<sda3> [ 7.003998] md/raid1:md1: not clean -- starting background reconstruction [ 7.005669] md/raid1:md1: active with 2 out of 2 mirrors [ 7.007330] md1: detected capacity change from 0 to 486936436736 [ 7.008982] md: resync of RAID array md1 [ 7.008984] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. [ 7.008985] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync. [ 7.008988] md: using 128k window, over a total of 475523864 blocks. [ 7.008990] md: resuming resync of md1 from checkpoint. [ 7.176568] md1: unknown partition table [ 7.350823] general protection fault: 0000 [#1] PREEMPT SMP [ 7.353166] last sysfs file: /sys/devices/virtual/block/md1/dev [ 7.355496] CPU 1 [ 7.355514] Modules linked in: [ 7.360073] [ 7.362310] Pid: 0, comm: kworker/0:0 Not tainted 2.6.39-rc4-00119-g584f790-dirty #11 System manufacturer System Product Name /P6T [ 7.364629] RIP: 0010:[<ffffffff8122bb01>] [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.366921] RSP: 0018:ffff88033fc0e510 EFLAGS: 00010202 [ 7.369178] RAX: 0000000400000008 RBX: 3d9e2838ffff8813 RCX: 0000000000000003 [ 7.371417] RDX: ffff8803396feec8 RSI: ffff8803391ea800 RDI: 3d9e2838ffff8813 [ 7.373621] RBP: ffff88033fc0e520 R08: ffff88033fc0e530 R09: 00000000000003e8 [ 7.375827] R10: 0000000001887509 R11: 0000000200000000 R12: ffff8803391ea800 [ 7.378040] R13: ffff8803396fee00 R14: ffff88033d9e2848 R15: 0000000000001055 [ 7.380265] FS: 0000000000000000(0000) GS:ffff88033fc40000(0000) knlGS:0000000000000000 [ 7.382514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 7.384765] CR2: 00000000004051d0 CR3: 000000033a22c000 CR4: 00000000000006e0 [ 7.387037] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 7.389325] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 7.391610] Process kworker/0:0 (pid: 0, threadinfo ffff88033e256000, task ffff88033e254300) [ 7.393914] Stack: [ 7.396196] ffff88033fc0e530 ffff88033d9e2800 ffff88033fc0e530 ffffffff81367f19 [ 7.398544] ffff88033fc0e580 ffffffff81381614 ffff88033a2669c0 3d9e2838ffff8803 [ 7.400876] 0000000000000053 ffff8803396fee00 0000000000000202 0000000000000246 [ 7.403207] Call Trace: [ 7.405481] Code: 89 de 48 c7 c7 d8 ee 7d 81 31 c0 e8 c8 7b 33 00 e89d 79 33 00 5b 41 5c c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 85 ff 74 36 <f6> 47 3c 01 75 20 49 89 f8 48 8b 0f 48 c7 c2 ed ee 7d 81 be 53
Quoted 6 lines
Quoted 6 lines
[ 7.411141] RIP [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.413725] RSP <ffff88033fc0e510> [ 7.416289] ---[ end trace 2a57282106bd5f52 ]--- [ 7.418831] Kernel panic - not syncing: Fatal exception in interrupt [ 7.421364] Pid: 0, comm: kworker/0:0 Tainted: G D 2.6.39-rc4-00119-g584f790-dirty #11 [ 7.423926] Call Trace:
This crash is caused by *fsck*, to be specific by this line in my initramfs:
fsck -t $TYPE -a $ROOT
where $TYPE is "ext4" and $ROOT is "/dev/main/root", an filesystem atop LVM atop md.
fsck kicks up, does a journal replay, and then we panic. Why we panic is
unclear: it's hard to save output from strace in an emergency boot shell with nothing mounted, and I suspect that if fsck panics, mount will panic too (but I haven't tried it yet).
Signature · 1 line
NULL && (void)
Quoted 108 lines · Nix
Quoted 27 lines · NeilBrown
Quoted 25 lines · On Sun, 15 May 2011 23:05:32 +0100 Nix <[email protected]> wrote:
After this change:
commit
c21e6beba8835d09bb80e34961430b13e60381c5Author: Jens Axboe <[email protected]> Date: Tue Apr 19 13:32:46 2011 +0200block: get rid of
QUEUE_FLAG_REENTERWe are currently using this flag to check whether it's safe to call into ->request_fn(). If it is set, we punt to kblockd. But we get a lot of false positives and excessive punts to kblockd, which hurts performance.
The only real abuser of this infrastructure is SCSI. So export the async queue run and convert SCSI over to use that. There's room for improvement in that SCSI need not always use the async call, but this fixes our performance issue and they can fix that up in due time.
Signed-off-by Jens Axboe <[email protected]>my system panics and reboots in early userspace. It is slightly difficult to figure out where -- the reboot happens so fast -- but it is either triggered by
Quoted 7 lines
Quoted 7 lines
/sbin/mdadm--assemble --scan --auto=md(with mdadm v2.6.9, yes, I know, it's quite old but it works)
or by
/sbin/lvmvgscan --ignorelockingfailure --mknodesNo it isn't. I'm sorry for misleading you. I ran the commands manually one by one in an emergency boot shell until I got a panic, and md is blameless. More below.
Quoted 55 lines
Quoted 55 lines
(most probably the former, since I don't see any sign of lvm running in the text that blinks up right before the reboot, and the oops below mentions md1, not anything lvmish.
netconsole reports this (ignore the fact that md1 is resyncing, that's because of previous instances of this bug!):
[ 6.773532] md: md0 stopped. [ 6.976368] md: bind<sdb1> [ 6.978284] md: bind<sda1> [ 6.980162] bio: create slab <bio-1> at 1 [ 6.981992] md/raid1:md0: active with 2 out of 2 mirrors [ 6.983745] md0: detected capacity change from 0 to 271319040 [ 6.987345] md: md1 stopped. [ 6.989411] md0: unknown partition table [ 7.000464] md: bind<sdb3> [ 7.002247] md: bind<sda3> [ 7.003998] md/raid1:md1: not clean -- starting background reconstruction [ 7.005669] md/raid1:md1: active with 2 out of 2 mirrors [ 7.007330] md1: detected capacity change from 0 to 486936436736 [ 7.008982] md: resync of RAID array md1 [ 7.008984] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. [ 7.008985] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync. [ 7.008988] md: using 128k window, over a total of 475523864 blocks. [ 7.008990] md: resuming resync of md1 from checkpoint. [ 7.176568] md1: unknown partition table [ 7.350823] general protection fault: 0000 [#1] PREEMPT SMP [ 7.353166] last sysfs file: /sys/devices/virtual/block/md1/dev [ 7.355496] CPU 1 [ 7.355514] Modules linked in: [ 7.360073] [ 7.362310] Pid: 0, comm: kworker/0:0 Not tainted 2.6.39-rc4-00119-g584f790-dirty #11 System manufacturer System Product Name /P6T [ 7.364629] RIP: 0010:[<ffffffff8122bb01>] [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.366921] RSP: 0018:ffff88033fc0e510 EFLAGS: 00010202 [ 7.369178] RAX: 0000000400000008 RBX: 3d9e2838ffff8813 RCX: 0000000000000003 [ 7.371417] RDX: ffff8803396feec8 RSI: ffff8803391ea800 RDI: 3d9e2838ffff8813 [ 7.373621] RBP: ffff88033fc0e520 R08: ffff88033fc0e530 R09: 00000000000003e8 [ 7.375827] R10: 0000000001887509 R11: 0000000200000000 R12: ffff8803391ea800 [ 7.378040] R13: ffff8803396fee00 R14: ffff88033d9e2848 R15: 0000000000001055 [ 7.380265] FS: 0000000000000000(0000) GS:ffff88033fc40000(0000) knlGS:0000000000000000 [ 7.382514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 7.384765] CR2: 00000000004051d0 CR3: 000000033a22c000 CR4: 00000000000006e0 [ 7.387037] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 7.389325] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 7.391610] Process kworker/0:0 (pid: 0, threadinfo ffff88033e256000, task ffff88033e254300) [ 7.393914] Stack: [ 7.396196] ffff88033fc0e530 ffff88033d9e2800 ffff88033fc0e530 ffffffff81367f19 [ 7.398544] ffff88033fc0e580 ffffffff81381614 ffff88033a2669c0 3d9e2838ffff8803 [ 7.400876] 0000000000000053 ffff8803396fee00 0000000000000202 0000000000000246 [ 7.403207] Call Trace: [ 7.405481] Code: 89 de 48 c7 c7 d8 ee 7d 81 31 c0 e8 c8 7b 33 00 e89d 79 33 00 5b 41 5c c9 c3 55 48 89 e5 53 48 89 fb 48 83 ec 08 48 85 ff 74 36 <f6> 47 3c 01 75 20 49 89 f8 48 8b 0f 48 c7 c2 ed ee 7d 81 be 53
Quoted 6 lines
Quoted 6 lines
[ 7.411141] RIP [<ffffffff8122bb01>] kobject_put+0x11/0x4b [ 7.413725] RSP <ffff88033fc0e510> [ 7.416289] ---[ end trace 2a57282106bd5f52 ]--- [ 7.418831] Kernel panic - not syncing: Fatal exception in interrupt [ 7.421364] Pid: 0, comm: kworker/0:0 Tainted: G D 2.6.39-rc4-00119-g584f790-dirty #11 [ 7.423926] Call Trace:This crash is caused by *fsck*, to be specific by this line in my initramfs:
fsck -t $TYPE -a $ROOT
Quoted 7 lines
where $TYPE is "ext4" and $ROOT is "
/dev/main/root", an filesystem atop LVM atop md.fsck kicks up, does a journal replay, and then we panic. Why we panic is
unclear: it's hard to save output from strace in an emergency boot shell with nothing mounted, and I suspect that if fsck panics, mount will panic too (but I haven't tried it yet).
Out of curiousity, does this patch make a difference?
drivers/scsi/scsi_lib.c +16 -4
@@ -74,8 +74,6 @@ struct kmem_cache *scsi_sdb_cache;*/ #define SCSI_QUEUE_DELAY 3 -static void scsi_run_queue (struct request_queue *q); -/* * Function: scsi_unprep_request() *
@@ -161,7 +159,7 @@ static int __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)blk_requeue_request (q, cmd->request);spin_unlock_irqrestore (q->queue_lock, flags); -scsi_run_queue (q); +kblockd_schedule_work (q, &device->requeue_work);return 0 ; }
@@ -438,7 +436,11 @@ static void scsi_run_queue(struct request_queue *q)continue ; } -blk_run_queue_async (sdev->request_queue); +spin_unlock (shost->host_lock); +spin_lock (sdev->request_queue->queue_lock); +__blk_run_queue (sdev->request_queue); +spin_unlock (sdev->request_queue->queue_lock); +spin_lock (shost->host_lock); }/* put any unprocessed entries back */ list_splice (&starved_list, &shost->starved_list);
@@ -447,6 +449,16 @@ static void scsi_run_queue(struct request_queue *q)blk_run_queue (q); } +void scsi_requeue_run_queue (struct work_struct *work) +{ +struct scsi_device *sdev; +struct request_queue *q; + + sdev = container_of(work, struct scsi_device, requeue_work); + q = sdev->request_queue; +scsi_run_queue (q); +} +/* * Function: scsi_requeue_command() *
drivers/scsi/scsi_scan.c +2 -0
@@ -242,6 +242,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,int display_failure_msg =1 , ret;struct Scsi_Host *shost =dev_to_shost (starget->dev.parent);extern void scsi_evt_thread (struct work_struct *work); +extern void scsi_requeue_run_queue (struct work_struct *work); sdev =kzalloc (sizeof (*sdev) + shost->transportt->device_size,GFP_ATOMIC );
@@ -264,6 +265,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,INIT_LIST_HEAD (&sdev->event_list);spin_lock_init (&sdev->list_lock);INIT_WORK (&sdev->event_work, scsi_evt_thread); +INIT_WORK (&sdev->requeue_work, scsi_requeue_run_queue); sdev->sdev_gendev.parent =get_device (&starget->dev); sdev->sdev_target = starget;
include/scsi/scsi_device.h +1 -0
@@ -169,6 +169,7 @@ struct scsi_device { sdev_dev;struct execute_work ew;/* used to get process context on put */ +struct work_struct requeue_work;struct scsi_dh_data *scsi_dh_data;enum scsi_device_state sdev_state;
Signature · 1 line
Jens Axboe
On 16 May 2011, Jens Axboe verbalised:
Quoted 1 line
Out of curiousity, does this patch make a difference?
Yes. Crash cured, I can boot again.
Now I only have to worry about this ext4-quota-related panic on reboot, completely uncaptured by netconsole (just as netconsole seems to fail to capture almost every interesting piece of data these days).
I'll probably have to take a photo and transcribe it :(