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 using Docker #39

Closed
oransterf opened this issue Aug 14, 2019 · 20 comments
Closed

Segmentation fault using Docker #39

oransterf opened this issue Aug 14, 2019 · 20 comments
Assignees
Labels
bug Confirmed as bug

Comments

@oransterf
Copy link

Hi and first of all thank you for working on this!

Sadly I wasn't able to make it run in docker (tried the official image and also a custom one based on ubuntu I made).
Sadly after I start the server it just crashes. Here's what I have:

Crash dump

***** Crash dump *****
OvenMediaEngine v0.9.1 (build: 19060300) (pid: 29, tid: 29)
Signal 11 (SIGSEGV) 2019-08-13T18:47:26-0700
#0   /lib/x86_64-linux-gnu/libpthread.so.0 0x7f5a1bc4c890 ? + 0x12890
#1   /usr/bin/OvenMediaEngine            0x5632046a16ac ? + 0x1326ac
#2   /usr/bin/OvenMediaEngine            0x563204615029 ? + 0xa6029
#3   /usr/bin/OvenMediaEngine            0x5632046153ba ? + 0xa63ba
#4   /usr/bin/OvenMediaEngine            0x56320461585f ? + 0xa685f
#5   /usr/bin/OvenMediaEngine            0x5632045ba3b5 ? + 0x4b3b5
#6   /usr/bin/OvenMediaEngine            0x5632045bb94f ? + 0x4c94f
#7   /usr/bin/OvenMediaEngine            0x563204593e0d ? + 0x24e0d
#8   /lib/x86_64-linux-gnu/libc.so.6     0x7f5a18a82b97 ? + 0xe7
#9   /usr/bin/OvenMediaEngine            0x5632045954ca ? + 0x264ca

Server logs

[2019-08-13 18:47:26.737] I 29 Config | config_manager.cpp:119  | Trying to save logfile in directory... (/var/log/ovenmediaengine)
[2019-08-13 18:47:26.781] I 29 Config | config_manager.cpp:52   | Trying to load configurations... (/usr/share/ovenmediaengine/conf/Server.xml)
[2019-08-13 18:47:26.787] I 29 OvenMediaEngine | main.cpp:96   | OvenMediaEngine v0.9.1 (build: 19060300) is started on [server] (Linux x86_64 - 4.15.0-38-generic, #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018)
[2019-08-13 18:47:26.800] I 29 OvenMediaEngine | main.cpp:137  | Trying to create application [app] (live)...
[2019-08-13 18:47:26.800] I 29 OvenMediaEngine | main.cpp:144  | Trying to create MediaRouter for host [default]...
[2019-08-13 18:47:26.800] I 29 MediaRouter | media_router.cpp:39   | Trying to start media router...
[2019-08-13 18:47:26.801] I 29 Relay | relay_server.cpp:44   | Trying to start relay server on [v4] 0.0.0.0:4120
[2019-08-13 18:47:26.801] I 29 MediaRouter | media_router.cpp:61   | Media router is started.
[2019-08-13 18:47:26.801] I 29 OvenMediaEngine | main.cpp:147  | Trying to create Transcoder for host [default]...
[2019-08-13 18:47:26.801] I 29 OvenMediaEngine | main.cpp:156  | Trying to create RTMP Provider for application [default/app]...
[2019-08-13 18:47:26.801] I 29 RtmpProvider | rtmp_provider.cpp:77   | RTMP Provider is listening on [v4] 0.0.0.0:4130...
[2019-08-13 18:47:26.802] I 29 OvenMediaEngine | main.cpp:190  | Trying to create HLS Publisher for application [default/app]...
[2019-08-13 18:47:26.802] I 29 Publisher | publisher.cpp:12   | Trying to start publisher 3 for application: app
[2019-08-13 18:47:26.802] I 29 OvenMediaEngine | main.cpp:183  | Trying to create DASH Publisher for application [default/app]...
[2019-08-13 18:47:26.803] I 29 Publisher | publisher.cpp:12   | Trying to start publisher 4 for application: app
[2019-08-13 18:47:26.803] I 29 OvenMediaEngine | main.cpp:178  | Trying to create WebRTC Publisher for application [default/app]...

Let me know how I can help

@getroot
Copy link
Member

getroot commented Aug 14, 2019

Currently Docker Image is not a stable version. It requires more testing.

Did you use the following Image?
https://hub.docker.com/r/airensoft/ovenmediaengine

In my environment it is working perfectly. We run it with the following command:

docker run -d -e OME_VIDEO_FRAMERATE=30 -e OME_VIDEO_BITRATE=2000000 -e OME_VIDEO_WIDTH=1280 -e OME_VIDEO_HEIGHT=720 -p 1935:1935 -p 3333:3333 -p 80:80 -p 9000:9000/udp -p 10000-10005:10000-10005/udp airensoft/ovenmediaengine

We will use AWS EC2 to test further, and if we find a cause we will leave comments again.

@oransterf
Copy link
Author

I tried running the exact command you posted and I have the same issue: server starts up, however as soon as I request server_ip:80, it crashes before returning anything
The host is running ubuntu as well.

If there's anything I could do to debug let me know

@getroot
Copy link
Member

getroot commented Aug 14, 2019

Could you help us? If you can help us, please try as follows.

  1. In Dockerfile(https://github.com/AirenSoft/OvenMediaEngine/blob/temp/alpine/Dockerfile), remove "strip" command as follow.

RUN
DIR=/tmp/ome &&
mkdir -p ${DIR} &&
cd ${DIR} &&
curl -sLf https://github.com/AirenSoft/OvenMediaEngine/archive/${OME_VERSION}.tar.gz | tar -xz --strip-components=1 &&
cd src &&
make release &&
mkdir -p ${PREFIX}/bin/conf &&
# strip ./bin/RELEASE/OvenMediaEngine &&
cp ./bin/RELEASE/OvenMediaEngine ${PREFIX}/bin/ &&
cp ../misc/conf_examples/Server.xml ${PREFIX}/bin/conf/ &&
rm -rf ${DIR}

  1. Re-build docker image

docker build --tag ovenmediaengine:debug .

  1. Run Docker as /bin/sh

docker run -it --entrypoint=/bin/sh --security-opt seccomp=unconfined -e OME_VIDEO_FRAMERATE=30 -e OME_VIDEO_BITRATE=2000000 -e OME_VIDEO_WIDTH=1280 -e OME_VIDEO_HEIGHT=720 -p 1935:1935 -p 3333:3333 -p 8080:80 -p 9000:9000/udp -p 10000-10005:10000-10005/udp ovenmediaengine:debug

  1. Run OvenMediaEngine with GDB

apk add gdb
gdb /opt/ovenmediaengine/bin/OvenMediaEngine

  1. And give the backtrace information and exact location where the program crashes.

@oransterf
Copy link
Author

Thank you for taking the time to post these instructions.
Let me know if this helps!

Reading symbols from /opt/ovenmediaengine/bin/OvenMediaEngine...
(gdb) run
Starting program: /opt/ovenmediaengine/bin/OvenMediaEngine
[2019-08-14 18:05:45.304] I 15 Config | config_manager.cpp:52   | Trying to load configurations... (/opt/ovenmediaengine/bin/conf/Server.xml)
[2019-08-14 18:05:45.308] I 15 OvenMediaEngine | main.cpp:131  | OvenMediaEngine v0.9.1 (build: 19060300) is started on [0d9936a390d2] (Linux x86_64 - 4.15.0-38-generic, #41-Ubuntu
 SMP Wed Oct 10 10:59:38 UTC 2018)
[New LWP 19]
[2019-08-14 18:05:45.311] I 15 OvenMediaEngine | main.cpp:172  | Trying to create application [app] (live)...
[2019-08-14 18:05:45.311] I 15 OvenMediaEngine | main.cpp:179  | Trying to create MediaRouter for host [default]...
[2019-08-14 18:05:45.311] I 15 MediaRouter | media_router.cpp:43   | Trying to start media router...
[New LWP 20]
[New LWP 21]
[New LWP 22]
[2019-08-14 18:05:45.311] I 15 Relay | relay_server.cpp:44   | Trying to start relay server on [v4] 0.0.0.0:9000
[New LWP 23]
[New LWP 24]
[2019-08-14 18:05:45.311] I 15 MediaRouter | media_router.cpp:65   | Media router is started.
[2019-08-14 18:05:45.311] I 15 OvenMediaEngine | main.cpp:183  | Trying to create Transcoder for host [default]...
[2019-08-14 18:05:45.311] I 15 OvenMediaEngine | main.cpp:193  | Trying to create RTMP Provider for application [default/app]...
[2019-08-14 18:05:45.311] I 15 RtmpProvider | rtmp_provider.cpp:81   | RTMP Provider is listening on [v4] 0.0.0.0:1935...
[New LWP 25]
[New LWP 26]
[2019-08-14 18:05:45.312] I 15 OvenMediaEngine | main.cpp:238  | Trying to create HLS Publisher for application [default/app]...
[New LWP 27]
[New LWP 28]
[New LWP 29]
[New LWP 30]
[New LWP 31]
[2019-08-14 18:05:45.312] I 15 Publisher | publisher.cpp:12   | Trying to start publisher 3 for application: app
[New LWP 32]
[2019-08-14 18:05:45.312] I 15 OvenMediaEngine | main.cpp:229  | Trying to create DASH Publisher for application [default/app]...
[New LWP 33]
[New LWP 34]
[New LWP 35]
[New LWP 36]
[2019-08-14 18:05:45.313] I 15 Publisher | publisher.cpp:12   | Trying to start publisher 4 for application: app
[New LWP 37]
[2019-08-14 18:05:45.313] I 15 OvenMediaEngine | main.cpp:220  | Trying to create WebRTC Publisher for application [default/app]...
[New LWP 38]
[New LWP 39]
[2019-08-14 18:05:45.313] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10000/UDP
[New LWP 39]
[2019-08-14 18:05:45.313] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10000/UDP
[New LWP 40]
[2019-08-14 18:05:45.313] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10001/UDP
[New LWP 41]
[2019-08-14 18:05:45.313] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10002/UDP
[New LWP 42]
[2019-08-14 18:05:45.314] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10003/UDP
[New LWP 43]
[2019-08-14 18:05:45.314] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10004/UDP
[New LWP 44]
[2019-08-14 18:05:45.314] I 15 Ice | ice_port.cpp:88   | ICE port is bounded on [v4] 0.0.0.0:10005/UDP
[2019-08-14 18:05:45.314] I 15 WebRTC | webrtc_publisher.cpp:63   | WebRTC Publisher is listening on [v4] 0.0.0.0:3333...
[2019-08-14 18:05:45.314] I 15 Signalling | rtc_signalling_server.cpp:70   | P2P is disabled
[New LWP 45]
[2019-08-14 18:05:45.314] I 15 Publisher | publisher.cpp:12   | Trying to start publisher 1 for application: app
[2019-08-14 18:05:45.314] I 15 WebRTC | rtc_application.cpp:106  | WebRTC Application Started
[New LWP 46]
[2019-08-14 18:05:59.848] I 31 HttpServer | http_server.cpp:106  | Client([v4] 192.168.86.152:64447) is connected on [v4] 0.0.0.0:80

Thread 14 "OvenMediaEngine" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 31]
std::vector<ov::String, std::allocator<ov::String> >::emplace_back<char (&) [1024]> (this=0x7ffff6ed05c0) at /usr/include/c++/8.3.0/bits/vector.tcc:103
103     /usr/include/c++/8.3.0/bits/vector.tcc: No such file or directory.
(gdb) bt
#0  std::vector<ov::String, std::allocator<ov::String> >::emplace_back<char (&) [1024]> (this=0x7ffff6ed05c0) at /usr/include/c++/8.3.0/bits/vector.tcc:103
#1  ov::String::Split (string=<optimized out>, separator=0x5555556fcc2c "\r\n", this=<optimized out>) at projects/base/ovlibrary/string.cpp:684
#2  0x4b346f6958646b31 in ?? ()
#3  0x585a4c5655504432 in ?? ()
#4  0x4632254f4c463573 in ?? ()
#5  0x443078366a4a6f43 in ?? ()
#6  0x5a7938676c674942 in ?? ()
#7  0x6b6d3365755a4c55 in ?? ()
#8  0x634f4d7147704255 in ?? ()
#9  0x336f3373416c4634 in ?? ()
#10 0x7a43746f796f655a in ?? ()
#11 0x787259387a61474a in ?? ()
#12 0x394c6f7264786a58 in ?? ()
#13 0x75496359336c7441 in ?? ()
#14 0x656b616562203b42 in ?? ()
#15 0x6f69737365732e72 in ?? ()
#16 0x6165363d64692e6e in ?? ()
#17 0x3831373434393535 in ?? ()
#18 0x3861663832303330 in ?? ()
#19 0x6464666632356564 in ?? ()
#20 0x69203b3830343563 in ?? ()
#21 0x2d53466c4a6e3d6f in ?? ()
#22 0x2d726b76665a3649 in ?? ()
#23 0x000042414141656a in ?? ()
#24 0x0000555555622725 in HttpServer::TryParseHeader (response=..., request=..., data=..., this=0x5555557ff070) at projects/http_server/http_server.cpp:172
#25 HttpServer::ProcessData (this=0x5555557ff070, client=..., data=...) at projects/http_server/http_server.cpp:172
#26 0x0000555555623264 in HttpServer::OnDataReceived (this=0x5555557ff070, remote=..., address=..., data=...) at projects/http_server/http_server.cpp:117
#27 0x0000555555661ed9 in std::__invoke_impl<void, void (PhysicalPortObserver::*&)(std::shared_ptr<ov::Socket> const&, ov::SocketAddress const&, std::shared_ptr<ov::Data const> const&), PhysicalPortObserver*&, std::shared_ptr<ov::Socket>&, ov::SocketAddress&, std::shared_ptr<ov::Data const> const&> (__f=@0x7ffff6ed0870: &virtual table offset 24,
    __f=@0x7ffff6ed0870: &virtual table offset 24, __t=@0x5555557ff1a0: 0x5555557ff070) at /usr/include/c++/8.3.0/bits/invoke.h:89
#28 std::__invoke<void (PhysicalPortObserver::*&)(std::shared_ptr<ov::Socket> const&, ov::SocketAddress const&, std::shared_ptr<ov::Data const> const&), PhysicalPortObserver*&, std::shared_ptr<ov::Socket>&, ov::SocketAddress&, std::shared_ptr<ov::Data const> const&> (__fn=@0x7ffff6ed0870: &virtual table offset 24) at /usr/include/c++/8.3.0/bits/invoke.h:95
#29 std::_Bind<void (PhysicalPortObserver::*(std::_Placeholder<1>, std::shared_ptr<ov::Socket>, std::reference_wrapper<ov::SocketAddress>, std::reference_wrapper<std::shared_ptr<ov::Data const> const>))(std::shared_ptr<ov::Socket> const&, ov::SocketAddress const&, std::shared_ptr<ov::Data const> const&)>::__call<void, PhysicalPortObserver*&, 0ul, 1ul, 2ul, 3ul>(std::tuple<PhysicalPortObserver*&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) (__args=..., this=0x7ffff6ed0870) at /usr/include/c++/8.3.0/functional:400
#30 std::_Bind<void (PhysicalPortObserver::*(std::_Placeholder<1>, std::shared_ptr<ov::Socket>, std::reference_wrapper<ov::SocketAddress>, std::reference_wrapper<std::shared_ptr<ov::Data const> const>))(std::shared_ptr<ov::Socket> const&, ov::SocketAddress const&, std::shared_ptr<ov::Data const> const&)>::operator()<PhysicalPortObserver*&, void>(PhysicalPortObserver*&) (this=0x7ffff6ed0870) at /usr/include/c++/8.3.0/functional:484
#31 std::for_each<__gnu_cxx::__normal_iterator<PhysicalPortObserver**, std::vector<PhysicalPortObserver*, std::allocator<PhysicalPortObserver*> > >, std::_Bind<void (PhysicalPortObserver::*(std::_Placeholder<1>, std::shared_ptr<ov::Socket>, std::reference_wrapper<ov::SocketAddress>, std::reference_wrapper<std::shared_ptr<ov::Data const> const>))(std::shared_ptr<ov::Socket> const&, ov::SocketAddress const&, std::shared_ptr<ov::Data const> const&)> >(__gnu_cxx::__normal_iterator<PhysicalPortObserver**, std::vector<PhysicalPortObserver*, std::allocator<PhysicalPortObserver*> > >, __gnu_cxx::__normal_iterator<PhysicalPortObserver**, std::vector<PhysicalPortObserver*, std::allocator<PhysicalPortObserver*> > >, std::_Bind<void (PhysicalPortObserver::*(std::_Placeholder<1>, std::shared_ptr<ov::Socket>, std::reference_wrapper<ov::SocketAddress>, std::reference_wrapper<std::shared_ptr<ov::Data const> const>))(std::shared_ptr<ov::Socket> const&, ov::SocketAddress const&, std::shared_ptr<ov::Data const> const&)>) (__f=..., __last=..., __first=...)
    at /usr/include/c++/8.3.0/bits/stl_algo.h:3882
#32 PhysicalPort::<lambda()>::<lambda(const std::shared_ptr<ov::ClientSocket>&, const std::shared_ptr<const ov::Data>&)>::operator() (__closure=<optimized out>, data=...,
    client=...) at projects/physical_port/physical_port.cpp:122
#33 std::_Function_handler<bool(const std::shared_ptr<ov::ClientSocket>&, const std::shared_ptr<ov::Data>&), PhysicalPort::CreateServerSocket(ov::SocketType, const ov::SocketAddress&, int, int)::<lambda()>::<lambda(const std::shared_ptr<ov::ClientSocket>&, const std::shared_ptr<const ov::Data>&)> >::_M_invoke(const std::_Any_data &, const std::shared_ptr<ov::ClientSocket> &, const std::shared_ptr<ov::Data> &) (__functor=..., __args#0=..., __args#1=...) at /usr/include/c++/8.3.0/bits/std_function.h:282
#34 0x00005555556667aa in std::function<bool (std::shared_ptr<ov::ClientSocket> const&, std::shared_ptr<ov::Data> const&)>::operator()(std::shared_ptr<ov::ClientSocket> const&, std::shared_ptr<ov::Data> const&) const (__args#1=..., __args#0=..., this=0x7ffff6ed0a20) at /usr/include/c++/8.3.0/bits/std_function.h:682
#35 ov::ServerSocket::DispatchEvent(std::function<bool (std::shared_ptr<ov::ClientSocket> const&, ov::SocketConnectionState, std::shared_ptr<ov::Error> const&)>, std::function<bool (std::shared_ptr<ov::ClientSocket> const&, std::shared_ptr<ov::Data> const&)>, int) (this=<optimized out>, connection_callback=..., data_callback=..., timeout=timeout@entry=500)
    at projects/base/ovsocket/server_socket.cpp:157
#36 0x00005555556614f3 in PhysicalPort::<lambda()>::operator() (__closure=<optimized out>) at /usr/include/c++/8.3.0/new:169
#37 std::__invoke_impl<void, PhysicalPort::CreateServerSocket(ov::SocketType, const ov::SocketAddress&, int, int)::<lambda()> > (__f=...)
    at /usr/include/c++/8.3.0/bits/invoke.h:60
#38 std::__invoke<PhysicalPort::CreateServerSocket(ov::SocketType, const ov::SocketAddress&, int, int)::<lambda()> > (__fn=...) at /usr/include/c++/8.3.0/bits/invoke.h:95
#39 std::thread::_Invoker<std::tuple<PhysicalPort::CreateServerSocket(ov::SocketType, const ov::SocketAddress&, int, int)::<lambda()> > >::_M_invoke<0> (this=<optimized out>)
    at /usr/include/c++/8.3.0/thread:244
#40 std::thread::_Invoker<std::tuple<PhysicalPort::CreateServerSocket(ov::SocketType, const ov::SocketAddress&, int, int)::<lambda()> > >::operator() (this=<optimized out>)
    at /usr/include/c++/8.3.0/thread:253
#41 std::thread::_State_impl<std::thread::_Invoker<std::tuple<PhysicalPort::CreateServerSocket(ov::SocketType, const ov::SocketAddress&, int, int)::<lambda()> > > >::_M_run(void)
    (this=0x555555802900) at /usr/include/c++/8.3.0/thread:196
#42 0x00007ffff76db6b8 in ?? () from /usr/lib/libstdc++.so.6
#43 0x00007ffff7fbdf82 in ?? () from /lib/ld-musl-x86_64.so.1
#44 0x00007ffff6eae000 in ?? ()
#45 0x00007ffff7fc004d in ?? () from /lib/ld-musl-x86_64.so.1
#46 0x0000000000000000 in ?? ()

@getroot
Copy link
Member

getroot commented Aug 15, 2019

Thank you very much for your contribution!
The problem appears to be when connecting to HTTP(80). What browser did you use to access port 80?

We will fix the problem and give you feedback again.

@oransterf
Copy link
Author

Just using firefox on windows. Let me know if you want raw request or anything

@getroot
Copy link
Member

getroot commented Aug 15, 2019

Yes I do not have the same problem when I connect to 80 with Firefox. It would be more helpful if you could send your HTTP Request.

@oransterf
Copy link
Author

Here's what I have:

Request URL:http://192.168.86.171:8080/
Request method:GET


Host: 192.168.86.171:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1

@oransterf
Copy link
Author

Actually I just realized it crashes only when I request it in normal mode (not incognito), which has some cookies from other sites on that IP.
The raw request I just posted was made using incognito and it didn't crash it.

Gonna make sure everything works and comment after

@getroot
Copy link
Member

getroot commented Aug 15, 2019

Thank you again for your great contribution.
The problem will be solved soon.

@oransterf
Copy link
Author

I've made it stream dash and hls, however when I try to connect via wss for webrtc, I have the following issue:

[2019-08-15 06:18:57.217] I 196 HttpServer | http_server.cpp:106  | Client([v4] 192.168.86.152:60492) is connected on [v4] 0.0.0.0:3333
[2019-08-15 06:18:57.226] I 196 HttpServer | https_server.cpp:128  | Accepted
[2019-08-15 06:18:57.227] I 196 Signalling | rtc_signalling_server.cpp:93   | New client is connected: <ClientSocket: 0x5578c8d47d10, #27, state: 4, TCP, [v4] 192.168.86.152:60492>
[2019-08-15 06:18:57.481] I 196 HttpServer | http_server.cpp:106  | Client([v4] 192.168.86.152:60493) is connected on [v4] 0.0.0.0:3333
[2019-08-15 06:18:57.489] I 196 HttpServer | http_server.cpp:238  | Client([v4] 192.168.86.152:60493) is disconnected from [v4] 0.0.0.0:3333
[2019-08-15 06:18:58.144] W 196 SDP | session_description.cpp:252  | Unknown Attributes : a=sendrecv
[2019-08-15 06:18:58.196] W 196 Ice | ice_candidate.cpp:80   | Candidate string does not starts with 'candidate:' string:
[2019-08-15 06:18:58.196] E 196 Signalling | rtc_signalling_server.cpp:197  | An error occurred while dispatch command candidate for stream (app/stream_o): Invalid candidate:  (400), disconnecting...
[2019-08-15 06:18:58.196] W 196 Ice | ice_port.cpp:265  | Could not find session: 138704661
[2019-08-15 06:18:58.196] I 196 Signalling | rtc_signalling_server.cpp:240  | Client is disconnected: <WebSocketClient: 0x5578c90ba730, <ClientSocket: 0x5578c8d47d10, #27, state: 0, TCP, [v4] 192.168.86.152:60492>> (app / stream_o, ufrag: local: WRof5e, remote: 8c9b9f0b)
[2019-08-15 06:19:28.829] E 189 Publisher | stream.cpp:230  | Cannot find session : 138704661
[2019-08-15 06:20:47.255] I 182 HttpServer | http_server.cpp:238  | Client([v4] 192.168.86.152:60444) is disconnected from [v4] 0.0.0.0:8080

The client is the ovenplayer demo on your website

Thanks!

@oransterf
Copy link
Author

I feel like I'm spamming you :P
This is unrelated, but when running docker with --network host, the server instantly crashes with this:

Thread 1 "OvenMediaEngine" received signal SIGSEGV, Segmentation fault.
0x000055555566e50c in ov::SocketUtilities::GetIpList () at projects/base/ovsocket/socket_utilities.cpp:30
30      projects/base/ovsocket/socket_utilities.cpp: No such file or directory.
(gdb) bt
#0  0x000055555566e50c in ov::SocketUtilities::GetIpList () at projects/base/ovsocket/socket_utilities.cpp:30
#1  0x00005555555fc0cf in IcePortManager::ParseIceCandidate (this=<optimized out>, end_port=<synthetic pointer>, start_port=<synthetic pointer>, socket_type=<synthetic pointer>,
    ip_list=0x7fffffffe2d0, ice_candidate=...) at projects/ice/ice_port_manager.cpp:245
#2  IcePortManager::GenerateIceCandidates (this=<optimized out>, ice_candidates=..., parsed_ice_candidate_list=0x7fffffffe5b0) at projects/ice/ice_port_manager.cpp:90
#3  0x00005555555fc951 in IcePortManager::CreatePort (this=this@entry=0x555555765430 <ov::Singleton<IcePortManager>::Instance()::instance>, ice_candidates=..., observer=...)
    at projects/ice/ice_port_manager.cpp:27
#4  0x00005555555b0ecf in WebRtcPublisher::Start (this=0x555555812090) at projects/config/items/webrtc_port.h:31
#5  0x00005555555b1b4d in WebRtcPublisher::Create (application_info=application_info@entry=0x5555557c68a0, router=..., application=...) at projects/webrtc/webrtc_publisher.cpp:15
#6  0x000055555558cb00 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/8.3.0/ext/atomicity.h:96

@getroot
Copy link
Member

getroot commented Aug 15, 2019

I've made it stream dash and hls, however when I try to connect via wss for webrtc, I have the following issue:

[2019-08-15 06:18:57.217] I 196 HttpServer | http_server.cpp:106  | Client([v4] 192.168.86.152:60492) is connected on [v4] 0.0.0.0:3333
[2019-08-15 06:18:57.226] I 196 HttpServer | https_server.cpp:128  | Accepted
[2019-08-15 06:18:57.227] I 196 Signalling | rtc_signalling_server.cpp:93   | New client is connected: <ClientSocket: 0x5578c8d47d10, #27, state: 4, TCP, [v4] 192.168.86.152:60492>
[2019-08-15 06:18:57.481] I 196 HttpServer | http_server.cpp:106  | Client([v4] 192.168.86.152:60493) is connected on [v4] 0.0.0.0:3333
[2019-08-15 06:18:57.489] I 196 HttpServer | http_server.cpp:238  | Client([v4] 192.168.86.152:60493) is disconnected from [v4] 0.0.0.0:3333
[2019-08-15 06:18:58.144] W 196 SDP | session_description.cpp:252  | Unknown Attributes : a=sendrecv
[2019-08-15 06:18:58.196] W 196 Ice | ice_candidate.cpp:80   | Candidate string does not starts with 'candidate:' string:
[2019-08-15 06:18:58.196] E 196 Signalling | rtc_signalling_server.cpp:197  | An error occurred while dispatch command candidate for stream (app/stream_o): Invalid candidate:  (400), disconnecting...
[2019-08-15 06:18:58.196] W 196 Ice | ice_port.cpp:265  | Could not find session: 138704661
[2019-08-15 06:18:58.196] I 196 Signalling | rtc_signalling_server.cpp:240  | Client is disconnected: <WebSocketClient: 0x5578c90ba730, <ClientSocket: 0x5578c8d47d10, #27, state: 0, TCP, [v4] 192.168.86.152:60492>> (app / stream_o, ufrag: local: WRof5e, remote: 8c9b9f0b)
[2019-08-15 06:19:28.829] E 189 Publisher | stream.cpp:230  | Cannot find session : 138704661
[2019-08-15 06:20:47.255] I 182 HttpServer | http_server.cpp:238  | Client([v4] 192.168.86.152:60444) is disconnected from [v4] 0.0.0.0:8080

The client is the ovenplayer demo on your website

Thanks!

I found the same problem with the latest version of Firefox. The specification for the Candidate seems to have changed slightly in the latest Firefox. Please use chromium until we solve the problem.

@dimiden dimiden self-assigned this Aug 16, 2019
@dimiden dimiden added the bug Confirmed as bug label Aug 16, 2019
@dimiden
Copy link
Member

dimiden commented Aug 16, 2019

I just committed to solve the problems listed above. So if you want to test OME before the docker image is rebuild, pull and rebuild it.

Once again, thank you for your contribution, and this kind of spam is always welcome. :)

@getroot
Copy link
Member

getroot commented Aug 21, 2019

@oransterf Have you tried recent changes? We are waiting for your feedback.

@oransterf
Copy link
Author

I did and it worked in Chrome (not firefox yet)! Thank you for fixing.

@getroot
Copy link
Member

getroot commented Aug 30, 2019

I'm sorry for replying after a long time.
The issue of not playing in Firefox has been fixed in "temp/cmaf" branch.
Thank you for your report.

@getroot
Copy link
Member

getroot commented Mar 2, 2020

This issue has been closed since it has been inactive for quite some time. If you want to continue discussing this issue, please feel free to reopen it.

@htliu6
Copy link

htliu6 commented Mar 18, 2022

Hi and first of all thank you for working on this!

Sadly I wasn't able to make it run in docker (tried the official image and also a custom one based on ubuntu I made). Sadly after I start the server it just crashes. Here's what I have:

Crash dump

***** Crash dump *****
OvenMediaEngine v0.9.1 (build: 19060300) (pid: 29, tid: 29)
Signal 11 (SIGSEGV) 2019-08-13T18:47:26-0700
#0   /lib/x86_64-linux-gnu/libpthread.so.0 0x7f5a1bc4c890 ? + 0x12890
#1   /usr/bin/OvenMediaEngine            0x5632046a16ac ? + 0x1326ac
#2   /usr/bin/OvenMediaEngine            0x563204615029 ? + 0xa6029
#3   /usr/bin/OvenMediaEngine            0x5632046153ba ? + 0xa63ba
#4   /usr/bin/OvenMediaEngine            0x56320461585f ? + 0xa685f
#5   /usr/bin/OvenMediaEngine            0x5632045ba3b5 ? + 0x4b3b5
#6   /usr/bin/OvenMediaEngine            0x5632045bb94f ? + 0x4c94f
#7   /usr/bin/OvenMediaEngine            0x563204593e0d ? + 0x24e0d
#8   /lib/x86_64-linux-gnu/libc.so.6     0x7f5a18a82b97 ? + 0xe7
#9   /usr/bin/OvenMediaEngine            0x5632045954ca ? + 0x264ca

Server logs

[2019-08-13 18:47:26.737] I 29 Config | config_manager.cpp:119  | Trying to save logfile in directory... (/var/log/ovenmediaengine)
[2019-08-13 18:47:26.781] I 29 Config | config_manager.cpp:52   | Trying to load configurations... (/usr/share/ovenmediaengine/conf/Server.xml)
[2019-08-13 18:47:26.787] I 29 OvenMediaEngine | main.cpp:96   | OvenMediaEngine v0.9.1 (build: 19060300) is started on [server] (Linux x86_64 - 4.15.0-38-generic, #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018)
[2019-08-13 18:47:26.800] I 29 OvenMediaEngine | main.cpp:137  | Trying to create application [app] (live)...
[2019-08-13 18:47:26.800] I 29 OvenMediaEngine | main.cpp:144  | Trying to create MediaRouter for host [default]...
[2019-08-13 18:47:26.800] I 29 MediaRouter | media_router.cpp:39   | Trying to start media router...
[2019-08-13 18:47:26.801] I 29 Relay | relay_server.cpp:44   | Trying to start relay server on [v4] 0.0.0.0:4120
[2019-08-13 18:47:26.801] I 29 MediaRouter | media_router.cpp:61   | Media router is started.
[2019-08-13 18:47:26.801] I 29 OvenMediaEngine | main.cpp:147  | Trying to create Transcoder for host [default]...
[2019-08-13 18:47:26.801] I 29 OvenMediaEngine | main.cpp:156  | Trying to create RTMP Provider for application [default/app]...
[2019-08-13 18:47:26.801] I 29 RtmpProvider | rtmp_provider.cpp:77   | RTMP Provider is listening on [v4] 0.0.0.0:4130...
[2019-08-13 18:47:26.802] I 29 OvenMediaEngine | main.cpp:190  | Trying to create HLS Publisher for application [default/app]...
[2019-08-13 18:47:26.802] I 29 Publisher | publisher.cpp:12   | Trying to start publisher 3 for application: app
[2019-08-13 18:47:26.802] I 29 OvenMediaEngine | main.cpp:183  | Trying to create DASH Publisher for application [default/app]...
[2019-08-13 18:47:26.803] I 29 Publisher | publisher.cpp:12   | Trying to start publisher 4 for application: app
[2019-08-13 18:47:26.803] I 29 OvenMediaEngine | main.cpp:178  | Trying to create WebRTC Publisher for application [default/app]...

Let me know how I can help

Excuse me, I wonder where I can find above Server Logs?

@htliu6
Copy link

htliu6 commented Mar 18, 2022

@oransterf @getroot
Execuse me, I wonder how to gdb the OME. When I run step 3, I got "Unable to find image 'ovenmediaengine:debug' locally".

Could you help us? If you can help us, please try as follows.

  1. In Dockerfile(https://github.com/AirenSoft/OvenMediaEngine/blob/temp/alpine/Dockerfile), remove "strip" command as follow.

RUN DIR=/tmp/ome && mkdir -p ${DIR} && cd ${DIR} && curl -sLf https://github.com/AirenSoft/OvenMediaEngine/archive/${OME_VERSION}.tar.gz | tar -xz --strip-components=1 && cd src && make release && mkdir -p ${PREFIX}/bin/conf && # strip ./bin/RELEASE/OvenMediaEngine && cp ./bin/RELEASE/OvenMediaEngine ${PREFIX}/bin/ && cp ../misc/conf_examples/Server.xml ${PREFIX}/bin/conf/ && rm -rf ${DIR}

  1. Re-build docker image

docker build --tag ovenmediaengine:debug .

  1. Run Docker as /bin/sh

docker run -it --entrypoint=/bin/sh --security-opt seccomp=unconfined -e OME_VIDEO_FRAMERATE=30 -e OME_VIDEO_BITRATE=2000000 -e OME_VIDEO_WIDTH=1280 -e OME_VIDEO_HEIGHT=720 -p 1935:1935 -p 3333:3333 -p 8080:80 -p 9000:9000/udp -p 10000-10005:10000-10005/udp ovenmediaengine:debug

  1. Run OvenMediaEngine with GDB

apk add gdb gdb /opt/ovenmediaengine/bin/OvenMediaEngine

  1. And give the backtrace information and exact location where the program crashes.

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

No branches or pull requests

5 participants