Skip to content

Bandpass fails to stop every now and then #10

@luarvique

Description

@luarvique

On very rare occassions, OpenWebRX fails to show connecting user the waterfall, while the background services continue running. The analysis of the situation with GDB has shown the following:

  1. SDR source fails to start for the user because of modificationLock taken by a previous attempt to stop this same SDR source.

  2. The previous SDR stop is being caused by the scheduler shutting down an FT8 service.

  3. Tracking down where it hangs shows the following:

(gdb) py-bt
Traceback (most recent call first):
  File "/usr/lib/python3/dist-packages/csdr/chain/__init__.py", line 139, in stop
    w.stop()
  File "/usr/lib/python3/dist-packages/csdr/chain/__init__.py", line 139, in stop
    w.stop()
  File "/usr/lib/python3/dist-packages/owrx/service/__init__.py", line 106, in stopServices
    service.stop()
  File "/usr/lib/python3/dist-packages/owrx/service/__init__.py", line 76, in onStateChange
    self.stopServices()
  File "/usr/lib/python3/dist-packages/owrx/source/__init__.py", line 579, in setState
    c.onStateChange(state)
  File "/usr/lib/python3/dist-packages/owrx/source/__init__.py", line 474, in stop
    self.setState(SdrSourceState.STOPPING)
  File "/usr/lib/python3/dist-packages/owrx/source/connector.py", line 66, in stop
    super().stop()
  File "/usr/lib/python3/dist-packages/owrx/source/__init__.py", line 539, in checkStatus
    self.stop()
  File "/usr/lib/python3/dist-packages/owrx/service/schedule.py", line 293, in _setCurrentEntry
    self.source.checkStatus()
  File "/usr/lib/python3/dist-packages/owrx/service/schedule.py", line 306, in selectProfile
  1. The native code where it hangs is inside CSDR:
#4  0x0000ffffa13e32a0 in std::thread::join() () from /lib/aarch64-linux-gnu/libstdc++.so.6
#5  0x0000ffffa15a385c in Csdr::AsyncRunner::stop() () from /lib/aarch64-linux-gnu/libcsdr++.so.0.18
  1. And the hanging module is Bandpass, that is inside Selector, that is inside ServiceSelectorChain for FT8:
(gdb) py-print w
local 'w' = <pycsdr.modules.Bandpass at remote 0xffffa0b7ad30>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions