rclone: drive: intermittent crashes with: stream error: stream ID ; INTERNAL_ERROR
In the forum issues were reported with v1.49.4.
The issues looked like this
2019/09/30 13:36:34 INFO : Google drive root 'crypt': Failed to get StartPageToken: Get https://www.googleapis.com/drive/v3/changes/startPageToken?alt=json&prettyPrint=false&supportsAllDrives=true: stream error: stream ID 1923; INTERNAL_ERROR
2019/09/30 13:42:04 INFO : Google drive root 'crypt': Failed to get StartPageToken: Get https://www.googleapis.com/drive/v3/changes/startPageToken?alt=json&prettyPrint=false&supportsAllDrives=true: stream error: stream ID 1929; INTERNAL_ERROR
2019/10/02 19:36:29 ERROR : IO error: open file failed: Get https://www.googleapis.com/drive/v3/files/XXX?alt=media: stream error: stream ID 1217; INTERNAL_ERROR
This is an internal error from the go standard library HTTP/2 code.
v1.49.4 was accidentally compiled with go1.13 which enabled http/2 by default for google drive for reasons not clear from the changelog.
Rolling the compiler back to go1.12 with no other code changes fixes the problem which is what was released as v1.49.5
An attempt at a workaround making these errors retriable was put in f9f9d5029b2f37f109454f2ab6533157669f466f but this did not seem effective.
Problem statement
- go1.12 runs reliably with google drive over HTTP/1
- go1.13 runs unreliably with google drive over HTTP/2
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 25 (23 by maintainers)
Commits related to this issue
- fshttp: allow Transport to be customized #3631 — committed to rclone/rclone by ncw 5 years ago
- drive: disable HTTP/2 by default to work around INTERNAL_ERROR problems Before this change when rclone was compiled with go1.13 it used HTTP/2 to contact drive by default. This causes lockups and IN... — committed to rclone/rclone by ncw 5 years ago
- What an adventure this was Experiencing CURL issues with Kodi streaming as Traefik advertises it's HTTP/2 compatible, even if the proxied client isn't. This still has issues with instability but reso... — committed to breadcat/Dockerfiles by breadcat 4 years ago
It could be, yes.
There is probably a bug in the HTTP/2 code in the go standard library which is being triggered by a bug in the google drive HTTP/2 code - that is my guess!
Great - thanks.
While using --drive-disable-htp2=false
I got this today ReadFileHandle.Read error: low level retry 1/10: stream error: stream ID 1345; INTERNAL_ERROR
it did not result in a full stall however. it managed to recover it seems.
I will set -drive-disable-htp2=true and continue monitoring
Just FYI A number of CVEs was filed against HTTP2 recently. Large providers like Google are no doubt refreshing their http/2 stack. https://blog.cloudflare.com/on-the-recent-http-2-dos-attacks/