Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue after restarting liana (regtest) #1535

Open
nondiremanuel opened this issue Jan 13, 2025 · 1 comment
Open

Issue after restarting liana (regtest) #1535

nondiremanuel opened this issue Jan 13, 2025 · 1 comment
Labels
Bug Something isn't working as expected

Comments

@nondiremanuel
Copy link
Collaborator

The following issue has been hit after restarting Liana in regtest environment:

❯ liana-gui                                                                                              08:25:22
  2025-01-12T07:25:34.004694Z  INFO liana_gui::daemon::client:48: getinfo

  2025-01-12T07:25:34.005098Z ERROR liana_gui::daemon::client:50: method getinfo failed: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

  2025-01-12T07:25:34.017176Z  INFO lianad::bitcoin::d:288: Checking the connection to bitcoind.

  2025-01-12T07:25:34.018135Z  WARN lianad::bitcoin::d:369: Transient error when sending request to bitcoind: Bitcoind RPC server error: transport error: minreq: Connection refused (os error 111)

  2025-01-12T07:26:40.801214Z  INFO liana_gui::daemon::client:48: getinfo

  2025-01-12T07:26:40.801357Z ERROR liana_gui::daemon::client:50: method getinfo failed: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

  2025-01-12T07:26:40.813268Z  INFO lianad::bitcoin::d:288: Checking the connection to bitcoind.

  2025-01-12T07:26:40.825555Z  INFO lianad::bitcoin::d:290: Connection to bitcoind checked.

  2025-01-12T07:26:40.829685Z  INFO lianad:287: Loading our watchonly wallet on bitcoind.

  2025-01-12T07:26:40.835074Z  INFO lianad:290: Watchonly wallet loaded on bitcoind and sanity checked.

  2025-01-12T07:26:40.835139Z  INFO lianad::database::sqlite:162: Checking if the database needs upgrading.

  2025-01-12T07:26:40.837076Z  INFO lianad::database::sqlite::utils:501: Database is up to date.

  2025-01-12T07:26:40.843027Z  INFO lianad:240: Database initialized and checked.

  2025-01-12T07:26:40.843357Z  INFO lianad:490: Bitcoin poller started.

  2025-01-12T07:26:40.844060Z  INFO lianad::bitcoin::poller:133: Block chain synchronization progress: 100.00% (4588 blocks / 4588 headers)
❯ liana-gui                                                                                              08:25:22
  2025-01-12T07:25:34.004694Z  INFO liana_gui::daemon::client:48: getinfo

  2025-01-12T07:25:34.005098Z ERROR liana_gui::daemon::client:50: method getinfo failed: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

  2025-01-12T07:25:34.017176Z  INFO lianad::bitcoin::d:288: Checking the connection to bitcoind.

  2025-01-12T07:25:34.018135Z  WARN lianad::bitcoin::d:369: Transient error when sending request to bitcoind: Bitcoind RPC server error: transport error: minreq: Connection refused (os error 111)

  2025-01-12T07:26:40.801214Z  INFO liana_gui::daemon::client:48: getinfo

  2025-01-12T07:26:40.801357Z ERROR liana_gui::daemon::client:50: method getinfo failed: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })

  2025-01-12T07:26:40.813268Z  INFO lianad::bitcoin::d:288: Checking the connection to bitcoind.

  2025-01-12T07:26:40.825555Z  INFO lianad::bitcoin::d:290: Connection to bitcoind checked.

  2025-01-12T07:26:40.829685Z  INFO lianad:287: Loading our watchonly wallet on bitcoind.

  2025-01-12T07:26:40.835074Z  INFO lianad:290: Watchonly wallet loaded on bitcoind and sanity checked.

  2025-01-12T07:26:40.835139Z  INFO lianad::database::sqlite:162: Checking if the database needs upgrading.

  2025-01-12T07:26:40.837076Z  INFO lianad::database::sqlite::utils:501: Database is up to date.

  2025-01-12T07:26:40.843027Z  INFO lianad:240: Database initialized and checked.

  2025-01-12T07:26:40.843357Z  INFO lianad:490: Bitcoin poller started.

  2025-01-12T07:26:40.844060Z  INFO lianad::bitcoin::poller:133: Block chain synchronization progress: 100.00% (4588 blocks / 4588 headers)

  2025-01-12T07:26:40.856463Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:40.857722Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }

  2025-01-12T07:26:40.857745Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:40.858163Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:40.858447Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }


[...]


  2025-01-12T07:26:47.855076Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:47.855676Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:47.856602Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }

  2025-01-12T07:26:47.856680Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:47.857548Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:47.857929Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }

  2025-01-12T07:26:47.857955Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:47.858359Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

zsh: segmentation fault (core dumped)  liana-gui
  2025-01-12T07:26:40.856463Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:40.857722Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }

  2025-01-12T07:26:40.857745Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:40.858163Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:40.858447Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }


[...]


  2025-01-12T07:26:47.855076Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:47.855676Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:47.856602Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }

  2025-01-12T07:26:47.856680Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:47.857548Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

  2025-01-12T07:26:47.857929Z  WARN lianad::bitcoin::d:1008: Error when fetching block header 107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9: Bitcoind RPC server error: RPC error response: RpcError { code: -5, message: "Block not found", data: None }

  2025-01-12T07:26:47.857955Z ERROR lianad::bitcoin::poller::looper:234: Failed to get common ancestor for tip '(4608,107bf178d8e965076d007ad46bc151f389c1f3c33f87860a61d8baaf1ae772a9)'. Starting over.

  2025-01-12T07:26:47.858359Z  INFO lianad::bitcoin::poller::looper:225: Block chain reorganization detected. Looking for common ancestor.

zsh: segmentation fault (core dumped)  liana-gui

It seems to be a segmentation fault (not panic) possibly related to some memory leak:

i think the issue is related to regtest, but it show something weird happening:

  • the block is not found during a "reorg" (but i don't reorg, just restart), but we continue trying get this block...
  • I guess we make a huge amount of request, allocating lot of memory and get kicked by the OS

It is worth digging into it to better evaluate the source of the issue.

@nondiremanuel nondiremanuel added the Bug Something isn't working as expected label Jan 13, 2025
@nondiremanuel nondiremanuel moved this to Todo in Liana General Jan 13, 2025
@pythcoiner
Copy link
Collaborator

note: happend after a recovery sweep brodcasted but no block generated then my full machine restarted (machine + bitcoind + liana-gui)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as expected
Projects
Status: To be discussed / defined
Development

No branches or pull requests

2 participants