hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.03k stars 172 forks source link

Failing sample export test in macOS pipeline #1820

Closed theGreatWhiteShark closed 4 months ago

theGreatWhiteShark commented 1 year ago

Since quite a while we have sporadic failures in the macOS pipeline due to the sample export test hanging and the build being terminated because of a timeout.

After introducing a number of debug messages (#1766, #1790, #1814 among others) the problem was narrowed down to: the separate thread of the DiskWriterDriver is not able to acquire the lock for the audio engine (for more than 50 minutes!) and the unit test waits for the EVENT_PROGRESS of value 100 indefinitely.

Now, there are two separate things that need to be addressed here:

  1. The thread of the DiskWriterDriver needs to be able to indicate failure, like not being able to lock the audio engine, being unable to open/write to file etc.
  2. The (what looks like a) deadlock in the AudioEngine has to be tracked down. No idea yet where this could be coming from.
theGreatWhiteShark commented 1 year ago

Turns out the deadlock was caused because the DiskWriterDriver was stopped while still exporting a song (see #1826).

This lead to the question: why didn't Hydrogen wait long enough for the export to finish?

theGreatWhiteShark commented 4 months ago

I haven't seen this one in a while. I think it is resolved.