Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault on shaka::Period::GetAdaptationSets() #1172

Closed
murillo128 opened this issue Feb 10, 2023 · 1 comment · Fixed by #1173 or #1312
Closed

Segmentation fault on shaka::Period::GetAdaptationSets() #1172

murillo128 opened this issue Feb 10, 2023 · 1 comment · Fixed by #1173 or #1312
Labels
priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly

Comments

@murillo128
Copy link
Contributor

System info

Ubunto 22.04
Shaka Packager Version: d5ca6e8

Issue and steps to reproduce the problem

This happened on a production server, not sure what have been the exact conditions for reproducing the problem.

This is the back trace of the segmentation fault:

Thread 1 (Thread 0x7fb207d7f7c0 (LWP 1825)):
#0  0x00007fb1ee344894 in shaka::Period::GetAdaptationSets[abi:cxx11]() const () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node
#1  0x00007fb1ee1d4e36 in shaka::MpdBuilder::GetEarliestTimestamp(double*) () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node
#2  0x00007fb1ee1d60ad in shaka::MpdBuilder::AddDynamicMpdInfo(shaka::xml::XmlNode*) () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node
#3  0x00007fb1ee1d7145 in shaka::MpdBuilder::GenerateMpd() () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node
#4  0x00007fb1ee1d7466 in shaka::MpdBuilder::ToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node
#5  0x00007fb1ee1d455e in shaka::WriteMpdToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, shaka::MpdBuilder*) () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node
#6  0x00007fb1ee1cb00d in shaka::SimpleMpdNotifier::Flush() () from /opt/millicast/bin/medooze/node_modules/medooze-shaka-packager/build/Release/medooze-shaka-packager.node

for (const auto* adaptation_set : periods_.front()->GetAdaptationSets()) {

Somehow the periods are empty, causing the crash. There is a DCHECK in place, but that doesn't prevent the code from crashing.

@murillo128 murillo128 changed the title Segmentation fault on Segmentation fault on shaka::Period::GetAdaptationSets() Feb 10, 2023
@joeyparrish joeyparrish added type: bug Something isn't working correctly priority: P3 Useful but not urgent labels Jul 12, 2023
@joeyparrish
Copy link
Member

It would be best to figure out why periods are empty. This may be an issue with the calls you make into the library. Are you using Packager as a library or via the command-line frontend?

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 12, 2023
@github-actions github-actions bot added this to the Backlog milestone Jul 12, 2023
joeyparrish pushed a commit that referenced this issue Jul 12, 2023
)

While I have not yet found why the periods are empty, this will prevent shaka from seg faulting

Fixes #1172
@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 12, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Sep 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
@cosmin cosmin removed this from the Backlog milestone May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
3 participants