Victoriametrics: VM infinite loop on InfluxDB requests without newline after last metric

Created on 26 Jun 2019  ·  3Comments  ·  Source: VictoriaMetrics/VictoriaMetrics

Виктория зависает на обработке запроса по протоколу influxdb, если в последней строке нет \n и передано более одной строки. Клиент не дожидается ответа на запрос, виктория начинает потреблять 100% cpu.

  1. create 1.data (no trailling newline, 55 bytes):
metric1 count=1i 1560091085
metric2 count=1i 1560091085
  1. send the request to VM
$ curl --trace-ascii - --data-binary "@1.data" http://localhost:8428/write
== Info:   Trying ::1...
== Info: TCP_NODELAY set
== Info: connect to ::1 port 8428 failed: В соединении отказано
== Info:   Trying 127.0.0.1...
== Info: TCP_NODELAY set
== Info: Connected to localhost (127.0.0.1) port 8428 (#0)
=> Send header, 153 bytes (0x99)
0000: POST /write HTTP/1.1
0016: Host: localhost:8428
002c: User-Agent: curl/7.52.1
0045: Accept: */*
0052: Content-Length: 55
0066: Content-Type: application/x-www-form-urlencoded
0097: 
=> Send data, 55 bytes (0x37)
0000: metric1 count=1i 1560091085.metric2 count=1i 1560091085
== Info: upload completely sent off: 55 out of 55 bytes
^C

Result:

  • no response from VM
  • VM start to use 100% cpu after first request, 200% after second, ...
bug

Most helpful comment

Should be fixed in v1.20.7

All 3 comments

@0xBF , could you verify that the issue is fixed on the latest commit?

Should be fixed in v1.20.7

yes, it looks ok! thank you!

Was this page helpful?
0 / 5 - 0 ratings