Skip to content

playlist/fetcher races with playlist/preparser and/or playback

The art fetcher cannot do what it is supposed to do until metadata associated with the input is available (artist, title, album).

If the fetcher starts working on an entity before the previously mentioned data is available, the input will not receive any additional metadata (even if such would have been available if the fetcher was triggered after the meta readers).

How to reproduce

This race is quite difficult to reproduce given the current state of the codebase, but it's there and happens every once in a while if one is paying attention.

One way to pretty much force it to happen is to introduce a sleep in src/input/input.c:InputSourceMeta prior to initializing the relevant meta reader-module; meaning that the fetcher is more or less guaranteed to handle the entity before any metadata is available.

It is very advisable to enable --metadata-network-access since it is then very easy to see whether or not the fetcher is making any requests or not.

Note

Introducing a sleep is equivalent to a meta reader that takes a long time to finish, which can be for several reasons (such as slow IO).

Forcing the IO to be so slow that the fetcher has time to finish the current input before the meta readers are done is another way of consistently reproducing this issue.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information