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

Crash in iceloop with Streaming Demo, while using Alpine distribution #907

Closed
nswarnkar opened this issue May 26, 2017 · 11 comments
Closed

Comments

@nswarnkar
Copy link

nswarnkar commented May 26, 2017

Hi,
I am using Alpine distribution(inside docker environment). While every stuff works with Ubuntu docker, but with Alpine I am getting crash always.

Following is backtrace.
https://pastebin.com/embed_js/RUPVgySh

I have taken latest janus code dated 26-May-2017.
I have taken glib 2.44 release, libnice being latest.

Here is sample build scripts(inside docker), which I used:

https://pastebin.com/7B5UvT1p

Please suggest or if any more information is needed, please let me know.

@lminiero
Copy link
Member

As explained in the guidelines, please DO NOT paste huge bunches of text inline. That's what gist/pastebin are for. It's also written clearly in the text you deleted to write your own...

@nswarnkar
Copy link
Author

nswarnkar commented May 26, 2017

Done. Thanks for pointing it out....

Please suggest what wrong we are doing in Alpine.

@lminiero
Copy link
Member

I'm personally not familiar with Alpine, but I do know somebody in our team was experiencing a similar problem when playing with Alpine and Raspberry Pi. Probably some system-specific issue that's causing the problem only there. We'll try and replicate the issue in the next few days.

@nswarnkar
Copy link
Author

Thanks for revert, I will wait.

@nswarnkar
Copy link
Author

nswarnkar commented Jun 7, 2017

Hi Iminiero, did you or team got chance to look into this issue? Thanks in advance.

@lminiero
Copy link
Member

lminiero commented Jun 8, 2017

Somebody's looking into that. Will come back with more details if any are found.

@atoppi
Copy link
Member

atoppi commented Jun 8, 2017

Hi nswarnkar,
we can replicate the issue on a Alpine Docker with v0.1.13 libnice, both apk package and source compiled.
The core dump seems OK (no invalid pointer and things like this).
I tried removing some CFLAGS on Janus and libnice without success.
This must be further investigated because the issue is clearly related to the specific OS, but unfortunately we're not so familiar with this Linux distro.

@nswarnkar
Copy link
Author

Thanks Toppi for the revert.

Alpine using MUSL instead of standard libc, I doubt that may be creating problem.
Also the crash comes when STUN/TURN phase passes successfully, i.e. during setting up ICE.
could it be that software dependencies(libraries) of Janus are not accurately getting satisfied.?
We also tried with GLIB 2.0, assuming MUSL is working ok. But no luck so far.

@atoppi
Copy link
Member

atoppi commented Jun 9, 2017

I tried with previous versions of Alpine, glib and gcc too, without success.
Looking at the core dump the crash happens here in libnice:
for (i = agent->streams; i; i = i->next)
so the access to agent->streams is causing the issue.
What is strange is that using the debugger (gdb) that value can be safely read and de-referenced.
Maybe something at runtime is making illegal the access to that pointer. I am not an expert in Linux Kernel security features, but it could be possibile that some security enhancements in Alpine may interfere with the current code.

@atoppi
Copy link
Member

atoppi commented Jun 9, 2017

I have executed the unit tests on libnice 0.1.13. These are the outputs:

As you can see on Ubuntu everything is OK, while on Alpine there are many seg faults. In particular look at the test-send-recv, line 398.

If you are interested in doing the tests by yourself just issue:
make check
in your local libnice repo.

At this point I think the issue is not specific to Janus, but strictly related to libnice.

@lminiero
Copy link
Member

lminiero commented Jun 9, 2017

Closing as not a Janus issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants