tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/scsipi


Today, I found my environment panic while rebooting. As bisecting, it
seems the cause is below commit.

On 2017/06/18 7:35, Michael van Elst wrote:
> Module Name:	src
> Committed By:	mlelstv
> Date:		Sat Jun 17 22:35:50 UTC 2017
> Modified Files:
> 	src/sys/dev/scsipi: atapiconf.c cd.c scsi_base.c scsiconf.c
> 	    scsipi_base.c sd.c ss.c st.c
> Log Message:
> The atapibus detach path did hold the channel mutex while calling into autoconf,
> which would trigger a panic when unplugging a USB ATAPI CDROM.
> Align detach code for scsibus and atapibus to fix this.
> Also avoid races when detaching devices by replacing callout_stop with
> callout_halt.
> To generate a diff of this commit:
> cvs rdiff -u -r1.90 -r1.91 src/sys/dev/scsipi/atapiconf.c
> cvs rdiff -u -r1.340 -r1.341 src/sys/dev/scsipi/cd.c
> cvs rdiff -u -r1.91 -r1.92 src/sys/dev/scsipi/scsi_base.c
> cvs rdiff -u -r1.279 -r1.280 src/sys/dev/scsipi/scsiconf.c
> cvs rdiff -u -r1.175 -r1.176 src/sys/dev/scsipi/scsipi_base.c
> cvs rdiff -u -r1.324 -r1.325 src/sys/dev/scsipi/sd.c
> cvs rdiff -u -r1.88 -r1.89 src/sys/dev/scsipi/ss.c
> cvs rdiff -u -r1.230 -r1.231 src/sys/dev/scsipi/st.c
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.

The panic message is here.
// snip
Jun 19 22:48:28 syncing disks... done
config_detach: detached device scsibus0 has children sd0
Skipping crash dump on recursive panic
panic: config_detach
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip 0xffffffff802249f5 cs 0x8 rflags 0x246 cr2 0x70c8884aa38f ilevel 0 rsp 0xffffe4011099cc80
curlwp 0xffffe4027de12140 pid 632.1 lowest kstack 0xffffe401109992c0
Stopped in pid 632.1 (reboot) at        netbsd:breakpoint+0x5:  leave
db{2}> bt
breakpoint() at netbsd:breakpoint+0x5
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
config_detach() at netbsd:config_detach+0x218
config_detach_all() at netbsd:config_detach_all+0x97
cpu_reboot() at netbsd:cpu_reboot+0x173
sys_reboot() at netbsd:sys_reboot+0x75
syscall() at netbsd:syscall+0x1d8
--- syscall (number 208) ---
The addr2line of config_detach()+0x218 is here.

My environment is amd64 which use sd0(USB Flash) as root filesystem.

Could someone have any solution?


Internet Initiative Japan Inc.

Device Engineering Section,
IoT Platform Development Department,
Network Division,
Technology Unit


Home | Main Index | Thread Index | Old Index