Skip to content

Conversation

@iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Jan 31, 2026

Checked also manually in Desktop on top of 2631745. I.e. the bug is reproducible with pre-messages as well.

Fix #7684

@iequidoo iequidoo force-pushed the iequidoo/download_msg-another-transport branch from 58a4ab7 to 86e446f Compare February 1, 2026 00:47
@iequidoo iequidoo changed the title fix: Don't set message download state to Failure if it's available on transport of another Session (#7684) fix: Don't set download state to Failure if message is available on another Session's transport (#7684) Feb 1, 2026
@iequidoo iequidoo force-pushed the iequidoo/download_msg-another-transport branch from 86e446f to 5b0ad60 Compare February 1, 2026 01:01
@iequidoo
Copy link
Collaborator Author

iequidoo commented Feb 1, 2026

test_transport_sync_new_as_primary failed: https://github.com/chatmail/core/actions/runs/21553875689/job/62107087345?pr=7794

...
        log.section("ac1_clone receives a message via the new primary transport")
        ac1_chat = ac1.create_chat(bob)
        ac1_chat.send_text("Hello!")
>       bob_chat_id = bob.wait_for_incoming_msg_event().chat_id
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_multitransport.py:263: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py/lib/python3.14/site-packages/deltachat_rpc_client/account.py:414: in wait_for_incoming_msg_event
    return self.wait_for_event(EventType.INCOMING_MSG)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py/lib/python3.14/site-packages/deltachat_rpc_client/account.py:35: in wait_for_event
    next_event = AttrDict(self._rpc.wait_for_event(self.id))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py/lib/python3.14/site-packages/deltachat_rpc_client/rpc.py:173: in wait_for_event
    return queue.get()
           ^^^^^^^^^^^
/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/queue.py:199: in get
    self.not_empty.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Condition(<unlocked _thread.lock object at 0x10321ae90>, 0)>
timeout = None

    def wait(self, timeout=None):
        """Wait until notified or until a timeout occurs.
    
        If the calling thread has not acquired the lock when this method is
        called, a RuntimeError is raised.
    
        This method releases the underlying lock, and then blocks until it is
        awakened by a notify() or notify_all() call for the same condition
        variable in another thread, or until the optional timeout occurs. Once
        awakened or timed out, it re-acquires the lock and returns.
    
        When the timeout argument is present and not None, it should be a
        floating-point number specifying a timeout for the operation in seconds
        (or fractions thereof).
    
        When the underlying lock is an RLock, it is not released using its
        release() method, since this may not actually unlock the lock when it
        was acquired multiple times recursively. Instead, an internal interface
        of the RLock class is used, which really unlocks it even when it has
        been recursively acquired several times. Another internal interface is
        then used to restore the recursion level when the lock is reacquired.
    
        """
        if not self._is_owned():
            raise RuntimeError("cannot wait on un-acquired lock")
        waiter = _allocate_lock()
        waiter.acquire()
        self._waiters.append(waiter)
        saved_state = self._release_save()
        gotit = False
        try:    # restore state no matter what (e.g., KeyboardInterrupt)
            if timeout is None:
>               waiter.acquire()
E               Failed: Timeout (>300.0s) from pytest-timeout.
...
DEBUG    root:rpc.py:164 account_id=2 got an event {'kind': 'Info', 'msg': 'src/configure.rs:265: Configure ...'}
... (no logs with account_id=2 here)
========== ac1_clone receives a message via the new primary transport ==========
DEBUG    root:rpc.py:164 account_id=2 got an event {'kind': 'Info', 'msg': 'src/key.rs:331: Generating keypair.'}
DEBUG    root:rpc.py:164 account_id=2 got an event {'kind': 'AccountsItemChanged'}
DEBUG    root:rpc.py:164 account_id=2 got an event {'kind': 'Info', 'msg': 'src/key.rs:337: Keypair generated in 0s.'}
...

Not related to this PR of course. I.e. inner_configure() hung for bob.

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

Successfully merging this pull request may close these issues.

pending-download messages fail with multi-relay

2 participants