macOS: melt occasionally never exits after the avformat consumer thread is gone
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Begin with the supplied melt command and the reported consumer_is_stopped wait loop; inspect the avformat consumer-thread lifecycle and compare behavior with #1326. Reproduce the arm64 macOS soak using the supplied XML, then capture a sample when it hangs. Done means repeated renders no longer leave melt waiting after the avformat thread is gone.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Split out from #1326, as requested.
Summary. On macOS arm64, about 1 in 250 headless melt renders never exits. melt's main thread stays in its wait loop polling consumer_is_stopped, but the avformat consumer thread is already gone. The render doesn't finish or crash, so it waits forever. We've seen it twice in about 500 renders, once on master (89fbe37) and once on fix-property-locale (99383f4), so #1326's fix doesn't cause it and doesn't cure it.
Setup. This is the soak from #1326. libmlt (framework only) is built from each commit and dropped into its own copy of Shotcut 26.8.1's app bundle. The two copies alternate rendering the same document: an XML with LC_NUMERIC="C" on the root, three avformat-novalidate chains and a color producer. Command:
melt soak.mlt -consumer avformat:out.mp4 vcodec=libx264 crf=18 preset=medium acodec=aac
The runner is GitHub's macos-latest (macOS 26.6.2, arm64), with LANG/LC_ALL = en_US.UTF-8. Each render normally takes 2 to 7 s.
What the hung process looks like. The driver gives each render 60 s, then runs sample on it and kills it. Sample of the branch's hang (render 54 of 200, killed at 66.7 s): https://gist.github.com/tydude001/aa8eb4fa6996ed26134c9b257471f525#file-arm64-hang-99383f4-render54-sample-txt
- Main thread: 2753 of 2756 samples in
main→nanosleep. The rest areSDL_WaitEventTimeoutand oneconsumer_is_stopped→mlt_properties_get_int. That's melt's wait-for-the-consumer loop. - No avformat
consumer_thread, and no slice or encoder worker threads. - Sixteen idle
av:h264:df0–df3decoder threads (four producers' worth), all inpthread_cond_wait. NSEventThreadand one workqueue thread, both idle.- Nothing is in
setlocale, and nothing is blocked on a mutex. - melt's stderr stops right after libx264 opens (the last line is x264's
"dc" option is deprecatedwarning). The footprint is 50 MB, and nothing in the output says how far it got.
So it looks less like a deadlock between two threads and more like the consumer thread exited, or never started encoding, without the consumer ever reporting stopped. My guess is that's a running/joined flag the main loop never sees change, but I haven't confirmed that.
The earlier hang (master, the first arm64 run in #1326) ran for over an hour before I cancelled it, and there was no timeout or sample then. So the sample above is the only stack we have.
Does it need the locale path? We ran stock Shotcut 26.8.1 melt with LC_NUMERIC removed from the document root, so mlt_property_get_string_l_tf never calls setlocale. Result: 0 hangs and 0 crashes in 600 renders (300 under en_US.UTF-8, 300 with LC_NUMERIC=C in the environment). At about 2 in 500, 600 clean renders would happen by chance about 1 time in 10, so that leans toward the hang needing a locale on the document, but it isn't conclusive. It hasn't shown up on the Intel runner (macos-15-intel, 200 renders per build).
I can rerun with more renders per arm, a debug build, or extra logging if that would help.
- Lingua principale
- C
- Stelle
- 1.9k
- Fork
- 397
- Merge medio
- 2g 11h
- PR unite (30g)
- 16
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mltframework/mlt
-
confirmed crash workaround
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
mltframework/mlt#1200 · 6 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mltframework/mlt#1168 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
There may be an error when disconnecting a filter service from the fieldForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
mltframework/mlt#1058 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mltframework/mlt#1056 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Audio not synchronizedAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mltframework/mlt#984 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di mltframework/mlt
Issue simili
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Apertakind/bug priority/medium qa_automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37324 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
meshcore-dev/MeshCore#3781 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
ly05010419/MacNativeGames#1897 ·
I maintainer di solito rispondono entro 1 giorno
-
area: metrics area: tracing contribfest enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
open-telemetry/opentelemetry-ebpf-instrumentation#4188 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno