Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http2Stream blocked forever 3.6.0 #3246

Closed
xuegl opened this issue Mar 28, 2017 · 2 comments
Closed

Http2Stream blocked forever 3.6.0 #3246

xuegl opened this issue Mar 28, 2017 · 2 comments

Comments

@xuegl
Copy link

xuegl commented Mar 28, 2017

Our team recently upgrade okhttp3 to 3.6.0, and found that sometimes one of our tasks is often blocked. The ANR trace is dumped:

"SyncCoordinator" daemon prio=5 tid=38 Waiting
  | group="main" sCount=1 dsCount=0 obj=0x12c2c0c0 self=0xdaf55300
  | sysTid=18321 nice=19 cgrp=bg_non_interactive sched=0/0 handle=0xd8efa930
  | state=S schedstat=( 25801330653 19599660882 53090 ) utm=1695 stm=885 core=3 HZ=100
  | stack=0xd8df8000-0xd8dfa000 stackSize=1038KB
  | held mutexes=
  at java.lang.Object.wait!(Native method)
  - waiting on <0x05597df9> (a okhttp3.internal.http2.Http2Stream)
  at okhttp3.internal.http2.Http2Stream.waitForIo(Http2Stream.java:577)
  at okhttp3.internal.http2.Http2Stream.takeResponseHeaders(Http2Stream.java:143)
  - locked <0x05597df9> (a okhttp3.internal.http2.Http2Stream)
  at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:120)
  at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:67)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
  at com.facebook.stetho.okhttp3.StethoInterceptor.intercept(StethoInterceptor.java:59)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
  at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
  at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
  at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
  at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
  at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)

this can't be recovered, even i turn off the wifi.

@xuegl
Copy link
Author

xuegl commented Mar 28, 2017

when debugging, I also encountered the PROTOCOL_ERROR. so i add some okhttp log as well as the frame log, as below:

System.err  W  >> 0x000000a5  5326 HEADERS       END_STREAM|END_HEADERS
                         W  << 0x00000000     8 GOAWAY
                         W  >> 0x00000000     8 GOAWAY
                         W  >> 0x000000a5     4 RST_STREAM
                         W  >> CONNECTION 505249202a20485454502f322e300d0a0d0a534d0d0a0d0a
                         W  >> 0x00000000     6 SETTINGS
                         W  >> 0x00000000     4 WINDOW_UPDATE
                         W  << 0x00000000    18 SETTINGS
                         W  >> 0x00000003  5585 HEADERS       END_STREAM|END_HEADERS
                         W  >> 0x00000000     0 SETTINGS      ACK
                         W  << 0x00000000     4 WINDOW_UPDATE
                         W  << 0x00000000     0 SETTINGS      ACK
                         W  << 0x00000000     8 GOAWAY
                         W  >> 0x00000000     8 GOAWAY
                         W  >> 0x00000003     4 RST_STREAM
                 OkHttp  D  <-- HTTP FAILED: okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR

but i am not sure if this is the reason

@swankjesse
Copy link
Member

Which webserver?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants