optimism icon indicating copy to clipboard operation
optimism copied to clipboard

data-transport-layer 0.4.6 deadlocks when it receives a bad response on startup

Open optimisticben opened this issue 4 years ago • 0 comments

Describe the bug data-transport-layer 0.4.6 deadlocks when it receives a bad response on startup

To Reproduce The L1 endpoint wasn't responding properly when the DTL was restarted. The logs are shown below, but the process did not exit.

Expected behavior The DTL should exit, or try again.

Screenshots

{"level":30,"time":1631812284664,"msg":"Service is starting..."}
{"level":30,"time":1631812284665,"msg":"Service is initializing..."}
{"level":30,"time":1631812284666,"msg":"Initializing L1 Data Transport Service..."}
{"level":30,"time":1631812284720,"msg":"Service is initializing..."}
Warning: [pino-sentry] Sentry DSN must be supplied, otherwise logs will not be reported. Pass via options or `SENTRY_DSN` environment variable.
{"level":30,"time":1631812284734,"defaultBackend":"l1","l1GasPriceBackend":"l1","msg":"HTTP Server Options"}
{"level":30,"time":1631812284734,"url":"http://failover-proxy:8000","msg":"HTTP Server L1 RPC Provider initialized"}
{"level":30,"time":1631812284734,"url":"http://sequencer:8545","msg":"HTTP Server L2 RPC Provider initialized"}
{"level":30,"time":1631812284734,"msg":"Service has initialized."}
{"level":30,"time":1631812284734,"msg":"Service is initializing..."}
{"level":30,"time":1631812284735,"addressManager":"0xA4346c8c120DdCE2c5447e68790625F10Bb4d47A","msg":"Using AddressManager"}
Well, that's that. We ran into a fatal error. Here's the dump. Goodbye!
(node:1) UnhandledPromiseRejectionWarning: Error: missing revert data in call exception (error={"reason":"bad response","code":"SERVER_ERROR","status":403,"headers":{"server":"nginx/1.18.0","date":"Thu, 16 Sep 2021 17:11:25 GMT","content-type":"text/html; charset=utf-8","content-length":"27","connection":"close","x-powered-by":"Express","etag":"W/\"1b-4p8vu2+siZ7mplWCzgIhubUSTBE\""},"body":"Missing authorization token","requestBody":"{\"method\":\"eth_call\",\"params\":[{\"to\":\"0xa4346c8c120ddce2c5447e68790625f10bb4d47a\",\"data\":\"0xbf40fac1000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184f564d5f5374617465436f6d6d69746d656e74436861696e0000000000000000\"},\"latest\"],\"id\":45,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"http://failover-proxy:8000"}, data="0x", code=CALL_EXCEPTION, version=providers/5.4.4)
    at Logger.makeError (/opt/optimism/node_modules/@ethersproject/logger/lib/index.js:187:21)
    at Logger.throwError (/opt/optimism/node_modules/@ethersproject/logger/lib/index.js:196:20)
    at checkError (/opt/optimism/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:76:16)
    at StaticJsonRpcProvider.<anonymous> (/opt/optimism/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:633:47)
    at step (/opt/optimism/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
    at Object.throw (/opt/optimism/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
    at rejected (/opt/optimism/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

optimisticben avatar Sep 16 '21 17:09 optimisticben