Page MenuHomeFreeBSD

Only dumping the error message under verbose mode
ClosedPublic

Authored by honzhan_microsoft.com on Jun 19 2017, 10:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 15 2024, 8:38 AM
Unknown Object (File)
Jan 29 2024, 8:08 PM
Unknown Object (File)
Jan 19 2024, 8:26 PM
Unknown Object (File)
Dec 20 2023, 10:37 PM
Unknown Object (File)
Dec 20 2023, 2:54 AM
Unknown Object (File)
Dec 12 2023, 8:48 PM
Unknown Object (File)
Dec 9 2023, 7:54 PM
Unknown Object (File)
Nov 28 2023, 6:52 AM
Subscribers
None

Details

Summary

Bug fixing for: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219973

On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors.

The following is the error log details after adding more debugging information:

Jun 20 08:46:08 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:08 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:08 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
Jun 20 08:46:11 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:11 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:11 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
Jun 20 08:46:14 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:14 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:14 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
Jun 20 08:46:17 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:17 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:17 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9980
Build 10409: arc lint + arc unit

Event Timeline

honzhan_microsoft.com retitled this revision from hide the error message dump on non-verbose mode to Only dumping the error message under verbose mode.Jun 19 2017, 10:36 AM
honzhan_microsoft.com edited the summary of this revision. (Show Details)
sepherosa_gmail.com added inline comments.
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2255

Do we need to check status code? So critical errors are logged.

This revision is now accepted and ready to land.Jun 20 2017, 1:27 AM
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2255

Yes, we should check. I also found on Gen2 mode, VM always receives SENSE data almost every 1 second. That is why it was dumped quite a lot. So, shall I log if SENSE data is received?

sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2255

Hmm, I think we only want to log "check condition" under bootverbose. Sense data should be available for "check condition"; but I'm not 100% sure about what Hyper-V does.

This revision now requires review to proceed.Jun 20 2017, 8:57 AM
This revision is now accepted and ready to land.Jun 20 2017, 9:04 AM
This revision was automatically updated to reflect the committed changes.