Skip to content

rpcdaemon sending invalid responses #1450

@MysticRyuujin

Description

@MysticRyuujin

I've been wracking my brain trying to figure out why haproxy is complaining that rpcdaemon is sending invalid responses.

I've finally narrowed it down to the exact bytes that haproxy is seeing in the reply that it doesn't like...

In the below haproxy debugs you will see that it says error at position 130 which coresponds to this line 00130 d8930676\r\n and I have absolutely no idea what that is...so I'm kinda stuck not knowing how I might resolve this. Was hoping someone would have some idea what that is.

Even wireshark is telling me that the response is a malformed packet and does not parse the response correctly...

image

image

The curl command that reproduces this is quite ridiculous (the output is 3.4GB) but it's here:

curl -X POST  -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x7a97e47f9399b46c3e8ee444778763a4f331fa182b5c28c1ba98709721f71f7d"],"id":1}'

haproxy error debug:

Total events captured on [22/Jan/2021:18:41:25.300] : 1
 
[22/Jan/2021:18:41:20.864] backend turbogeth (#11): invalid response
  frontend http-https-in (#2), server archive04 (#2), event #0, src <redacted>:39386
  buffer starts at 0 (including 0 out), 14936 free,
  len 1448, wraps at 16336, error at position 130
  H1 connection flags 0x00000000, H1 stream flags 0x00004014
  H1 msg state MSG_CHUNK_SIZE(26), H1 msg flags 0x00001716
  H1 chunk len 0 bytes, H1 body len 0 bytes :
  
  00000  HTTP/1.1 200 OK\r\n
  00017  Content-Type: application/json\r\n
  00049  Vary: Origin\r\n
  00063  Date: Fri, 22 Jan 2021 18:41:20 GMT\r\n
  00100  Transfer-Encoding: chunked\r\n
  00128  \r\n
  00130  d8930676\r\n
  00140  {"jsonrpc":"2.0","id":1,"result":{"gas":4300872,"failed":false,"return
  00210+ Value":"","structLogs":[{"pc":0,"op":"CALLDATASIZE","gas":5810070,"gas
  00280+ Cost":2,"depth":1,"stack":[],"memory":[],"storage":{}},{"pc":1,"op":"R
  00350+ ETURNDATASIZE","gas":5810068,"gasCost":2,"depth":1,"stack":["000000000
  00420+ 0000000000000000000000000000000000000000000000000000b24"],"memory":[],
  00490+ "storage":{}},{"pc":2,"op":"RETURNDATASIZE","gas":5810066,"gasCost":2,
  00560+ "depth":1,"stack":["00000000000000000000000000000000000000000000000000
  00630+ 00000000000b24","00000000000000000000000000000000000000000000000000000
  00700+ 00000000000"],"memory":[],"storage":{}},{"pc":3,"op":"CALLDATACOPY","g
  00770+ as":5810064,"gasCost":558,"depth":1,"stack":["000000000000000000000000
  00840+ 0000000000000000000000000000000000000b24","000000000000000000000000000
  00910+ 0000000000000000000000000000000000000","000000000000000000000000000000
  00980+ 0000000000000000000000000000000000"],"memory":["0000000000000000000000
  01050+ 000000000000000000000000000000000000000000","0000000000000000000000000
  01120+ 000000000000000000000000000000000000000","0000000000000000000000000000
  01190+ 000000000000000000000000000000000000","0000000000000000000000000000000
  01260+ 000000000000000000000000000000000","0000000000000000000000000000000000
  01330+ 000000000000000000000000000000","0000000000000000000000000000000000000
  01400+ 000000000000000000000000000","000000000000000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions