Object processor queue starts too early #1702

Closed
opened 2021-01-03 11:01:44 +01:00 by PeterSurda · 0 comments
PeterSurda commented 2021-01-03 11:01:44 +01:00 (Migrated from github.com)

Received a report. Looks like objectProcessor starts before sqlThread is ready. I can't actually reproduce it, it probably only happens ~if the objectProcessorQueue isn't empty~ under non-deterministic conditions. The problem was revealed in 184664d758. The solution is for the objectProcessor.__init__ to wait for the helper_sql.sql_ready event.

2021-01-03 06:30:31,908 - CRITICAL - Unhandled exception
Traceback (most recent call last):
  File "Documents/Software/PyBitmessage/src/bitmessagemain.py", line 491, in <module>
  File "Documents/Software/PyBitmessage/src/bitmessagemain.py", line 487, in main
  File "Documents/Software/PyBitmessage/src/bitmessagemain.py", line 286, in start
  File "/home/*****/Documents/Software/PyBitmessage/src/class_objectProcessor.py", line 54, in __init__
    '''SELECT objecttype, data FROM objectprocessorqueue''')
  File "/home/*****/Documents/Software/PyBitmessage/src/helper_sql.py", line 44, in sqlQuery
    assert sql_available
AssertionError
Number of threads: 1

Operating system is Ubuntu 18.04.5 LTS 32-bit.
Received a report. Looks like `objectProcessor` starts before `sqlThread` is ready. I can't actually reproduce it, it probably only happens ~if the `objectProcessorQueue` isn't empty~ under non-deterministic conditions. The problem was revealed in 184664d7583096e6cd7b828e08d112ff1727d81b. The solution is for the `objectProcessor.__init__` to wait for the `helper_sql.sql_ready` event. ``` 2021-01-03 06:30:31,908 - CRITICAL - Unhandled exception Traceback (most recent call last): File "Documents/Software/PyBitmessage/src/bitmessagemain.py", line 491, in <module> File "Documents/Software/PyBitmessage/src/bitmessagemain.py", line 487, in main File "Documents/Software/PyBitmessage/src/bitmessagemain.py", line 286, in start File "/home/*****/Documents/Software/PyBitmessage/src/class_objectProcessor.py", line 54, in __init__ '''SELECT objecttype, data FROM objectprocessorqueue''') File "/home/*****/Documents/Software/PyBitmessage/src/helper_sql.py", line 44, in sqlQuery assert sql_available AssertionError Number of threads: 1 Operating system is Ubuntu 18.04.5 LTS 32-bit. ```
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-20#1702
No description provided.