[Clapper] Transferring file (average bitrate) from mounted external media is too slow |
||||||||||||
Issue descriptionChrome Version: 66.0.3359.67 (M66 Beta) OS: Chrome 10452.30.0 GoPro Hero 4 external camera and Mini USB cable (connected with Chromebook) What steps will reproduce the problem? (1) Goto https://webrtc.github.io/samples/src/content/datachannel/filetransfer/ (2) Select a image file from the external media (3) Check the average birrate and mark that down (4) Copy of download the file from the GoPro to the local file system (Downloads) (5) Go to the same webpage and select the image file form Downloads (6) Check the average bitrate and mark that down and compare it with the previous transfer bitrate What is the expected result? No difference between transferring file from a mounted media or the local file system What happens instead? Average bitrate from a mounted media should not be really low.
,
Apr 3 2018
Chrome Version: 66.0.3359.67 (M66 Beta) OS: Chrome 10452.30.0 GoPro Hero 4 external camera and Mini USB cable (connected with Chromebook) What steps will reproduce the problem? (1) Goto https://webrtc.github.io/samples/src/content/datachannel/filetransfer/ (2) Select a image file from the external media (3) Check the average birrate and mark that down (4) Copy of download the file from the GoPro to the local file system (Downloads) (5) Go to the same webpage and select the image file form Downloads (6) Check the average bitrate and mark that down and compare it with the previous transfer bitrate What is the expected result? No difference between transferring file from a mounted media or the local file system What happens instead? Average bitrate from a mounted media should not be really low. Clapper Device Info during the test : https://listnr.corp.google.com/product/208/report/85266392901
,
Apr 3 2018
Test Image file and the screenshots : https://pantheon.corp.google.com/storage/browser/chromiumos-test-logs/bugfiles/cr/828347?pli=1
,
Apr 3 2018
,
Apr 3 2018
Taylor, is this a dup of the others like this?
,
Apr 3 2018
Don't think so. In fact, I wouldn't even say this is a WebRTC issue, since WebRTC has no direct interaction with the file system here. The file is read to an ArrayBuffer in JS before the data is passed into the data channel. Here's the relevant code:
var chunkSize = 16384;
var sliceFile = function(offset) {
var reader = new window.FileReader();
reader.onload = (function() {
return function(e) {
sendChannel.send(e.target.result);
if (file.size > offset + e.target.result.byteLength) {
window.setTimeout(sliceFile, 0, offset + chunkSize);
}
sendProgress.value = offset + e.target.result.byteLength;
};
})(file);
var slice = file.slice(offset, offset + chunkSize);
reader.readAsArrayBuffer(slice);
};
sliceFile(0);
So, I would guess that either this loop is inefficient in some way, or the file transfer itself is slow. rantonysamy@, would you be able to look into this? Here's a jsfiddle that only chunks the file, without actually using a data channel: https://jsfiddle.net/mhmocyzL/
,
Apr 3 2018
I'm not sure why the expected result would be "No difference between transferring file from a mounted media or the local file system"? I'd always expect transferring a file over a (relatively slow) USB2 connection to be significantly slower than trying to access the same file from the local file system...
,
Apr 3 2018
Of course USB2 should still allow faster than 78 kbits/sec access, so there might be something more going on here, but hard to tell where that would be. Could be some interaction between specific access pattern and how USB works and however the gopro accesses its SD card, hard to tell though... Pure speculation, but somehow using a ReadableStream to read the file is probably the most efficient way to streamingly read the blob (new Response(file).body gives you a ReadableStream wrapped around the file), rather than doing your own slicing/chunking...
,
Apr 6 2018
This issue is reproducible in Soraka and Winky. 66.0.3359.79 / 10452.42.0
,
Apr 17 2018
Ping!
,
Apr 17 2018
Pinging me or rantonysamy@? I don't have anything else to add; as I mentioned I don't think it's a WebRTC issue.
,
Apr 18 2018
Thanks a lot Deadbeef! This issue is clearly a regression. It will be nice if someone can triage this. If not a webrtc issue who can be the right person for this issue?
,
Apr 18 2018
No, it seems likely the regression is with I/O from mounted media rather than with data channels. I have no idea who to contact; let's put this into the ChromeOS perf triage queue and see if anyone picks it up.
,
Apr 18 2018
Thanks Patrik!
,
Apr 18 2018
For this particular issue, kalin@ vsuley@ is your best bet to start with ;-)
,
Apr 18 2018
After reproducing the issue, can you send a feedback: - pressing Shift+Alt+i - Add this issue id in the description - 828347 - Click Send button We'll try to reproduce too and upload logs.
,
Apr 18 2018
I see the feedback filed at https://listnr.corp.google.com/product/208/reports?searchText=reportId:85266392901 Thanks
,
Apr 18 2018
c#12: do you know when the regression started? A comparison of throughput pre-regression and what you are observing now would be helpful.
,
Apr 18 2018
Unable to reproduce on the following devices / builds: 1) Soraka / R66-10452.69.0 beta - Tested provided image file via USB 2.0 drive: 23,560 kbits/sec - Tested generated 10MB text file via USB 2.0 drive: 23,358 kbits/sec - Tested 5.7MB image via USB 3.0: 22,787 kbits/sec 2) Clapper / R66-10452.30.0 beta - Tested 5.7MB image via USB 2.0 drive: 11,356 kbits/sec - Tested generated 10MB text file: 11,770 kbits/sec - Tested 5.7MB image via USB 3.0: 11,097 kbits/sec 3) Bob / R66-10452.69.0 beta - Tested 30MB text file via USB 2.0 drive: 13,888 kbits/sec - Tested 10MB text file via USB 2.0 drive: 13,920 kbits/sec - Tested 5.7MB image via USB 3.0: 13,824 kbits/sec
,
Apr 18 2018
Several kernel errors surrounding the GoPro hotplugin log and dmesg. How is the external media plugged? Any docks or hubs used? 2018-04-03T11:24:45.268986+02:00 ERR kernel: [ 829.588317] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? 2018-04-03T11:24:46.094900+02:00 ERR kernel: [ 830.415596] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? 2018-04-03T11:24:46.094926+02:00 INFO kernel: [ 830.415884] usb 1-2-port4: attempt power cycle 2018-04-03T11:24:47.223887+02:00 ERR kernel: [ 831.546406] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? 2018-04-03T11:24:48.050888+02:00 ERR kernel: [ 832.374787] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? 2018-04-03T11:24:48.050917+02:00 ERR kernel: [ 832.375047] usb 1-2-port4: unable to enumerate USB device 2018-04-03T11:24:48.230982+02:00 INFO kernel: [ 832.554756] usb 1-2.1: new high-speed USB device number 14 using xhci_hcd 2018-04-03T11:24:48.315954+02:00 INFO kernel: [ 832.640354] usb 1-2.1: New USB device found, idVendor=2672, idProduct=000e 2018-04-03T11:24:48.315978+02:00 INFO kernel: [ 832.640367] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=10 2018-04-03T11:24:48.315982+02:00 INFO kernel: [ 832.640372] usb 1-2.1: Product: StillImage 2018-04-03T11:24:48.315985+02:00 INFO kernel: [ 832.640377] usb 1-2.1: Manufacturer: GoPro 2018-04-03T11:24:48.315987+02:00 INFO kernel: [ 832.640381] usb 1-2.1: SerialNumber: 11 2018-04-03T11:25:17.131953+02:00 INFO kernel: [ 861.502870] usb 1-2.1: USB disconnect, device number 14 2018-04-03T11:25:25.150915+02:00 INFO kernel: [ 869.533907] usb 1-2.4: new low-speed USB device number 15 using xhci_hcd 2018-04-03T11:25:25.212904+02:00 ERR kernel: [ 869.596014] usb 1-2.4: device descriptor read/64, error -71 2018-04-03T11:25:25.375898+02:00 ERR kernel: [ 869.759270] usb 1-2.4: device descriptor read/64, error -71 2018-04-03T11:25:25.539893+02:00 INFO kernel: [ 869.923518] usb 1-2.4: new low-speed USB device number 16 using xhci_hcd 2018-04-03T11:25:25.601904+02:00 ERR kernel: [ 869.985640] usb 1-2.4: device descriptor read/64, error -71 2018-04-03T11:25:25.764895+02:00 ERR kernel: [ 870.148898] usb 1-2.4: device descriptor read/64, error -71 2018-04-03T11:25:25.866940+02:00 INFO kernel: [ 870.250290] usb 1-2-port4: attempt power cycle 2018-04-03T11:25:26.982885+02:00 ERR kernel: [ 871.369123] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? 2018-04-03T11:25:27.044898+02:00 INFO kernel: [ 871.430925] usb 1-2.4: new low-speed USB device number 18 using xhci_hcd 2018-04-03T11:25:27.044926+02:00 WARNING kernel: [ 871.431009] usb 1-2.4: Device not responding to setup address. 2018-04-03T11:25:27.246097+02:00 WARNING kernel: [ 871.632319] usb 1-2.4: Device not responding to setup address. 2018-04-03T11:25:27.446900+02:00 ERR kernel: [ 871.833568] usb 1-2.4: device not accepting address 18, error -71 2018-04-03T11:25:27.446931+02:00 ERR kernel: [ 871.833831] usb 1-2-port4: unable to enumerate USB device 2018-04-03T11:25:27.613887+02:00 INFO kernel: [ 872.000837] usb 1-2.1: new high-speed USB device number 19 using xhci_hcd 2018-04-03T11:25:27.687963+02:00 INFO kernel: [ 872.075121] usb 1-2.1: New USB device found, idVendor=2672, idProduct=000e 2018-04-03T11:25:27.687988+02:00 INFO kernel: [ 872.075136] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=10 2018-04-03T11:25:27.687992+02:00 INFO kernel: [ 872.075141] usb 1-2.1: Product: StillImage 2018-04-03T11:25:27.687994+02:00 INFO kernel: [ 872.075146] usb 1-2.1: Manufacturer: GoPro 2018-04-03T11:25:27.687997+02:00 INFO kernel: [ 872.075150] usb 1-2.1: SerialNumber: 11 2018-04-03T11:26:53.561944+02:00 ERR mtpd[1600]: LIBMTP_Get_Storage failed for usb:1,19 2018-04-03T11:27:10.284928+02:00 INFO kernel: [ 974.836292] usb 1-2.1: USB disconnect, device number 19 2018-04-03T11:27:38.055648+02:00 ERR cras_server[1676]: pcm_avail returned frames larger than buf_size: byt-max98090: :1,0: 24000 > 24000 for 2 times 2018-04-03T11:27:55.546530+02:00 ERR kernel: [ 1020.171080] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? dmesg: [ 829.588317] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 830.415596] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 830.415884] usb 1-2-port4: attempt power cycle [ 831.546406] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 832.374787] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 832.375047] usb 1-2-port4: unable to enumerate USB device [ 832.554756] usb 1-2.1: new high-speed USB device number 14 using xhci_hcd [ 832.640354] usb 1-2.1: New USB device found, idVendor=2672, idProduct=000e [ 832.640367] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=10 [ 832.640372] usb 1-2.1: Product: StillImage [ 832.640377] usb 1-2.1: Manufacturer: GoPro [ 832.640381] usb 1-2.1: SerialNumber: 11 [ 861.502870] usb 1-2.1: USB disconnect, device number 14 [ 869.533907] usb 1-2.4: new low-speed USB device number 15 using xhci_hcd [ 869.596014] usb 1-2.4: device descriptor read/64, error -71 [ 869.759270] usb 1-2.4: device descriptor read/64, error -71 [ 869.923518] usb 1-2.4: new low-speed USB device number 16 using xhci_hcd [ 869.985640] usb 1-2.4: device descriptor read/64, error -71 [ 870.148898] usb 1-2.4: device descriptor read/64, error -71 [ 870.250290] usb 1-2-port4: attempt power cycle [ 871.369123] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 871.430925] usb 1-2.4: new low-speed USB device number 18 using xhci_hcd [ 871.431009] usb 1-2.4: Device not responding to setup address. [ 871.632319] usb 1-2.4: Device not responding to setup address. [ 871.833568] usb 1-2.4: device not accepting address 18, error -71 [ 871.833831] usb 1-2-port4: unable to enumerate USB device [ 872.000837] usb 1-2.1: new high-speed USB device number 19 using xhci_hcd [ 872.075121] usb 1-2.1: New USB device found, idVendor=2672, idProduct=000e [ 872.075136] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=10 [ 872.075141] usb 1-2.1: Product: StillImage [ 872.075146] usb 1-2.1: Manufacturer: GoPro [ 872.075150] usb 1-2.1: SerialNumber: 11 [ 974.836292] usb 1-2.1: USB disconnect, device number 19 [ 1020.171080] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 1020.988438] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 1020.988709] usb 1-2-port4: attempt power cycle [ 1022.108260] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 1022.935521] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 1022.936043] usb 1-2-port4: unable to enumerate USB device [ 1027.500088] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 1028.328218] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad? [ 1028.328580] usb 1-2-port4: attempt power cycle [ 1029.447997] usb 1-2-port4: Cannot enable. Maybe the USB cable is bad?
,
Apr 19 2018
No external docs / hubs used. Directly connected with the cable. I will try with few other cables and try to reproduce the same.
,
Apr 19 2018
I won't suggest to try the USB ports on clapper as it has a known HW issue - https://bugs.chromium.org/p/chromium/issues/detail?id=796014#c26
,
May 17 2018
Thanks Cywang! what is the next step for this bug? can we close this bug then?
,
May 17 2018
Let's close it for now, reopen this if we did have other reports received. |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by rantonysamy@chromium.org
, Apr 3 2018242 KB
242 KB View Download
244 KB
244 KB View Download