[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2017-01-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

--- Comment #10 from Vyacheslav Dikonov  ---
One further observation. The drive was attached to an USB2 controller 

00:1d.0 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
USB UHCI Controller

through an USB hub, which has  both USB2 and USB3 ports. The bug occurs when I
try to reattach the hdd to the same type of ports. The HDD works when I change
the type of ports (USB2 > USB3 or USB3 > USB2). It happens again if I do not
change the type of connection. It might be a different USB-related problem, but
the error message is the same "Synchronize Cache(10) failed"

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2017-01-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

Vyacheslav Dikonov  changed:

   What|Removed |Added

 CC||sdico...@mail.ru

--- Comment #9 from Vyacheslav Dikonov  ---
I am experiencing the Synchronize Cache problem with both 4.4.43 and 4.8.17.
My dmesg yields:

[  428.593067] sd 5:0:0:0: [sdd] Synchronizing SCSI cache
[  428.716643] sd 5:0:0:0: [sdd] Synchronize Cache(10) failed: Result:
hostbyte=DID_ERROR driverbyte=DRIVER_OK

When I try to attach an external USB3 drive (over an USB2 interface). It work
well for the first time, but later, after I unmount and disconnect it, any
subsequent attempt to attacj the same hdd results in this bug. The disk cannot
be mounted for the second time. Fs is reiserfs. It happens with kernel 4.4.43
too,

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-12-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

--- Comment #8 from Daniele ViganĂ²  ---
@Rich, have a look at https://bugzilla.kernel.org/show_bug.cgi?id=187061

Bug has been resolved it 4.9-rc7.

-- 
You are receiving this mail because:
You are the assignee for the bug.--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-12-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

Rich  changed:

   What|Removed |Added

 CC||f...@bitservices.org.uk

--- Comment #7 from Rich  ---
Very similar (if not same) problem happening on my works PC - a Dell Precision
T1700. I will try and get a screenshot and add it to this thread.

The problem began with Kernel 4.8.6 and is still present (currently running
Kernel 4.8.11).

Very annoying on shutdown. I have absolutely no idea if the disks' cache is
actually flushing or not - so data integrity is a concern. Its a magnetic disk
and I have been running fsck on it regularly (no issues found as of yet) and
been avoiding shutting the PC down.

Point of this comment: Its still an issue on some PCs. Anyone else finding the
same?

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-11-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

Daniele ViganĂ²  changed:

   What|Removed |Added

 CC||dennyvatw...@gmail.com

--- Comment #6 from Daniele ViganĂ²  ---
I can confirm exactly the same bug on my Dell Latitude E5450 with an SSD
(Samsung 840) running Fedora 24 and kernel 4.8.6 (4.7.9 was fine).

The patch provided by Gianpaolo solved the issue on my machine.

-- 
You are receiving this mail because:
You are the assignee for the bug.--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-11-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

Gianpaolo  changed:

   What|Removed |Added

 CC||gianpao...@gmail.com

--- Comment #5 from Gianpaolo  ---
Created attachment 243891
  --> https://bugzilla.kernel.org/attachment.cgi?id=243891=edit
Patch reverting commit 2c85025c75dfe7ddc2bb33363a998dad59383f94

This patch solved bug https://bugzilla.kernel.org/show_bug.cgi?id=187061 which
I suspect being a duuplicate of this bug. If someone affected by this bug could
test it and confirm it works (it should work both with v4.8.6 and v4.9-rc4).

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-08-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

icanrealizeum  changed:

   What|Removed |Added

 Kernel Version|<=4.7.0-g0cbbc42|<=4.7.0-g0cbbc42
   ||4.7.0-g52ddb7e

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-08-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

icanrealizeum  changed:

   What|Removed |Added

 Regression|No  |Yes

--- Comment #4 from icanrealizeum  
---
I have worked around this issue(for me) by adding a few lines in debug.sh like:

if test "$1" == "poweroff"; then
 hdparm -Y /dev/sda
 echo o > /proc/sysrq-trigger ; sleep 5
fi

that puts drive to sleep and triggers shutdown via sysrq

Seems to have worked just fine: no drive issues on startup anymore, as I've
mentioned before with having to ctrl+alt+del once to get BIOS to detect drive;
and no extra delays.

Also the above require a kernel patch:
//sd_start_stop_device(sdkp, 0);
commenting out that call in sd_shutdown function in file: drivers/scsi/sd.c
or else it will fail like in comment #3

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-08-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

--- Comment #3 from icanrealizeum  
---
Ok, now that the cache error doesn't happen and reboot works, I've tested
shutdown and it now fails at the "Stopping disk" part, which means this line:
sd_start_stop_device(sdkp, 0);

ata4.00: failed command: STANDBY IMMEDIATE

screenshot: https://i.imgur.com/2yvAMSR.jpg

So now we know that it did in fact not safely shutdown the drive before, when I
thought it's just the drive cache flushing that failed. So the drive is doing
recovery, internally, upon laptop poweron which is why it doesn't identify
itself in time but only on next ctrl+alt+del boot. (see comment #1)

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-08-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

icanrealizeum  changed:

   What|Removed |Added

 CC||icanrealizeum+bugzillakerne
   ||l...@gmail.com

--- Comment #1 from icanrealizeum  
---
I tried one shutdown, and after the above it did shutdown, as expected,
however, on poweron, SSD was not detected by BIOS unless I did one ctrl+alt+del
from POST's attempt to boot from LAN, and this second time it was detected.
This happens usually after I powerdown from button(hold 4 sec) because I
imagine SSD is busy recovering from sudden-power-loss internally, so I can only
conclude that the kernel didn't safely powerdown the SSD(aside from the above
failure to flush cache). (Was definitely ok in 4.7.0-rc6-ga99cde4)

I did however have a debug.sh script in
/usr/lib/systemd/system-shutdown/debug.sh
which did these:
sync && sdparm --command=sync /dev/sda && sleep 1
mount -o remount,ro /
hdparm -F /dev/sda
hdparm -f /dev/sda
sleep 1

So in a way, that ssd cache was supposedly flushed regardless; and it doesn't
seem to me that something else ever tried to remount,rw or do writes after
this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Bug 151631] "Synchronizing SCSI cache" fails during(and delays) reboot/shutdown

2016-08-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=151631

--- Comment #2 from icanrealizeum  
---
Created attachment 227801
  --> https://bugzilla.kernel.org/attachment.cgi?id=227801=edit
for systemd, /usr/lib/systemd/system-shutdown/debug.sh

Found workaround, thanks to this article:
https://unix.stackexchange.com/questions/55281/how-to-stop-waking-all-attached-drives-on-reboot-deactivating-swap/55417#55417

If I put the following in aforementioned debug.sh file then reboot is
instant(after the SCSI bug, of course):

#THIS:
#turn off drive cache
hdparm -W0 /dev/sda
#^^

#this was already here before:
#flush drive cache:
hdparm -F /dev/sda
hdparm -f /dev/sda

-- 
You are receiving this mail because:
You are the assignee for the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html