question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

thread precache panicked

See original GitHub issue

Hi,

While doing the precaching, Esplora crashes constantly with the following error and then restarts, recrashing with the same error…

2-2020-04-17T12:40:57.924+00:00 - DEBUG - updating synced tip to 0000000000000000000dd5fb56bbbefece4709189ac351334794fc83a21c935a
2-2020-04-17T12:40:58.024+00:00 - INFO - Pre-caching stats and utxo set for 13150 scripthashes
2-2020-04-17T12:40:58.027+00:00 - INFO - running pre-cache for scripthash 6576/13150
2-2020-04-17T12:40:58.027+00:00 - INFO - running pre-cache for scripthash 1/13150
2-2020-04-17T12:40:58.027+00:00 - INFO - running pre-cache for scripthash 2466/13150
2-2020-04-17T12:40:58.028+00:00 - INFO - running pre-cache for scripthash 9041/13150
2-thread 'precache-12' panicked at 'called `Result::unwrap()` on an `Err` value: Custom("invalid length 64, expected 32")', src/new_index/schema.rs:611:22
2-stack backtrace:
2-thread 'precache-1' panicked at 'called `Result::unwrap()` on an `Err` value: Custom("invalid length 64, expected 32")', src/new_index/schema.rs:611:22
2-   0:     0x562fd5bf0076 - <unknown>
2-   1:     0x562fd599f25c - <unknown>
2-   2:     0x562fd5bef8e6 - <unknown>
2-   3:     0x562fd5bef5cb - <unknown>
2-   4:     0x562fd5beef4f - <unknown>
2-   5:     0x562fd5beeb2a - <unknown>
2-   6:     0x562fd599cf00 - <unknown>
2-   7:     0x562fd59a35e2 - <unknown>
2-   8:     0x562fd5a04c6a - <unknown>
2-   9:     0x562fd5a47e7e - <unknown>
2-  10:     0x562fd5a4861b - <unknown>
2-  11:     0x562fd5a480f0 - <unknown>
2-  12:     0x562fd5a4861b - <unknown>
2-  13:     0x562fd5a480f0 - <unknown>
2-  14:     0x562fd5a4861b - <unknown>
2-  15:     0x562fd5a480f0 - <unknown>
2-  16:     0x562fd5a4861b - <unknown>
2-  17:     0x562fd5a480f0 - <unknown>
2-  18:     0x562fd5a4861b - <unknown>
2-  19:     0x562fd5a480f0 - <unknown>
2-  20:     0x562fd5a48b4d - <unknown>
2-  21:     0x562fd5bd94e6 - <unknown>
2-  22:     0x562fd5bda497 - <unknown>
2-  23:     0x562fd5bd9dfd - <unknown>
2-  24:     0x562fd5bfcd2e - <unknown>
2-  25:     0x562fd5bfe1b8 - <unknown>
2-  26:     0x7f002d850fa3 - start_thread
2-  27:     0x7f002d7674cf - clone
2-  28:                0x0 - <unknown>
2-stack backtrace:
2-   0:     0x562fd5bf0076 - <unknown>
2-   1:     0x562fd599f25c - <unknown>
2-   2:     0x562fd5bef8e6 - <unknown>
2-   3:     0x562fd5bef5cb - <unknown>
2- Config { log: StdErrLog { verbosity: Trace, quiet: false, show_level: true, timestamp: Millisecond, modules: [], writer: "stderr", color_choice: Never }, network_type: Bitcoin, db_path: "/data/electrs_bitcoin_db/mainnet/mainnet", daemon_dir: "/data/bitcoin", daemon_rpc_addr: V4(127.0.0.1:8332), cookie: None, electrum_rpc_addr: V4(0.0.0.0:50001), http_addr: V4(127.0.0.1:3000), monitoring_addr: V4(0.0.0.0:4224), jsonrpc_import: false, light_mode: false, address_search: true, prevout_enabled: true, cors: None, precache_scripts: Some("/srv/explorer/popular-scripts.txt"), electrum_txs_limit: 100000 }

I’ll check how to disable the precaching and try it…

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
Kexkeycommented, Apr 17, 2020

FYI, I disabled precaching with NO_PRECACHE=1 and now our explorer is up and running.

0reactions
Kexkeycommented, Jun 3, 2020

Ok @shesek sorry for the delay. I’m back on Esplora. I will add debug verbosity and retry with NO_PRECACHE=0 like you asked me.

In the meantime, I want you to know that every time we do a search by block (hash or height), Esplora crashes. 100% reproducible. It is similar to the error above. Here is what I see the current log file:

...
2-2020-06-03T15:10:58.987+00:00 - TRACE - loop process - 1 events, 0.000s
2-2020-06-03T15:10:58.987+00:00 - TRACE -     -> wakeup; idx=0
2-2020-06-03T15:10:58.987+00:00 - DEBUG - scheduling Read for: 1
2-2020-06-03T15:10:58.987+00:00 - TRACE - flushed({role=server}): State { reading: Init, writing: Init, keep_alive: Busy }
2-2020-06-03T15:10:58.987+00:00 - TRACE -     -> not ready
2-2020-06-03T15:10:58.987+00:00 - TRACE - Worker::sleep; worker=WorkerId(0)
2-2020-06-03T15:10:58.987+00:00 - TRACE -   sleeping -- push to stack; idx=0
2-2020-06-03T15:10:58.987+00:00 - TRACE -     -> starting to sleep; idx=0
2-2020-06-03T15:10:58.987+00:00 - TRACE - loop process - 0 events, 0.000s
2-2020-06-03T15:10:58.987+00:00 - TRACE - event Readable Token(4194303)
2-2020-06-03T15:10:58.987+00:00 - TRACE - loop process - 1 events, 0.000s
2-2020-06-03T15:10:58.987+00:00 - TRACE -     -> wakeup; idx=2
2-2020-06-03T15:10:58.987+00:00 - TRACE - Worker::sleep; worker=WorkerId(3)
2-2020-06-03T15:10:58.987+00:00 - TRACE -   sleeping -- push to stack; idx=3
2-2020-06-03T15:10:58.987+00:00 - TRACE -     -> starting to sleep; idx=3
2-2020-06-03T15:10:58.987+00:00 - TRACE - event Readable | Writable Token(109051905)
2-2020-06-03T15:10:58.987+00:00 - TRACE - Notifier::notify; id=0x7f65440009d0
2-2020-06-03T15:10:58.987+00:00 - TRACE -     -> submit internal; idx=3
2-2020-06-03T15:10:58.987+00:00 - TRACE - signal_work -- notify; idx=3
2-2020-06-03T15:10:58.987+00:00 - TRACE - loop process - 1 events, 0.000s
2-2020-06-03T15:10:58.988+00:00 - TRACE - Task::run; state=Running
2-2020-06-03T15:10:58.988+00:00 - TRACE - Conn::read_head
2-2020-06-03T15:10:58.988+00:00 - DEBUG - read 510 bytes
2-2020-06-03T15:10:58.988+00:00 - TRACE - Request.parse([Header; 100], [u8; 510])
2-2020-06-03T15:10:58.988+00:00 - TRACE - Request.parse Complete(510)
2-2020-06-03T15:10:58.988+00:00 - DEBUG - parsed 13 headers
2-2020-06-03T15:10:58.988+00:00 - DEBUG - incoming body is empty
2-2020-06-03T15:10:58.988+00:00 - TRACE - remote disabling keep-alive
2-2020-06-03T15:10:58.988+00:00 - INFO - handle GET /block/0000000000000000000bc32e2c2d44c4a60fbbf26f2e5a6a6c8bdeea16edbf0c/txs/0
2-2020-06-03T15:10:58.988+00:00 - TRACE - Worker::sleep; worker=WorkerId(2)
2-2020-06-03T15:10:58.988+00:00 - TRACE -   sleeping -- push to stack; idx=2
2-2020-06-03T15:10:58.988+00:00 - TRACE -     -> starting to sleep; idx=2
2-2020-06-03T15:10:58.988+00:00 - TRACE - loop process - 0 events, 0.000s
2-thread 'tokio-runtime-worker-0' panicked at 'failed to parse block txids: Custom("invalid length 64, expected 32")', src/new_index/schema.rs:373:28
2-stack backtrace:
2-   0:     0x55ab8060e076 - <unknown>
2-   1:     0x55ab803bd25c - <unknown>
2-   2:     0x55ab8060d8e6 - <unknown>
2-   3:     0x55ab8060d5cb - <unknown>
2-   4:     0x55ab8060cf4f - <unknown>
2-   5:     0x55ab8060cb2a - <unknown>
2-   6:     0x55ab803baf00 - <unknown>
2-   7:     0x55ab803c15e2 - <unknown>
2-   8:     0x55ab8042a14a - <unknown>
2-   9:     0x55ab804dfa9a - <unknown>
2-  10:     0x55ab804dbe2b - <unknown>
2-  11:     0x55ab804b09ac - <unknown>
2-  12:     0x55ab804a80d5 - <unknown>
2-  13:     0x55ab804a6ecc - <unknown>
2-  14:     0x55ab80655907 - <unknown>
2-  15:     0x55ab80650ffb - <unknown>
2-  16:     0x55ab806458df - <unknown>
2-  17:     0x55ab8065072f - <unknown>
2-  18:     0x55ab8065046d - <unknown>
2-  19:     0x55ab8061ad2e - <unknown>
2-  20:     0x55ab8061c1b8 - <unknown>
2-  21:     0x7f6592660fa3 - start_thread
2-  22:     0x7f65925774cf - clone
2-  23:                0x0 - <unknown>

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

thread 'main' panicked at 'missing mempool tx feeinfo #74
If you don't pre-cache, this means that the first user to request a popular address would experience some delay while the server is...
Read more >
rust - How can I cause a panic on a thread to immediately end ...
The panic is never "panicked back" to the main thread. Or do you really mean that you need the whole process to stop...
Read more >
Configuration settings - Operations Manual - Neo4j
This page provides a complete reference to the Neo4j configuration settings.
Read more >
Hey Rustaceans! Got an easy question? Ask here (10/2021)!
Mystified about strings? Borrow checker have you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been ......
Read more >
Ask HN: First month job anxiety. Am I actually an impostor?
This precaching of resources allows for faster processing time which you perceive as increased mental clarity. 2. You're scared to ask ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found