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

Most upvoted comments

Interesting. So this whole thing could simply be a temporary issue outside of rclone then.

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!

I will be re-enabling HTTP/2 for my normal use and seeing how it goes - if it has stabilized ect. If I see more stalling I will make sure to make a note here about it. (will be testing from version 1.50)

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/