ralfbiedert / openh264-rs

Idiomatic Rust wrappers around OpenH264.
68 stars 35 forks source link

Investigate why CI tests fail #1

Closed ralfbiedert closed 3 years ago

ralfbiedert commented 3 years ago

When running cargo test on 4 different machines I own, 2 of which Linux, the unit tests always succeed like so (don't mind the debug output):

rustc 1.54.0 (a178d0322 2021-07-26)
binary: rustc
commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633
commit-date: 2021-07-26
host: x86_64-unknown-linux-gnu
release: 1.54.0
LLVM version: 12.0.1

running 5 tests
[...]
[OpenH264] this = 0x0x7f97a8000bf0, Info:CWelsDecoder::SetOption for ERROR_CON_IDC = 0.
[OpenH264] this = 0x0x7f97a8000bf0, Info:WelsRequestMem(): memory alloc size = 512 * 512, ref list size = 2
[...]
test can_decode_single ... ok

However, when running cargo test from Github Actions CI, all decoder tests persistently fail:

rustc 1.54.0 (a178d0322 2021-07-26)
binary: rustc
commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633
commit-date: 2021-07-26
host: x86_64-unknown-linux-gnu
release: 1.54.0
LLVM version: 12.0.1

running 5 tests
[OpenH264] this = 0x0x5643649f6c10, Info:CWelsDecoder::SetOption for ERROR_CON_IDC = 0.
[OpenH264] this = 0x0x5643649f6c10, Info:decode failed, failure type:4 

test can_decode_multi_by_step ... FAILED
[OpenH264] this = 0x0x5643649f6c10, Info:CWelsDecoder::UninitDecoderCtx(), openh264 codec version = openh264 default: 1.4.
[OpenH264] this = 0x0x5643649f6c10, Info:CWelsDecoder::UninitDecoder(), verify memory usage (0 bytes) after free..
[OpenH264] this = 0x0x5643649f6c10, Info:CWelsDecoder::~CWelsDecoder()
[OpenH264] this = 0x0x5643649f72f0, Info:CWelsDecoder::SetOption for ERROR_CON_IDC = 0.
test can_decode_multi_to_end ... FAILED
[OpenH264] this = 0x0x5643649f72f0, Info:decode failed, failure type:4 
test can_decode_single ... FAILED

[..]

failures:
    can_decode_multi_by_step
    can_decode_multi_to_end
    can_decode_single

test result: FAILED. 2 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

There is no clear reason why that happens. Interestingly, on my local machines it manages to allocate decoder memory as indicated by this log

[OpenH264] this = 0x0x7f97a0000bf0, Info:WelsRequestMem(): memory alloc size = 512 * 512, ref list size = 2

On CI that line is never printed. However, I don't know if that is related to the source of the problem, or just a side effect.