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

H/2 code crashes if you specify a low-ish SETTINGS_INITIAL_WINDOW_SIZE #2065

Closed
daghf opened this issue Aug 31, 2016 · 3 comments
Closed

H/2 code crashes if you specify a low-ish SETTINGS_INITIAL_WINDOW_SIZE #2065

daghf opened this issue Aug 31, 2016 · 3 comments

Comments

@daghf
Copy link
Member

daghf commented Aug 31, 2016

varnishd command line:

  $ bin/varnishd/varnishd -a :9090 -b localhost:8080 -n /tmp/foo -d

Request sent via nghttp command line

  $ nghttp http://localhost:9090/ -n -v --no-dep -w 7

where -w 7 sets SETTINGS_INITIAL_WINDOW_SIZE to 127.

Error: Child (9226) died signal=6
Error: Child (9226) Panic at: Wed, 31 Aug 2016 09:08:38 GMT
"Missing errorhandling code in h2_rxframe(), http2/cache_http2_proto.c line 514:
  Condition(h2->rxf_stream > h2->highest_stream) not true.thread = (cache-worker)
version = varnish-trunk revision e7b05d7
ident = Linux,4.6.0-1-amd64,x86_64,-jnone,-smalloc,-smalloc,-hcritbit,epoll
Backtrace:
  0x4521b0: pan_backtrace+0x20
  0x451fd3: pan_ic+0x363
  0x49af6b: h2_rxframe+0x28b
  0x49a029: h2_new_session+0x489
  0x47fe95: Pool_Work_Thread+0x675
  0x47f6d4: WRK_Thread+0x324
  0x47f37d: pool_thread+0xdd
  0x7f3a26a14464: libpthread.so.0(+0x7464) [0x7f3a26a14464]
  0x7f3a2675330d: libc.so.6(clone+0x6d) [0x7f3a2675330d]
req = 0x7f3a14cf6020 {
  vxid = 65541, transport = H2
  step = 0x0,
  req_body = R_BODY_INIT,
  err_code = 1, err_reason = (null),
  restarts = 0, esi_level = 0,
  sp = 0x7f3a1480f820 {
    fd = 26, vxid = 65541,
    t_open = 1472634518.353233,
    t_idle = 1472634518.353824,
    transport = H2 {
      streams {
        0x00000000 idle  
      }
    }
client = ::1 53890,
  },
  ws = 0x7f3a14cf61f8 {
    id = \"req\",
    {s, f, r, e} = {0x7f3a14cf7ff8, +288, (nil), +57344},
  },
  http_conn = 0x7f3a14cf6128 {
    fd = 26,
    doclose = NULL,
    ws = 0x7f3a1b1eae78,
    {rxbuf_b, rxbuf_e} = {0x7f3a1b1ea470, 0x7f3a1b1ea48e},
    {pipeline_b, pipeline_e} = {0x7f3a1b1ea47d, 0x7f3a1b1ea48e},
    content_length = 0,
    body_status = none,
    first_byte_timeout = 0.000000,
    between_bytes_timeout = 0.000000,
  },
  http[req] = 0x7f3a14cf6290 {
    ws[] = (nil),
    hdrs {
    },
  },
  flags = {
  },
},

"

@nigoroll
Copy link
Member

nigoroll commented Sep 6, 2016

Also occurred here https://travis-ci.org/varnishcache/varnish-cache/jobs/157804082 in t2000.vtc


**** v1    0.5 vsl|          0 CLI             - Rd debug.listen_address 
**** v1    0.5 vsl|          0 CLI             - Wr 200 16 127.0.0.1 60805
**** v1    0.5 vsl|       1000 Begin           c sess 0 HTTP/1
**** v1    0.5 vsl|       1000 SessOpen        c 127.0.0.1 41890 127.0.0.1:60805 127.0.0.1 60805 1473145329.761188 20
**** v1    0.5 vsl|          0 Debug           - H2 Prior Knowledge Upgrade
**** v1    0.5 vsl|       1000 Debug           c H2: Got pu PRISM
**** v1    0.5 vsl|          0 Debug           - RX 0x2ab6b058a3f0 9 0
**** v1    0.5 vsl|       1000 H2TxHdr         c 00000c040000000000
**** v1    0.5 vsl|       1000 H2TxBody        c 00030000006400040000ffff
**** v1    0.5 vsl|       1000 H2RxHdr         c 000000040000000000
**** v1    0.5 vsl|       1000 Debug           c H2RXF SETTINGS[0] 0x00 0x00000000
**** v1    0.5 vsl|          0 Debug           - RX 0x2ab6b058a3f0 9 0
**** v1    0.5 vsl|       1000 H2TxHdr         c 000000040100000000
**** v1    0.5 vsl|       1000 H2RxHdr         c 000000040100000000
**** v1    0.5 vsl|       1000 Debug           c H2RXF SETTINGS[0] 0x01 0x00000000
**** v1    0.6 vsl|          0 Debug           - RX 0x2ab6b058a3f0 107 56
**** v1    0.6 vsl|       1000 H2RxHdr         c 000038010500000007
**** v1    0.6 vsl|       1000 H2RxBody        c 000a3a617574686f7269747907666f6f2e62617200053a70617468012f00073a6d6574686f640347455400073a736368656d650468747470
**** v1    0.6 vsl|       1000 Debug           c H2RXF HEADERS[56] 0x05 0x00000007 0x000a3a617574686f7269747907666f6f2e62617200053a70617468012f00073a6d6574686f640347455400073a736368656d650468747470
**** v1    0.6 vsl|       1001 Begin           c req 1000 rxreq
**** v1    0.6 vsl|       1000 Link            c req 1001 rxreq
**** v1    0.6 vsl|       1001 Timestamp       c Start: 1473145329.800956 0.000000 0.000000
**** v1    0.6 vsl|       1001 Timestamp       c Req: 1473145329.800957 0.000000 0.000000
**** v1    0.6 vsl|       1001 ReqProtocol     c HTTP/2.0
**** v1    0.6 vsl|          0 Debug           - RX 0x2ab6b058a3f0 42 5
***  v1    0.7 debug| Error: Child (58534) died signal=6 (core dumped)\n
***  v1    0.7 debug| Error: Child (58534) Panic at: Tue, 06 Sep 2016 07:02:09 GMT\n
***  v1    0.7 debug| "Missing errorhandling code in h2_rxframe(), http2/cache_http2_proto.c line 521:\n
***  v1    0.7 debug|   Condition(h2->rxf_stream > h2->highest_stream) not true.thread = (cache-worker)\n
***  v1    0.7 debug| version = varnish-trunk revision eabda64\n
***  v1    0.7 debug| ident = Linux,3.13.0-40-generic,x86_64,-jnone,-smalloc,-smalloc,-hcritbit,epoll\n
***  v1    0.7 debug| Backtrace:\n
***  v1    0.7 debug|   0x4358c1: pan_ic+0x151\n
***  v1    0.7 debug|   0x45cd3a: h2_new_session+0xe3a\n
***  v1    0.7 debug|   0x44d2ea: WRK_Thread+0x49a\n
***  v1    0.7 debug|   0x44d73b: pool_thread+0x2b\n
***  v1    0.7 debug|   0x2ab6b13abe9a: libpthread.so.0(+0x7e9a) [0x2ab6b13abe9a]\n
***  v1    0.7 debug|   0x2ab6b16b436d: libc.so.6(clone+0x6d) [0x2ab6b16b436d]\n
***  v1    0.7 debug| req = 0x2ab6d8050930 {\n
***  v1    0.7 debug|   vxid = 1000, transport = H2\n
***  v1    0.7 debug|   step = 0x0,\n
***  v1    0.7 debug|   req_body = R_BODY_INIT,\n
***  v1    0.7 debug|   err_code = 1, err_reason = (null),\n
***  v1    0.7 debug|   restarts = 0, esi_level = 0,\n
***  v1    0.7 debug|   sp = 0x2ab6d4001330 {\n
***  v1    0.7 debug|     fd = 20, vxid = 1000,\n
***  v1    0.7 debug|     t_open = 1473145329.761188,\n
***  v1    0.7 debug|     t_idle = 1473145329.800996,\n
***  v1    0.7 debug|     transport = H2 {\n
***  v1    0.7 debug|       streams {\n
***  v1    0.7 debug|         0x00000000 idle  \n
***  v1    0.7 debug|         0x00000007 idle  \n
***  v1    0.7 debug|       }\n
***  v1    0.7 debug|     }\n
***  v1    0.7 debug| client = 127.0.0.1 41890,\n
***  v1    0.7 debug|   },\n
***  v1    0.7 debug|   ws = 0x2ab6d8050b08 {\n
***  v1    0.7 debug|     id = \"req\",\n
***  v1    0.7 debug|     {s, f, r, e} = {0x2ab6d8052908, +224, (nil), +57344},\n
***  v1    0.7 debug|   },\
***  v1    0.7 debug|   http_conn = 0x2ab6d8050a38 {\n***  v1    0.7 debug|     fd = 20,\n
***  v1    0.7 debug|     doclose = NULL,\n
***  v1    0.7 debug|     ws = 0x2ab6b058ae48,\n
***  v1    0.7 debug|     {rxbuf_b, rxbuf_e} = {0x2ab6b058a3f0, 0x2ab6b058a41a},\n
***  v1    0.7 debug|     {pipeline_b, pipeline_e} = {0x2ab6b058a3fe, 0x2ab6b058a41a},\n
***  v1    0.7 debug|     content_length = 0,\n
***  v1    0.7 debug|     body_status = none,\n
***  v1    0.7 debug|     first_byte_timeout = 0.000000,\n
***  v1    0.7 debug|     between_bytes_timeout = 0.000000,\n
***  v1    0.7 debug|   },\n
***  v1    0.7 debug|   http[req] = 0x2ab6d8050ba0 {\n
***  v1    0.7 debug|     ws[] = (nil),\n
***  v1    0.7 debug|     hdrs {\n
***  v1    0.7 debug|     },\n
***  v1    0.7 debug|   },\n
***  v1    0.7 debug|   flags = {\n
***  v1    0.7 debug|   },\n
***  v1    0.7 debug| },\n
***  v1    0.7 debug| \n
***  v1    0.7 debug| "\n
***  v1    0.7 debug| Debug: Child cleanup complete\n
---- c1    0.7 HTTP2 rx EOF (fd:11 read: Success)
#     top  TEST ./tests/t02000.vtc FAILED (60.009) signal=9 exit=0

@daghf
Copy link
Member Author

daghf commented Feb 27, 2017

Fixed in bdf117b

@hermunn
Copy link
Member

hermunn commented Apr 3, 2017

Backport review: H2 only - nothing to backport.

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

No branches or pull requests

5 participants