Repository navigation
Closed
Labels
Close within 30 daysIssue will be closed within 30 days unless requested to stay openClosing due to inactionIssue likely to be closed due to lack of recent commentsWaiting for external inputWaiting for a comment from the originator of the issue, or a collaborator.
Description
Hi,
I found a quite-reproducible problem (happens quite often!) with the following setup:
- HW: Raspberry model B+, powered by its own 5V, 2A power supply
- USB HUB 3.0 (Trascend TS-HUB3K), powered by its own 12V, 1.5A power supply (15W)
- 2 external hard disks (the problem happens also with just 1 hard disk!)
- root@rasptorrent:~# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" - root@rasptorrent:~# uname -a
Linux rasptorrent 3.18.5+ Add ifdef to make kernel compile without CONFIG_BCM2708_DT=y #744 PREEMPT Fri Jan 30 18:19:07 GMT 2015 armv6l GNU/Linux
(did "rpi-update" on Jan 31 2015)
HOW TO REPRODUCE: just producing traffic on the USB external drives at some point produces:
[ 1116.317108] sd 1:0:0:0: [sdb]
[ 1116.317199] Result: hostbyte=0x07 driverbyte=0x00
[ 1116.317220] sd 1:0:0:0: [sdb] CDB:
[ 1116.317233] cdb[0]=0x28: 28 00 13 7b 13 08 00 00 f0 00
[ 1116.317297] blk_update_request: I/O error, dev sdb, sector 326832904
(several times, for different sectors)
and the USB device (e.g., /dev/sdb1) is destroyed and a new dev node is created (e.g., /dev/sdc1).
The dwc_otg driver seems latest one:
root@rasptorrent:~# dmesg | grep dwc_otg
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0x10 bcm2708.serial=0xee394e21 smsc95xx.macaddr=B8:27:EB:39:4E:21 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 1.583112] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 2.027416] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdbc14000 dma = 0x5bc14000 len=9024
[ 2.054741] dwc_otg: Microframe scheduler enabled
[ 2.087234] dwc_otg bcm2708_usb: DWC OTG Controller
[ 2.097477] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[ 2.110137] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[ 2.173907] usb usb1: Manufacturer: Linux 3.18.5+ dwc_otg_hcd
[ 2.215058] dwc_otg: FIQ enabled
[ 2.215085] dwc_otg: NAK holdoff enabled
[ 2.215098] dwc_otg: FIQ split-transaction FSM enabled
[ 2.696903] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 3.257234] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 3.617035] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
[ 4.117189] usb 1-1.3: new low-speed USB device number 5 using dwc_otg
[ 4.647235] usb 1-1.5: new high-speed USB device number 6 using dwc_otg
[ 5.287832] usb 1-1.5.2: new high-speed USB device number 7 using dwc_otg
[ 5.757505] usb 1-1.5.4: new high-speed USB device number 8 using dwc_otg
[ 1116.837726] usb 1-1.5.4: new high-speed USB device number 9 using dwc_otg
and it seems that "FIQ enabled", "NAK holdoff enabled" " FIQ split-transaction FSM enabled" features are there.
I'm going to attach the dmsg and lsusb outputs. Please let me know if I can try some fix.
Metadata
Metadata
Assignees
Labels
Close within 30 daysIssue will be closed within 30 days unless requested to stay openClosing due to inactionIssue likely to be closed due to lack of recent commentsWaiting for external inputWaiting for a comment from the originator of the issue, or a collaborator.
Activity
f18m commentedon Jan 31, 2015
DMESG OUTPUT:
f18m commentedon Jan 31, 2015
LSUSB OUTPUT:
P33M commentedon Feb 1, 2015
Is there a firmware revision where this behaviour first started? I.e. can you identify which revision of firmware is the first bad one?
f18m commentedon Feb 1, 2015
Unfortunately no. I have my raspberry only since a few days. Before buying the powered USB hub, it gave the same problem (back then it was using a raspbmc distribution with kernel 3.12 but the errors in dmesg were similar/identical). Moreover, after /dev/sd node recreation I could also hear the typical noise of the external hard drive having problems starting up... for this reason I thought the problems were due to insufficient power and thus I bought the USB hub.
Now the problem in dmesg is similar/identical but it doesn't really seem a power issue: the hard disk stay on even when attached just to the USB hub and additionally, after the /dev/sd node recreation the hard disk emits no noise...
An additional thing: both the hard disk work just fine under Windows (and also under Linux on my workstation) even under heavy load... I think it must be something with dwc_otg driver...
f18m commentedon Feb 1, 2015
Another note: I also tried to power everything from the USB hub (15W should be enough for the 2 external HDD and the raspberry) using a micro USB cable that goes from the hub to the raspberry micro-USB connection. The same problem happens.
Moreover, it also happens apparently randomly even when writing small files on the disk periodically (I have a script that writes 512B every 30 seconds)... for example just now I see:
that is, in idle conditions, after from second 38 to second 19013 no problem, then suddenly the USB failure.
f18m commentedon Feb 5, 2015
Tried with another hard disk (again, over USB). I left it idle (mounted on the filesystem but without read/writes from userspace) for ~3days: no problem.
Then I started writing/reading:
By the way I'm a C/C++ developer... if you could point me to the right point of the code writing those
"sd 0:0:0:0: [sda]\nResult: hostbyte=0x07 driverbyte=0x00"
I could help you with understanding the failure reason perhaps (althought I don't know much about USB driver routines!)...
f18m commentedon Feb 26, 2015
Actually I found that this bug is possibly related to the following long-standing issue in Linux kernel:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625922
MeeGeeVee commentedon Mar 1, 2015
I have a similar issue
Running crashplan on a raspberry pi
Raspberry PI B with own powersupply - booting from SDCard
Seagate Expansion 2TB USB hard drive 1 - Powered by RPI
NTFS partition was reformatted and did a full scandisk in windows (without errors : chkdsk /F /R /X without error)
USB drive disconnecting as device 4 and reconnecting as 5
First on Linux RPI 3.12.28+
Now on Linux version 3.18.8+
Details:
First running on :
Linux RPI 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l
Did an RpI-update to get lastest firmware
Linux version 3.18.8+
I'm not a linux guru, but trying my best to understand things , and solve where possible.
All your assistance is more then welcome
Razican commentedon Apr 16, 2015
I confirm that this happens with Raspbery Pi 2 B running:
Linux 3.18.11-v7+ #777 SMP PREEMPT Sat Apr 11 17:30:37 BST 2015 armv7l GNU/LinuxI have a RAID attached via USB 3.0 (limited to 2.0 by RPi hardware) And it seems to happen under heavy traffic load. Is a 2x2TB in RAID 0 (total of 4TB drive). It fails when checking torrent downloads.
MeeGeeVee commentedon Apr 17, 2015
In my case it was 100% power related.
I was able to test the drive and generate different load conditions with the command 'badblocks' and tuning of the parameters -d -c- b ( fe: sudo badblocks -e 100 -v /dev/sda1 -s -c 32 -d 50). As a result the drive failed on different blocks or not at all. This was an indication that the individual blocks were ok.
Changing the powersupply of the RPI (2A) did not help neither.
After buying a USB3 Y-cable to power the drive from another USB port, all got solved and my drive is still running fine for weeks now. http://www.ebay.com/sch/i.html?_from=R40&_nkw=usb3+y-cable
Hope this helps your case too.
Razican commentedon Apr 17, 2015
In my case, the USB RAID is self-powered, so the power should not be any problem.
MeeGeeVee commentedon Apr 17, 2015
Worth to try some badblocks tests to see if you can reproduce a failure? "sudo badblocks -e 100 -v /dev/sda1 -s" will test at maximum speed. If failure should occur each time in different blocks it would put the hard drive out of the scope.
Razican commentedon Apr 17, 2015
After checking it with badblocks, after about 6 hours of checking it stopped after this error message:
The last two were me trying to do a
lsin the mounted /dev/sda1, that now is called /dev/sdb1, so it won't work.f18m commentedon Apr 18, 2015
By the way I still haven't solved this problem. Just FYI: I see the same problem on both Raspberry PI model B+ and on my BeagleBone.
The hard disks triggering this problem are miscellaneous:
It may help if you write down the manufacturers and model names of the hard disks that trigger this problem (the "Result: hostbyte=* driverbyte=*" error message). Thanks!
36 remaining items
M-Tomohiro commentedon Dec 6, 2017
@JamesH65 Yes, there is no progress.
Dreaky255 commentedon Feb 21, 2018
Same issue for me, and solved.
It was a power issue : My raspberry and hard drive (2Tb) were both powered through an usb hub-powered (2.5A).
I had a DC power switch (jack) to the hub to easily power on and off my raspberry. The switch was actually too resistent to let pass enough power to the whole thing. It was working with a 1TB hard drive, but not with my brand new 2TB.
After deleting the switch and directly powering the hub with the DC adaptor, problem has disappeared.
Hope it helps some of you.
Sry for my poor english.
JamesH65 commentedon Jun 27, 2018
This issue will be closed within 30 days unless further interactions are posted. If you wish this issue to remain open, please add a comment. A closed issue may be reopened if requested.
adde88 commentedon Jul 4, 2018
I would like this issue to remain open, as i've yet to find a fix for it anywhere. And that would be really awesome to get. :)
But if it needs to be closed, i also respect that.
JamesH65 commentedon Jul 4, 2018
@adde88 I presume that you are using an up to date Raspbian, and that everything is sufficiently well powered?
adde88 commentedon Jul 4, 2018
No, i'm not. That's why i'm ok with you closing it.
The reason i wanted this open is because i'm having the exact same issue on another emedded device, running OpenWRT. (Me and alot of other people)
My device is running the exact same version of the kernel.
Based on that my gut is telling me that there's "something" with this kernel version.
I also haven't found another place where this issue has been discussed.
So therefore i was hoping that someone found what's the cause of this. If it's power-related, or a kernel-bug, anything would be interesting to find out. As it could lead to the bug being fixed on our devices as well.
But again, i respect your decision to close this, considering my issue is not directly related to the Raspberry Pi.
JamesH65 commentedon Jul 5, 2018
OK, since this is no longer an RPi issue (as far as I can tell), I'll close it.
pelwell commentedon Jul 5, 2018
Note that closed issues can still be searched and commented on.
risa2000 commentedon Aug 31, 2018
FWIW I have just "discovered" the same problem. I am running latest Raspbian Stretch
Linux version 4.14.62-v7+, onRaspberry Pi 3 Model B Rev 1.2. When connecting my brand new USB<>SATA adapter cable called "Qicent" (https://www.amazon.de/gp/product/B01MAWO4V2) which is identified by kernel log as:It seems the
ManufacturerandProductis similar to the already reported bridge chips above. Thesudo lsusb -v -d 2537:1068shows:What I find interesting is
MaxPower 2mA.In my case I am running two additional USB devices on my RPi 3B:
ZWave USB stick
64GB flash stick
so the RPi is pretty loaded (uses 2.5A PS - at least it is written there), but what I find interesting is that I observe the complete USB reset in kernel, when I connect the Qicent cable even without any disk attached, just the adapter is enough to break it down. On the other hand, disconnecting the cable does not do anything to the system. Rebooting with the cable already connected and with the disk attached is also fine.
Below is the
dmesgfrom the crashing system, which shows that once the new USB device is attached, current devices become unavailable and then they are re-enumerated, which moves my USB flash stick from/dev/sdato/dev/sdband completely confuses the system.oskar-skog commentedon Sep 23, 2018
Could it be the USB-SATA adapter that's buggy? I've had severe issues with a Revoltec enclosure, several dead sectors when using it. Can't read the bloody chip, but I think it's a Revoltec RS076 enclosure.
risa2000 commentedon Sep 24, 2018
It could, but when I tried it in normal PC (Windows 7), there was no problem (but I probably did not have other devices on the same USB hub either).
The fact that it completely resets the USB interface points to the hardware bug, rather than software, but whether it is the bridge chip, or the USB hub in RPi, I do not know, nor if it is really HW bug, or some linux kernel mechanism.
adde88 commentedon Dec 13, 2018
I've done ALOT of debugging on my OpenWRT device. (Pineapple NANO)
I managed to cross-compile the latest kernel (4.14.81) in the hope that this would squash the bug.
But the same error keeps dropping. Though i'm noticing a pattern.
In ALL of the error messages it failed while using the SCSI OPCODE: 0x28 (READ)
So, i'm currently trying to locate exactly which driver is failing, as the kernel have loaded both OHCI and EHCI.
I also tried to uninstall the "scsci-generic" module.
It's not using any MMC driver to manage the SD-card.
Here's some info about the device from lsusb:
I'll provide more feedback if i find anything of interest.
awwit commentedon Dec 19, 2021
This error may be related to this problem (I don't know how to solve it yet): https://en.opensuse.org/SDB:USB_3.0_Hard_Drive_troubleshooting