spesmilo / spesmilo/electrum

AssertionError: (6379, 7393)

Open
#8,664 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-walletstorage 💾
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Crash Report

This crash report was reported through the automatic crash reporting system 🤖

Traceback

Traceback (most recent call last):
  File "/home/jolovic/Desktop/new_electrum/electrum/gui/qt/main_window.py", line 2603, in closeEvent
    self.clean_up()
  File "/home/jolovic/Desktop/new_electrum/electrum/gui/qt/main_window.py", line 2633, in clean_up
    self.gui_object.close_window(self)
  File "/home/jolovic/Desktop/new_electrum/electrum/gui/qt/__init__.py", line 481, in close_window
    self.daemon.stop_wallet(window.wallet.storage.path)
  File "/home/jolovic/Desktop/new_electrum/electrum/daemon.py", line 546, in stop_wallet
    return fut.result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/jolovic/Desktop/new_electrum/electrum/daemon.py", line 555, in _stop_wallet
    await wallet.stop()
  File "/home/jolovic/Desktop/new_electrum/electrum/wallet.py", line 468, in stop
    self.save_db()
  File "/home/jolovic/Desktop/new_electrum/electrum/wallet.py", line 403, in save_db
    self.db.write()
  File "/home/jolovic/Desktop/new_electrum/electrum/json_db.py", line 48, in wrapper
    return func(self, *args, **kwargs)
  File "/home/jolovic/Desktop/new_electrum/electrum/json_db.py", line 389, in write
    self._append_pending_changes()
  File "/home/jolovic/Desktop/new_electrum/electrum/json_db.py", line 48, in wrapper
    return func(self, *args, **kwargs)
  File "/home/jolovic/Desktop/new_electrum/electrum/json_db.py", line 400, in _append_pending_changes
    self.storage.append(s)
  File "/home/jolovic/Desktop/new_electrum/electrum/storage.py", line 111, in append
    assert pos == self.pos, (self.pos, pos)
AssertionError: (6379, 7393)

AssertionError: (6379, 7393)

Reporter

This issue was reported by 10 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
4.4.3-570-gfac515332-dirty 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] Linux-5.15.0-86-generic-x86_64-with-glibc2.35 standard,2of2 en_US
4.4.7 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 standard,imported en_US
4.4.7 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported en_US
4.4.7 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported en_US
4.4.7 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported en_US
4.4.7 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported en_US
4.5.0 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22635-SP0 imported en_US
4.5.0 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22635-SP0 imported en_US
4.5.0 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22635-SP0 imported en_US
4.5.0 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22635-SP0 imported en_US

Additional Information

The reporting user(s) did not provide additional information.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading electrum/storage.py around append and electrum/json_db.py around write and _append_pending_changes, using the traceback to trace the position mismatch. Then inspect the wallet shutdown path through electrum/wallet.py and daemon.py. Done means closing affected wallets no longer raises AssertionError: (6379, 7393).

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.