mediasoup: SeqManager::SeqLowerThan() crashes when used as compare function in abseil set or map (only in debug mode)

This happens very rarely. I can’t reproduce it nor attach core dump for now. But i have located it at:

https://github.com/versatica/mediasoup/blob/v3/worker/src/RTC/NackGenerator.cpp#L119

I can repoduce similar crash separatedly from worker in this sample:

absl::btree_set<uint16_t, SeqManager<uint16_t>::SeqLowerThan> recoveredList;

recoveredList.insert(10000);
recoveredList.insert(40000);
recoveredList.insert(60000);

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 24 (18 by maintainers)

Commits related to this issue

Most upvoted comments

Looks like std::set imposes same requirements on compare function

if comp(a, b) == true and comp(b, c) == true then comp(a, c) == true. 

I think i got it. I build and run it in debug mode, so assert is not optimized away and crashes.