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

crash when swap_manager init times out #9478

Open
accumulator opened this issue Jan 24, 2025 · 0 comments
Open

crash when swap_manager init times out #9478

accumulator opened this issue Jan 24, 2025 · 0 comments

Comments

@accumulator
Copy link
Member

accumulator commented Jan 24, 2025

see

def initialize_swap_manager(self, transport):
sm = self.wallet.lnworker.swap_manager
if not sm.is_initialized.is_set():
async def wait_until_initialized():
try:
await asyncio.wait_for(sm.is_initialized.wait(), timeout=5)
except asyncio.TimeoutError:
return

results in

  4.63 | I | submarine_swaps.NostrTransport | starting nostr transport with pubkey: 464e1f8f51556548f7c467b8d22e7f2b457cccf20aaec3c6a0fa7211866e49be
  4.63 | I | submarine_swaps.NostrTransport | nostr relays: ['wss://nos.lol', 'wss://relay.damus.io', 'wss://brb.io', 'wss://nostr.mom']
  4.83 | I | submarine_swaps.NostrTransport | connected relays: []

...


21.30 | I | submarine_swaps.NostrTransport | shutting down nostr transport
 21.30 | I | submarine_swaps.NostrTransport | taskgroup stopped.
 21.30 | E | submarine_swaps.NostrTransport | Exception in stop: ValueError('Set of Tasks/Futures is empty.')
Traceback (most recent call last):
  File "/home/sander/projects/electrum/electrum/electrum/util.py", line 1198, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sander/projects/electrum/electrum/electrum/submarine_swaps.py", line 1362, in stop
    await self.relay_manager.close()
  File "/home/sander/projects/electrum/electrum/packages/electrum_aionostr/relay.py", line 215, in close
    await self.broadcast('close', self.taskgroup)
  File "/home/sander/projects/electrum/electrum/packages/electrum_aionostr/relay.py", line 201, in broadcast
    return await asyncio.wait(results, return_when=asyncio.ALL_COMPLETED)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/tasks.py", line 454, in wait
    raise ValueError('Set of Tasks/Futures is empty.')
ValueError: Set of Tasks/Futures is empty.
 21.30 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/sander/projects/electrum/electrum/electrum/gui/qt/channels_list.py", line 370, in <lambda>
    menu.addAction(read_QIcon('update.png'), _('Submarine swap'), lambda: self.main_window.run_swap_dialog())
                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sander/projects/electrum/electrum/electrum/gui/qt/main_window.py", line 1178, in run_swap_dialog
    with transport:
         ^^^^^^^^^
  File "/home/sander/projects/electrum/electrum/electrum/submarine_swaps.py", line 1327, in __exit__
    fut.result(timeout=5)
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/sander/projects/electrum/electrum/electrum/util.py", line 1198, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sander/projects/electrum/electrum/electrum/submarine_swaps.py", line 1362, in stop
    await self.relay_manager.close()
  File "/home/sander/projects/electrum/electrum/packages/electrum_aionostr/relay.py", line 215, in close
    await self.broadcast('close', self.taskgroup)
  File "/home/sander/projects/electrum/electrum/packages/electrum_aionostr/relay.py", line 201, in broadcast
    return await asyncio.wait(results, return_when=asyncio.ALL_COMPLETED)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/tasks.py", line 454, in wait
    raise ValueError('Set of Tasks/Futures is empty.')
ValueError: Set of Tasks/Futures is empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant