Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Parity crashes when executing trace_replayBlockTransactions on blocks related to the 2016 DDoS attack. #8907

Closed
begelundmuller opened this issue Jun 15, 2018 · 9 comments
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Milestone

Comments

@begelundmuller
Copy link

begelundmuller commented Jun 15, 2018

I'm running:

  • Which Parity version?: Parity/v1.11.3-beta-a66e36b-20180605/x86_64-linux-gnu/rustc1.26.1
  • Which operating system?: Ubuntu 16.04
  • How installed?: curl (get.parity.io)
  • Are you fully synchronized?: yes
  • Which network are you connected to?: ethereum
  • Did you try to restart the node?: yes

Issue: Parity crashes when I try to replay the transactions in block 2283417 (and a range of other blocks related to the Fall 2016 DDoS attack).

I am replaying transactions as follows:

const payload = {
  "method": "trace_replayBlockTransactions",
  "params": [Web3.utils.toHex(blockNumber), ["trace", "stateDiff", "vmTrace"]],
  "id": 1,
  "jsonrpc": "2.0"
};

rpcProvider = new Web3.providers.HttpProvider(rpcHost);
rpcProvider.send(payload, function (error, result) {
  if (error) {
    reject(error);
  } else {
    resolve(result);
  }
});

I start Parity as follows:

parity --base-path=/home2/.local/share/io.parity.ethereum --pruning archive --tracing on --jsonrpc-hosts all --jsonrpc-interface all --jsonrpc-apis eth,traces --no-ui --no-ws --no-dapps --cache-size=24576 --jsonrpc-threads=4 --jsonrpc-server-threads=4 --max-peers=200 --min-peers=100

It's running on an 8-core, 32GB RAM box with a 2TB SSD disk.

How can I debug this issue?

@Tbaut
Copy link
Contributor

Tbaut commented Jun 15, 2018

Hey, Thanks for the report. Could you monitor your CPU, RAM and tell if one of them goes through the roof?
Does it print anything when it crashes?

@Tbaut Tbaut added F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. labels Jun 15, 2018
@Tbaut Tbaut added this to the 1.12 milestone Jun 15, 2018
@begelundmuller
Copy link
Author

begelundmuller commented Jun 16, 2018

Executing on block 2379718 (also contains DDoS transactions), I see Parity halt with the following message:

thread '<unknown>' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

I'll see if I can get some CPU/RAM stats. Meanwhile, a) how should I run Parity to have it output more useful logs, and b) is there any configuration change I can make that would make it easier for Parity to replay these blocks (after all, it was able to run the transactions when I synced)?

@Tbaut
Copy link
Contributor

Tbaut commented Jun 18, 2018

Given your beefy configuration, I'd try with a bigger cache size. Regarding the logs, https://wiki.parity.io/FAQ#how-can-i-make-parity-to-write-logs I don't think there is any useful flag to give you a better trace.

@5chdn 5chdn added the P5-sometimesoon 🌲 Issue is worth doing soon. label Jun 24, 2018
@tzapu
Copy link
Contributor

tzapu commented Jul 2, 2018

seems we are getting the same on 2288034
--cache-size was 22000, trying with larger now

--auto-update=none --base-path=/paritydb --mode=active --tracing=on --pruning=archive --db-compaction=ssd --scale-verifiers --num-verifiers=6 --jsonrpc-server-threads=6 --jsonrpc-threads=6 --cache-size=22000 --min-peers=100 --max-peers=1000

Parity/v1.11.1-beta-6654d02-20180515/x86_64-linux-gnu/rustc1.26.0

@tzapu
Copy link
Contributor

tzapu commented Jul 2, 2018

with the following settings

command: ["/bin/bash"]
    args:
      - "-c"
      - |-
        ulimit -a;
        ulimit -S -s 32000;
        ulimit -a;
        exec /parity/parity \
          --auto-update=none \
          --base-path=/paritydb \
          --mode=active \
          --tracing=on \
          --pruning=archive \
          --db-compaction=ssd \
          --scale-verifiers \
          --num-verifiers=6 \
          --jsonrpc-server-threads=6 \
          --jsonrpc-threads=6 \
          --cache-size=32000 \
          --min-peers=100 \
          --max-peers=1000 \

    env:
      - name: "RUST_MIN_STACK"
        value: "127108864"

using latest docker image and running only one trace_replayBlockTransactions it did the trace

@Tbaut
Copy link
Contributor

Tbaut commented Jul 2, 2018

@tzapu Thanks for the feedback. Please upgrade to the latest release as it contains a security fix (since v1.11.3)

@bem7 could you please try with the proposed configuration?

@tzapu
Copy link
Contributor

tzapu commented Jul 3, 2018

@Tbaut thanks, forgot to mention, the last test was made with the latest docker image

@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 17, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@debris
Copy link
Collaborator

debris commented Sep 18, 2018

#9360 will resolve this issue

@5chdn 5chdn modified the milestones: 2.2, 2.3 Oct 29, 2018
@folsen
Copy link
Contributor

folsen commented Nov 8, 2018

#9360 is now merged, can anyone confirm that it did indeed fix the issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Projects
None yet
Development

No branches or pull requests

6 participants