Skip to content

bitcoind rpc gets stuck in an infinite loop if incorrect password is provided #587

Closed

Description

@rolznz

This is logged continuously, and the whole LDK-node process seems to get stuck.

{"level":"error","line":512,"log_type":"LDK-node","module_path":"ldk_node::chain","msg":"Failed to synchronize chain listeners: BlockSourceError { kind: Persistent, error: Custom { kind: InvalidData, error: \"invalid response length: 0 bytes\" } }","time":"2025-06-25T12:23:59+07:00"}

Activity

  1. tnull commented on Jun 25, 2025

    @tnull
    Collaborator

    Yeah, as mentioned elsewhere this will only happen on regtest, as on mainnet we'd abort early if we're unable to update fee rate estimates. We also have to keep retrying to make progress there, as it's part of initialization of the chain syncing task.
    We could however consider to make the delay larger, and we should see whether we can provide a more conclusive error message (although I'm not sure whether bitcoind RPC provides an 'invalid password' return code that we could lean on here).

    the whole LDK-node process seems to get stuck.

    Could you expand on what 'seems to get stuck' means?

  2. tnull commented on Jun 25, 2025

    @tnull
    Collaborator

    @tosynthegeek indicated interest in working on this.

  3. tosynthegeek commented on Jun 25, 2025

    @tosynthegeek
    Contributor

    @tosynthegeek indicated interest in working on this.

    Yeah sure. Would love to pick this up

  4. rolznz commented on Jun 25, 2025

    @rolznz
    Author

    Could you expand on what 'seems to get stuck' means?

    It's somehow stopping me from being able to exit the process. I have to force-kill it. ctrl+c which normally works fine in our app, just does nothing.

  5. tosynthegeek commented on Jun 26, 2025

    @tosynthegeek
    Contributor

    @tnull please check #588

  6. added 2 commits that reference this issue on Jun 28, 2025
    dac462c
    3954355
  7. rolznz commented on Aug 29, 2025

    @rolznz
    Author

    @tnull can we open this issue? it's still a problem in v0.6.2.

    I'm unable to exit the program without suspending it and using kill -9 %1

  8. tnull commented on Sep 1, 2025

    @tnull
    Collaborator

    @tnull can we open this issue? it's still a problem in v0.6.2.

    Yes, the fix has not been backported to the 0.6 branch, so will likely only land with 0.7.0. Do you mind testing with main to see if the patch changes anything for you?

    I'm unable to exit the program without suspending it and using kill -9 %1

    That is still puzzling to me why the syncing loop would have any influence on signal handling. I really don't want to get into handing signals on our end as it shouldn't be the concern of a library that doesn't know anything about the OS/context/binary it's being used in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions