Greetings,
0day kernel testing robot got the below dmesg and the first bad commit is
https://github.com/0day-ci/linux
Song-Liu/scsi-sd-release-scan_mutex-during-sync_cache-and-start_stop/20170208-144337
commit 6abeeb67b0590096a6934269b47b00f3a2222a99
Author: Song Liu <songliubraving(a)fb.com>
AuthorDate: Tue Feb 7 21:41:06 2017 -0800
Commit: 0day robot <fengguang.wu(a)intel.com>
CommitDate: Wed Feb 8 14:43:41 2017 +0800
scsi/sd: release scan_mutex during sync_cache and start_stop
When a device is deleted through sysfs handle "delete", the code
locks shost->scan_mutex. If multiple devices are deleted at the
same time, these deletes will be handled in series.
On the other hand, sd_shutdown() sometimes issues long latency
commands: sync cache and start_stop. It is not necessary for these
commands to run in series.
To reduce latency of parallel "delete" requests, this patch unlock
shost->scan_mutex before long latency commands and relock the mutex
after the command.
Signed-off-by: Song Liu <songliubraving(a)fb.com>
+-------------------------------------------------+------------+------------+------------+
| | d35ea41f1d | 6abeeb67b0 | 55fc4005c7
|
+-------------------------------------------------+------------+------------+------------+
| boot_successes | 66 | 0 | 0
|
| boot_failures | 0 | 22 | 13
|
| is_trying_to_release_lock(&shost->scan_mutex)at | 0 | 22 | 13
|
+-------------------------------------------------+------------+------------+------------+
[ 112.762290] [ BUG: bad unlock balance detected! ]
[ 112.763155] 4.10.0-rc2-00172-g6abeeb6 #1 Not tainted
[ 112.764099] -------------------------------------
[ 112.765008] reboot/777 is trying to release lock (&shost->scan_mutex) at:
[ 112.766884] [<ffffffffba5fa2a5>] sd_shutdown+0x12e/0x26c
[ 112.767803] but there are no more locks to release!
[ 112.768629]
[ 112.768629] other info that might help us debug this:
[ 112.769721] 3 locks held by reboot/777:
[ 112.770368] #0: (reboot_mutex){......}, at: [<ffffffffb994f3e4>]
SYSC_reboot+0x150/0x28a
[ 112.771781] #1: (&dev->mutex){......}, at: [<ffffffffba4e1d0e>]
device_shutdown+0xdd/0x32a
[ 112.773363] #2: (&dev->mutex){......}, at: [<ffffffffba4e1d20>]
device_shutdown+0xef/0x32a
[ 112.774897]
[ 112.774897] stack backtrace:
[ 112.775819] CPU: 0 PID: 777 Comm: reboot Not tainted 4.10.0-rc2-00172-g6abeeb6 #1
[ 112.777326] Call Trace:
[ 112.777871] show_stack+0x6b/0x6e
[ 112.778568] dump_stack+0x19/0x1b
[ 112.779287] print_unlock_imbalance_bug+0xfd/0x106
git bisect start 55fc4005c72091403ef4f2db7cef3ab82744d22f
d5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c --
git bisect bad 0ad52b960e702c83f16bf1b00b4ee425652612b2 # 23:29 0- 9 Merge
'linux-review/Markus-Mayer/cpufreq-bmips-cpufreq-Add-CPUfreq-driver-for-Broadcom-s-BMIPS-SoCs/20170208-062037'
into devel-spot-201702082038
git bisect good 7951fc0707eb5e0ec95572ea1a8e73e10c4ae2cd # 23:51 22+ 0 Merge
'linux-review/yuantian-tang-nxp-com/cpufreq-qoriq-added-arm64-socs-support/20170208-163748'
into devel-spot-201702082038
git bisect bad 8a1a11b7d494dfe04e32776bb658513a1ddfdd20 # 00:15 0- 16 Merge
'linux-review/Kinglong-Mee/SUNRPC-Drop-all-entries-from-cache_detail-when-cache_purge/20170208-100000'
into devel-spot-201702082038
git bisect bad af5506487c3aa52be63ed755d42792c19d102a95 # 00:27 0- 11 Merge
'linux-review/David-Carrillo-Cisneros/tools-lib-traceevent-Robustify-do_generate_dynamic_list_file/20170208-133901'
into devel-spot-201702082038
git bisect good 26899ada4d96e4c6009a46928d8c32c9cd0864e5 # 00:40 21+ 0 Merge
'linux-review/Gustavo-A-R-Silva/drivers-usb-early-remove-unused-code/20170208-144808'
into devel-spot-201702082038
git bisect bad 164c4bed04d2047beee51e6cc030609d997e85db # 00:58 0- 12 Merge
'linux-review/Song-Liu/scsi-sd-release-scan_mutex-during-sync_cache-and-start_stop/20170208-144337'
into devel-spot-201702082038
git bisect bad 6abeeb67b0590096a6934269b47b00f3a2222a99 # 01:19 0- 11 scsi/sd:
release scan_mutex during sync_cache and start_stop
# first bad commit: [6abeeb67b0590096a6934269b47b00f3a2222a99] scsi/sd: release scan_mutex
during sync_cache and start_stop
git bisect good d35ea41f1df455df8102af4d6e1150a1bfeeadce # 01:49 62+ 0 Merge
branch 'misc' into for-next
# extra tests with CONFIG_DEBUG_INFO_REDUCED
git bisect bad 6abeeb67b0590096a6934269b47b00f3a2222a99 # 02:03 0- 29 scsi/sd:
release scan_mutex during sync_cache and start_stop
# extra tests on HEAD of linux-devel/devel-spot-201702082038
git bisect bad 55fc4005c72091403ef4f2db7cef3ab82744d22f # 02:03 0- 13 0day
head guard for 'devel-spot-201702082038'
# extra tests on tree/branch
linux-review/Song-Liu/scsi-sd-release-scan_mutex-during-sync_cache-and-start_stop/20170208-144337
git bisect bad 6abeeb67b0590096a6934269b47b00f3a2222a99 # 02:05 0- 22 scsi/sd:
release scan_mutex during sync_cache and start_stop
# extra tests with first bad commit reverted
git bisect good ffb4d278ae2f5fa3abcb4d4b22c386d65fe2da07 # 02:42 66+ 0 Revert
"scsi/sd: release scan_mutex during sync_cache and start_stop"
# extra tests on tree/branch linus/master
git bisect good 926af6273fc683cd98cd0ce7bf0d04a02eed6742 # 03:00 66+ 1 Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
# extra tests on tree/branch linux-next/master
git bisect good e3e6c5f3544c5d05c6b3b309a34f4f2c3537e993 # 03:12 63+ 0 Add
linux-next specific files for 20170208
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/lkp Intel Corporation