Skip to content

MASA 2TC encoder crashes on 24.4 kbps using max band WB with LTV

Basic info

  • Commit SHA: main since e579181d
  • Platform: all

Bug description

This was revealed first in complexity run using the new LTV https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/165317

Seems that there is a crash when the new long test vectors are used and MASA is run at 24.4 kbps with max band defined as WB.

Edit: Looking a bit further and running with sanitisers, this seems to point to IGF. This is the result I get from Clang memory sanitizer

Frames processed:       319     MemorySanitizer:DEADLYSIGNAL
==719670==ERROR: MemorySanitizer: SEGV on unknown address 0x000000000128 (pc 0x000000ae4d71 bp 0x7ffc3e6dabf0 sp 0x7ffc3e6dab60 T719670)
==719670==The signal is caused by a READ memory access.
==719670==Hint: address points to the zero page.
    #0 0xae4d71 in IGF_UpdateInfo /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/igf_enc.c:1584:42
    #1 0xafc499 in IGFSaveSpectrumForITF /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/igf_enc.c:2002:5
    #2 0x94c9b4 in ProcessIGF /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/tcx_utils_enc.c:1470:5
    #3 0xa96eee in core_signal_analysis_high_bitrate /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/ext_sig_ana.c:444:17
    #4 0x7baed4 in stereo_tcx_core_enc /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/ivas_tcx_core_enc.c:304:5
    #5 0xb20b85 in ivas_core_enc /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/ivas_core_enc.c:258:13
    #6 0xb61b69 in ivas_cpe_enc /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/ivas_cpe_enc.c:690:20
    #7 0x599959 in ivas_enc /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/ivas_enc.c:265:28
    #8 0x4e9c02 in IVAS_ENC_EncodeFrameToSerial /home/pihlajam/workProjects/ivas-pc-direct/lib_enc/lib_enc.c:1339:24
    #9 0x4c8b5b in main /home/pihlajam/workProjects/ivas-pc-direct/apps/encoder.c:769:24
    #10 0x7fd4c24aa082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #11 0x44353d in _start (/home/pihlajam/workProjects/ivas-pc-direct/build-msan/IVAS_cod+0x44353d)

As there has been some merges with IGF lately, I tested if some of them could have introduced this. It seems the !1029 (merged) has caused this. The commit e579181d in main (contains the merge result) is crashing but the previous commit d2236273 does not crash. Thus, I believe that the allocation scheme might not be working correctly.

Ways to reproduce

Get the long test vector ltv48_MASA2TC.[met|wav] from the long test vector repo, e.g., here https://forge.3gpp.org/rep/ivas-codec-pc/ivas-pc-testfiles/-/tree/longer-testv-on-runners?ref_type=heads

and run, e.g., this

/IVAS_cod -masa 2 ltv48_MASA2TC.met -max_band WB 24400 48 ltv48_MASA2TC.wav debug.bts
Edited by Tapani Pihlajakuja