Skip to content

Background maintenance tasks disabled when running with --ifile option #228

@jketterl

Description

@jketterl

Context: We integrated dump1090 into OpenWebRX (a web-based SDR solution) and it is working fine for the most part. Since OpenWebRX supports a number of different SDR devices and handles them directly, we feed dump1090 with IQ data using the --ifile option (on STDIN).

One problem that we noticed is that after prolonged operation, dump1090 will start printing a decent amount of these error messages:

ICAO hash table full, increase ICAO_FILTER_SIZE

On my test setup this happened somewhere around the second day of continuous operation, but as far as my understanding goes, this would probably depend on the amount of traffic received.

I should probably also mention that the decoder still seemed to be working, at least to the extent that I could not detect any degradation, so the main concern here is probably log spam.

Additional research on the issue:

Some quick research shows that this is related to the logic in icao_filter.c. I'm not really sure what purpose it serves at this point, but the error message shows that icaoFilterAdd() is being called.

In the same file there is a method icaoFilterExpire() with the comment "call this periodically". I found the code that seems to be responsible for calling it in backgroundTasks() in dump1090.c. The problem here is that this particular piece of code is disabled when the input is a file (as is the case in our integration).

With my limited understanding, I went in and removed the condition, and as far as I can tell, the error messages are gone.

One of the questions that eludes me is why these maintenance tasks are disabled in the first place. I do understand that they are probably based on timestamps, so my guess is that they are disabled because they would probably not work correctly when replaying an actual file (at a higher-than-realtime rate). I am not sure if there is any harm in simply removing the condition, but if there's not that would certainly make for an easy solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions