macOS: melt occasionally never exits after the avformat consumer thread is gone
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 1.9k
- フォーク
- 397
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 16
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mltframework/mlt のほかの issue
-
confirmed crash workaround
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
mltframework/mlt#1200 · コメント 6 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
mltframework/mlt#1168 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
There may be an error when disconnecting a filter service from the field対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
mltframework/mlt#1058 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
mltframework/mlt#1056 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
mltframework/mlt#984 ·
メンテナーはふだん 1 日以内に返信
mltframework/mlt の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JustAResearcher/gpu-unlock-ada#145 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
-
bug mod: circuit
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
area:tools type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Offline trigger silently replaces an existing /system-update link from another tool (dnf5 offline)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PackageKit/PackageKit#1040 ·
メンテナーはふだん 1 日以内に返信