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

SRS not lauching after compile on ARM #485

Closed
deluxor opened this issue Sep 19, 2015 · 23 comments
Closed

SRS not lauching after compile on ARM #485

deluxor opened this issue Sep 19, 2015 · 23 comments
Assignees
Labels
Bug It might be a bug. EnglishNative This issue is conveyed exclusively in English.
Milestone

Comments

@deluxor
Copy link

deluxor commented Sep 19, 2015

Something weird happening here, i run it and just closes no process is created, here is the log, it was compiled on a PI with --pi flag.

[2015-09-19 19:00:37.330][trace][18654][0] srs checking config...
[2015-09-19 19:00:37.331][trace][18654][0] detect intranet address: 127.0.0.1, ifname=lo
[2015-09-19 19:00:37.332][warn][18654][0][2] stats disk not configed, disk iops disabled.
[2015-09-19 19:00:37.332][trace][18654][0] write log to file ./objs/origin.log
[2015-09-19 19:00:37.332][trace][18654][0] you can: tailf ./objs/origin.log
[2015-09-19 19:00:37.332][trace][18654][0] @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
[2015-09-19 19:00:37.333][trace][18654][0] srs(simple-rtmp-server) 2.0.189
[2015-09-19 19:00:37.333][trace][18654][0] license: The MIT License (MIT), Copyright (c) 2013-2015 SRS(simple-rtmp-server)
[2015-09-19 19:00:37.333][trace][18654][0] primary/master: SRS/1.0release
[2015-09-19 19:00:37.333][trace][18654][0] authors: winlin,wenjie.zhao
[2015-09-19 19:00:37.333][trace][18654][0] contributors: winlin<[email protected]> wenjie.zhao<[email protected]> xiangcheng.liu<[email protected]> naijia.liu<[email protected]> alcoholyi<[email protected]>byteman<[email protected]> chad.wang<[email protected]> suhetao<[email protected]> Johnny<[email protected]> karthikeyan<[email protected]> StevenLiu<[email protected]> zhengfl<[email protected]> tufang14<[email protected]> allspace<[email protected]> niesongsong<[email protected]> rudeb0t<[email protected]>
[2015-09-19 19:00:37.333][trace][18654][0] uname: Linux pi.rte.pm 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l GNU/Linux
[2015-09-19 19:00:37.333][trace][18654][0] build: 2015-09-19 18:29:54, little-endian
[2015-09-19 19:00:37.333][trace][18654][0] configure:  --pi --with-http-api --with-stream-caster --with-stat --jobs=4
[2015-09-19 19:00:37.333][trace][18654][0] features: --prefix=/usr/local/srs --with-hls --with-hds --with-dvr --without-nginx --with-ssl --without-ffmpeg --with-transcode --with-ingest --with-stat --with-http-callback --with-http-server --with-stream-caster --with-http-api --with-librtmp --without-research --without-utest --without-gperf --without-gmc --without-gmp --without-gcp --without-gprof --without-arm-ubuntu12 --without-mips-ubuntu12 --log-trace
[2015-09-19 19:00:37.333][trace][18654][0] conf: conf/origin.conf, limit: 1000
[2015-09-19 19:00:37.333][trace][18654][0] SRS for pi
[2015-09-19 19:00:37.334][trace][18654][0] writev limits write 1024 iovs a time
[2015-09-19 19:00:37.334][warn][18654][0][2] SRS 2.0.189 is not stable, please use stable branch 1.0release instead
[2015-09-19 19:00:37.334][warn][18654][0][2] stream caster is experiment feature.
[2015-09-19 19:00:37.334][trace][18654][0] check feature rtmp handshake: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature hls: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature hds: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature http callback: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature http api: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature http server: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature http parser: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature dvr: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature transcode: on
[2015-09-19 19:00:37.334][trace][18654][0] check feature ingest: on
[2015-09-19 19:00:37.335][trace][18654][0] check feature system stat: on
[2015-09-19 19:00:37.335][warn][18654][0][2] check feature compile nginx: off
[2015-09-19 19:00:37.335][warn][18654][0][2] check feature compile ffmpeg: off
[2015-09-19 19:00:37.335][trace][18654][0] stream caster: on
[2015-09-19 19:00:37.335][trace][18654][0] MR(merged-read): on, @see https://github.com/simple-rtmp-server/srs/issues/241
[2015-09-19 19:00:37.335][trace][18654][0] MR(merged-read) default 0 sleep 350
[2015-09-19 19:00:37.335][trace][18654][0] MW(merged-write) default sleep 350
[2015-09-19 19:00:37.335][trace][18654][0] read chunk stream cache cid [0, 16)
[2015-09-19 19:00:37.335][trace][18654][0] default gop cache 1, play queue 30s
[2015-09-19 19:00:37.335][trace][18654][0] complex send algorithm enabled.
[2015-09-19 19:00:37.335][warn][18654][0][2] TCP_NODELAY enabled, may hurts performance.
[2015-09-19 19:00:37.335][trace][18654][0] auto guess socket send buffer by merged write
[2015-09-19 19:00:37.336][trace][18654][0] system default latency in ms: mw(0-350) + mr(0-350) + play-queue(0-30000)
[2015-09-19 19:00:37.336][trace][18654][0] http: root mount to ./objs/nginx/html
[2015-09-19 19:00:37.336][trace][18654][0] start deamon mode...
[2015-09-19 19:00:37.338][trace][18655][0] father process exit. ret=0
[2015-09-19 19:00:37.338][trace][18656][0] son(deamon) process running.
[2015-09-19 19:00:37.339][trace][18656][0] st_set_eventsys to epoll
[2015-09-19 19:00:37.340][trace][18656][0] st_init success, use epoll
[2015-09-19 19:00:37.341][trace][18656][100] server main cid=100
[2015-09-19 19:00:37.341][trace][18654][0] grandpa process exit.
[2015-09-19 19:00:37.342][trace][18656][100] write pid=18656 to objs/origin.pid success!
[2015-09-19 19:03:09.577][trace][18662][0] srs checking config...
[2015-09-19 19:03:09.579][warn][18662][0][0] stats disk not configed, disk iops disabled.
[2015-09-19 19:03:09.579][trace][18662][0] write log to file ./objs/origin.log
[2015-09-19 19:03:09.579][trace][18662][0] you can: tailf ./objs/origin.log
[2015-09-19 19:03:09.579][trace][18662][0] @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
[2015-09-19 19:03:09.580][trace][18662][0] srs(simple-rtmp-server) 2.0.189
[2015-09-19 19:03:09.580][trace][18662][0] license: The MIT License (MIT), Copyright (c) 2013-2015 SRS(simple-rtmp-server)
[2015-09-19 19:03:09.580][trace][18662][0] primary/master: SRS/1.0release
[2015-09-19 19:03:09.580][trace][18662][0] authors: winlin,wenjie.zhao
[2015-09-19 19:03:09.580][trace][18662][0] contributors: winlin<[email protected]> wenjie.zhao<[email protected]> xiangcheng.liu<[email protected]> naijia.liu<[email protected]> alcoholyi<[email protected]> byteman<[email protected]> chad.wang<[email protected]> suhetao<[email protected]> Johnny<[email protected]> karthikeyan<[email protected]> StevenLiu<[email protected]> zhengfl<[email protected]> tufang14<[email protected]> allspace<[email protected]> niesongsong<[email protected]> rudeb0t<[email protected]>
[2015-09-19 19:03:09.580][trace][18662][0] uname: Linux pi.rte.pm 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l GNU/Linux
[2015-09-19 19:03:09.580][trace][18662][0] build: 2015-09-19 18:29:54, little-endian
[2015-09-19 19:03:09.580][trace][18662][0] configure:  --pi --with-http-api --with-stream-caster --with-stat --jobs=4
[2015-09-19 19:03:09.580][trace][18662][0] features: --prefix=/usr/local/srs --with-hls --with-hds --with-dvr --without-nginx --with-ssl --without-ffmpeg --with-transcode --with-ingest --with-stat --with-http-callback --with-http-server --with-stream-caster --with-http-api --with-librtmp --without-research --without-utest --without-gperf --without-gmc --without-gmp --without-gcp --without-gprof --without-arm-ubuntu12 --without-mips-ubuntu12 --log-trace
[2015-09-19 19:03:09.580][trace][18662][0] conf: conf/origin.conf, limit: 1000
[2015-09-19 19:03:09.581][trace][18662][0] SRS for pi
[2015-09-19 19:03:09.581][trace][18662][0] writev limits write 1024 iovs a time
[2015-09-19 19:03:09.581][warn][18662][0][0] SRS 2.0.189 is not stable, please use stable branch 1.0release instead
[2015-09-19 19:03:09.581][warn][18662][0][0] stream caster is experiment feature.
[2015-09-19 19:03:09.581][trace][18662][0] check feature rtmp handshake: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature hls: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature hds: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature http callback: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature http api: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature http server: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature http parser: on
[2015-09-19 19:03:09.581][trace][18662][0] check feature dvr: on
[2015-09-19 19:03:09.582][trace][18662][0] check feature transcode: on
[2015-09-19 19:03:09.582][trace][18662][0] check feature ingest: on
[2015-09-19 19:03:09.582][trace][18662][0] check feature system stat: on
[2015-09-19 19:03:09.582][warn][18662][0][0] check feature compile nginx: off
[2015-09-19 19:03:09.582][warn][18662][0][0] check feature compile ffmpeg: off
[2015-09-19 19:03:09.582][trace][18662][0] stream caster: on
[2015-09-19 19:03:09.582][trace][18662][0] MR(merged-read): on, @see https://github.com/simple-rtmp-server/srs/issues/241
[2015-09-19 19:03:09.582][trace][18662][0] MR(merged-read) default 0 sleep 350
[2015-09-19 19:03:09.582][trace][18662][0] MW(merged-write) default sleep 350
[2015-09-19 19:03:09.582][trace][18662][0] read chunk stream cache cid [0, 16)
[2015-09-19 19:03:09.582][trace][18662][0] default gop cache 1, play queue 30s
[2015-09-19 19:03:09.583][trace][18662][0] complex send algorithm enabled.
[2015-09-19 19:03:09.583][warn][18662][0][0] TCP_NODELAY enabled, may hurts performance.
[2015-09-19 19:03:09.583][trace][18662][0] auto guess socket send buffer by merged write
[2015-09-19 19:03:09.583][trace][18662][0] system default latency in ms: mw(0-350) + mr(0-350) + play-queue(0-30000)
[2015-09-19 19:03:09.583][trace][18662][0] http: root mount to ./objs/nginx/html
[2015-09-19 19:03:09.583][trace][18662][0] start deamon mode...
[2015-09-19 19:03:09.585][trace][18663][0] father process exit. ret=0
[2015-09-19 19:03:09.585][trace][18664][0] son(deamon) process running.
[2015-09-19 19:03:09.586][trace][18664][0] st_set_eventsys to epoll
[2015-09-19 19:03:09.588][trace][18664][0] st_init success, use epoll
[2015-09-19 19:03:09.588][trace][18664][100] server main cid=100
[2015-09-19 19:03:09.588][trace][18662][0] grandpa process exit.
[2015-09-19 19:03:09.589][trace][18664][100] write pid=18664 to objs/origin.pid success!
@winlinvip winlinvip added the Bug It might be a bug. label Sep 21, 2015
@winlinvip winlinvip added this to the srs 2.0 release milestone Sep 21, 2015
@deluxor
Copy link
Author

deluxor commented Sep 22, 2015

Winlinvip Did you confirmed this bug?

@winlinvip
Copy link
Member

Seems a bug. I will confirm it when I got time.

@deluxor
Copy link
Author

deluxor commented Sep 22, 2015

What is the minimum version of GCC and G++ to build it ?
Im thinking is something related to it, i used gcc version 4.9.2 (Debian 4.9.2-10)

I even tried building it natively on an ARM V7 machine (not pi) just using:

./configure --with-http-api --with-stream-caster --with-stat --jobs=8

It builds successfully, but does not run.

I see no errors on output, all libraries are present:

    linux-vdso.so.1 =>  (0x7ebde000)
    /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x76fa9000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76f8f000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76ebd000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76e4c000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76e24000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76cf4000)
    /lib/ld-linux-armhf.so.3 (0x54b46000)

Very strange.

@winlinvip
Copy link
Member

You must specifies the ./configure --arm, for SRS will patch the ST(state-threads) for ARM.
And u can specifies other cross build tools, please read https://github.com/simple-rtmp-server/srs/wiki/v1_EN_SrsLinuxArm#use-other-cross-build-tools

@deluxor
Copy link
Author

deluxor commented Sep 22, 2015

Ahh so might be that the problem, I will cross compile it using ubuntu when i got time, to check.

@deluxor
Copy link
Author

deluxor commented Sep 22, 2015

[2015-09-22 15:53:01.154][trace][17404][0] srs checking config...
[2015-09-22 15:53:01.154][trace][17404][0] detect intranet address: 127.0.0.1, ifname=lo
[2015-09-22 15:53:01.155][trace][17404][0] retrieve local ipv4 ip=10.1.18.55, index=0
[2015-09-22 15:53:01.155][trace][17404][0] detect intranet address: 10.1.18.55, ifname=eth0
[2015-09-22 15:53:01.155][warn][17404][0][2] stats network use index=0, ip=10.1.18.55
[2015-09-22 15:53:01.155][warn][17404][0][2] stats disk not configed, disk iops disabled.
[2015-09-22 15:53:01.155][trace][17404][0] write log to file ./objs/srs.log
[2015-09-22 15:53:01.155][trace][17404][0] you can: tailf ./objs/srs.log
[2015-09-22 15:53:01.155][trace][17404][0] @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog
[2015-09-22 15:53:01.155][trace][17404][0] srs(simple-rtmp-server) 2.0.189
[2015-09-22 15:53:01.155][trace][17404][0] license: The MIT License (MIT), Copyright (c) 2013-2015 SRS(simple-rtmp-server)
[2015-09-22 15:53:01.155][trace][17404][0] primary/master: SRS/1.0release
[2015-09-22 15:53:01.155][trace][17404][0] authors: winlin,wenjie.zhao
[2015-09-22 15:53:01.155][trace][17404][0] contributors: winlin<[email protected]> wenjie.zhao<[email protected]> xiangcheng.liu<[email protected]> naijia.liu<[email protected]> alcoholyi<[email protected]> byteman<[email protected]> chad.wang<[email protected]> suhetao<[email protected]> Johnny<[email protected]> karthikeyan<[email protected]> StevenLiu<[email protected]> zhengfl<[email protected]> tufang14<[email protected]> allspace<[email protected]> niesongsong<[email protected]> rudeb0t<[email protected]>
[2015-09-22 15:53:01.155][trace][17404][0] uname: Linux DLX 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux
[2015-09-22 15:53:01.155][trace][17404][0] build: 2015-09-22 15:46:52, little-endian
[2015-09-22 15:53:01.155][trace][17404][0] configure:  --with-http-api --without-hls --without-ssl --without-stat --without-librtmp --jobs=16 --arm
[2015-09-22 15:53:01.155][trace][17404][0] features: --prefix=/usr/local/srs --without-hls --with-hds --with-dvr --without-nginx --without-ssl --without-ffmpeg --with-transcode --with-ingest --without-stat --with-http-callback --with-http-server --without-stream-caster --with-http-api --without-librtmp --without-research --without-utest --without-gperf --without-gmc --without-gmp --without-gcp --without-gprof --with-arm-ubuntu12 --without-mips-ubuntu12 --static --log-trace
[2015-09-22 15:53:01.155][trace][17404][0] arm tool chain: cc=arm-linux-gnueabihf-gcc gcc=arm-linux-gnueabihf-gcc g++=arm-linux-gnueabihf-g++-5 ar=arm-linux-gnueabihf-ar ld=arm-linux-gnueabihf-ld randlib=arm-linux-gnueabihf-ranlib
[2015-09-22 15:53:01.155][trace][17404][0] conf: conf/srs.conf, limit: 1000
[2015-09-22 15:53:01.155][trace][17404][0] SRS for arm(build on ubuntu)
[2015-09-22 15:53:01.155][trace][17404][0] writev limits write 1024 iovs a time
[2015-09-22 15:53:01.155][warn][17404][0][2] SRS 2.0.189 is not stable, please use stable branch 1.0release instead
[2015-09-22 15:53:01.155][warn][17404][0][2] check feature rtmp handshake: off
[2015-09-22 15:53:01.155][warn][17404][0][2] check feature hls: off
[2015-09-22 15:53:01.155][trace][17404][0] check feature hds: on
[2015-09-22 15:53:01.155][trace][17404][0] check feature http callback: on
[2015-09-22 15:53:01.155][trace][17404][0] check feature http api: on
[2015-09-22 15:53:01.156][trace][17404][0] check feature http server: on
[2015-09-22 15:53:01.156][trace][17404][0] check feature http parser: on
[2015-09-22 15:53:01.156][trace][17404][0] check feature dvr: on
[2015-09-22 15:53:01.156][trace][17404][0] check feature transcode: on
[2015-09-22 15:53:01.156][trace][17404][0] check feature ingest: on
[2015-09-22 15:53:01.156][warn][17404][0][2] check feature system stat: off
[2015-09-22 15:53:01.156][warn][17404][0][2] check feature compile nginx: off
[2015-09-22 15:53:01.156][warn][17404][0][2] check feature compile ffmpeg: off
[2015-09-22 15:53:01.156][warn][17404][0][2] stream caster: off
[2015-09-22 15:53:01.156][trace][17404][0] MR(merged-read): on, @see https://github.com/simple-rtmp-server/srs/issues/241
[2015-09-22 15:53:01.156][trace][17404][0] MR(merged-read) default 0 sleep 350
[2015-09-22 15:53:01.156][trace][17404][0] MW(merged-write) default sleep 350
[2015-09-22 15:53:01.156][trace][17404][0] read chunk stream cache cid [0, 16)
[2015-09-22 15:53:01.156][trace][17404][0] default gop cache 1, play queue 30s
[2015-09-22 15:53:01.156][trace][17404][0] complex send algorithm enabled.
[2015-09-22 15:53:01.156][warn][17404][0][2] TCP_NODELAY enabled, may hurts performance.
[2015-09-22 15:53:01.156][trace][17404][0] auto guess socket send buffer by merged write
[2015-09-22 15:53:01.156][trace][17404][0] system default latency in ms: mw(0-350) + mr(0-350) + play-queue(0-30000)
[2015-09-22 15:53:01.156][trace][17404][0] http: root mount to ./objs/nginx/html
[2015-09-22 15:53:01.156][trace][17404][0] start deamon mode...
[2015-09-22 15:53:01.157][trace][17405][0] father process exit. ret=0
[2015-09-22 15:53:01.158][trace][17406][0] son(deamon) process running.
[2015-09-22 15:53:01.158][trace][17406][0] st_set_eventsys to epoll
[2015-09-22 15:53:01.158][trace][17406][0] st_init success, use epoll
[2015-09-22 15:53:01.159][trace][17404][0] grandpa process exit.
[2015-09-22 15:53:01.159][trace][17406][100] server main cid=100
[2015-09-22 15:53:01.160][trace][17406][100] write pid=17406 to ./objs/srs.pid success!

Well today I tried two different ways, I built it using a Debian machine with cross-build-essential and --arm flag, and it compiles fine, but still don't run.

Then I tried with less options, like disable hls, hds and stream-caster but no luck either.
I'm out of ideas what could be.

@winlinvip
Copy link
Member

What's your ARM version? Any coredumps?

@deluxor
Copy link
Author

deluxor commented Sep 23, 2015

root@origin:~# cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 1332.01
Features        : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfp                                                         d32 lpae
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0x584
CPU revision    : 2

processor       : 1
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 1332.01
Features        : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfp                                                         d32 lpae
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0x584
CPU revision    : 2

processor       : 2
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 1332.01
Features        : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfp                                                         d32 lpae
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0x584
CPU revision    : 2

processor       : 3
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 1332.01
Features        : half thumb fastmult vfp edsp thumbee vfpv3 tls idiva idivt vfp                                                         d32 lpae
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0x584
CPU revision    : 2

Hardware        : Marvell Armada 370/XP (Device Tree)
Revision        : 0000
Serial          : 0000000000000000
root@origin:

@winlinvip
Copy link
Member

The raspberrypi is armv7, seems ok to run SRS, but I have not test it.
BTW, is SRS1 ok? Can you try it: http://ossrs.net/srs.release/releases/files/SRS-Ubuntu12-armv7cpu-1.0.30.zip
I will build and run in respberry-py later.

@deluxor
Copy link
Author

deluxor commented Sep 23, 2015

Nop, neither that version runs, friend feel free to access one of my nodes it is with Ubuntu 12.04 Precise, it is an ARM like that example before, check your email please.

Thanks.

@winlinvip
Copy link
Member

I will try on my arm device, I not finger the bug out, I will try your device.
I got a armv6(RespberryPi1) and armv7(Cubieboard2) device.

@winlinvip
Copy link
Member

I fix some bug for run with --pi on RespberryPi:

winlin@raspberrypi:~/srs$ cat /proc/cpuinfo
processor   : 0
model name  : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS    : 2.00
Features    : swp half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xb76
CPU revision    : 7

Hardware    : BCM2708
Revision    : 000d
Serial      : 00000000445c5260

And SRS 2.0.191:

winlin@raspberrypi:~/srs$ ./objs/srs -c conf/console.conf 
[2015-09-23 03:02:47.016][trace][5644][112] RTMP client ip=192.168.1.18
[2015-09-23 03:02:47.101][trace][5644][112] complex handshake success
[2015-09-23 03:02:47.103][trace][5644][112] connect app, tcUrl=rtmp://arm:1935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, args=null
[2015-09-23 03:02:47.105][trace][5644][112] out chunk size to 60000
[2015-09-23 03:02:47.150][trace][5644][112] input chunk size to 60000
[2015-09-23 03:02:47.152][trace][5644][112] client identified, type=fmle-publish, stream_name=livestream, duration=-1.00
[2015-09-23 03:02:47.154][trace][5644][112] source url=/live/livestream, ip=192.168.1.18, cache=1, is_edge=0, source_id=-1[-1]
[2015-09-23 03:02:47.212][trace][5644][112] start publish mr=0/350, p1stpt=20000, pnt=20000, tcp_nodelay=0, rtcid=113
[2015-09-23 03:02:47.232][trace][5644][112] got metadata, width=768, height=320, vcodec=7, acodec=10
[2015-09-23 03:02:47.234][trace][5644][112] 46B video sh,  codec(7, profile=High, level=3.2, 768x384, 0kbps, 0fps, 0s)
[2015-09-23 03:02:47.236][trace][5644][112] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
[2015-09-23 03:03:01.614][trace][5644][115] RTMP client ip=192.168.1.18
[2015-09-23 03:03:01.715][trace][5644][115] complex handshake success
[2015-09-23 03:03:01.717][trace][5644][115] connect app, tcUrl=rtmp://arm/live, pageUrl=http://www.ossrs.net/players/srs_player.html?vhost=dev&stream=livestream&server=dev&port=1935, swfUrl=http://www.ossrs.net/players/srs_player/release/srs_player.swf?_version=1.26, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, args=null
[2015-09-23 03:03:01.719][trace][5644][115] out chunk size to 60000
[2015-09-23 03:03:01.745][trace][5644][115] ignored. set buffer length to 200
[2015-09-23 03:03:01.763][trace][5644][115] client identified, type=Play, stream_name=livestream, duration=-1.00
[2015-09-23 03:03:01.765][trace][5644][115] source url=/live/livestream, ip=192.168.1.18, cache=1, is_edge=0, source_id=112[112]
[2015-09-23 03:03:01.769][trace][5644][115] dispatch cached gop success. count=373, duration=5476
[2015-09-23 03:03:01.771][trace][5644][115] create consumer, queue_size=30.00, jitter=1
[2015-09-23 03:03:01.784][trace][5644][115] mw changed sleep 350=>350, max_msgs=128, esbuf=218750, sbuf 21480=>218750, realtime=0
[2015-09-23 03:03:01.785][trace][5644][115] start play smi=0.00, mw_sleep=350, mw_enabled=1, realtime=0, tcp_nodelay=0
[2015-09-23 03:03:01.787][warn][5644][115][11] resize iovs 256 => 512, max_msgs=128
[2015-09-23 03:03:01.792][trace][5644][116] ignored. set buffer length to 200
[2015-09-23 03:03:09.643][trace][5644][104] user terminate program

I will try armv7 device later.

@winlinvip
Copy link
Member

Seems my cubieboard(armv7) corrupt, I will cross build on ubuntu14 then copy to your armv7 machine.

@deluxor
Copy link
Author

deluxor commented Sep 23, 2015

Thank you for your efforts fixing this really appreciate it!

@winlinvip
Copy link
Member

winlin@ubuntu:~$ uname -a
Linux ubuntu 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

winlin@ubuntu:~$ sudo aptitude install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi

winlin@ubuntu:~$ arm-linux-gnueabi-g++ --version
arm-linux-gnueabi-g++ (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3

winlin@ubuntu:~$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3

winlinvip added a commit that referenced this issue Sep 23, 2015
@winlinvip
Copy link
Member

I find a bug for cross build, introduced by SRS2 configure script refined.
Please update code, then build SRS:

./configure --arm && make

Then copy the objs/srs to your armv7 os.

Then I got another segment fault:

Program received signal SIGSEGV, Segmentation fault.
_st_thread_main () at sched.c:316
316 sched.c: No such file or directory.
(gdb) bt
#0  _st_thread_main () at sched.c:316
#1  0x000df888 in st_thread_create (start=0, arg=0x2710, joinable=918216, stk_size=-1090521796) at sched.c:591
#2  0x00082518 in SrsThread::start (this=0x2f64d0) at src/app/srs_app_thread.cpp:104
#3  0x000488a8 in SrsListener::listen (this=0x2f64b0, port=1935) at src/app/srs_app_server.cpp:168
#4  0x0004b438 in SrsServer::listen_rtmp (this=0x2d58b8) at src/app/srs_app_server.cpp:781
#5  0x0004a788 in SrsServer::listen (this=0x2d58b8) at src/app/srs_app_server.cpp:559
#6  0x000de09c in run_master () at src/main/srs_main_server.cpp:282
#7  0x000ddb70 in run () at src/main/srs_main_server.cpp:225
#8  0x000dda98 in main (argc=3, argv=0xbefff7f4) at src/main/srs_main_server.cpp:218

@winlinvip
Copy link
Member

I finger it out, the ubuntu14 gcc/g++ version too high, which changed the longjmp context buffer layout, then cause srs/st to crash.

The version of ubuntu14 gcc/g++ to cross build srs: 4.7.3
The version which srs is ok to run on armv7, debian: 4.6.4

For gcc 4.7.3, gdb the research/arm/jmp_sp.cpp:

(gdb) p $sp
$1 = (void *) 0xbefff668
(gdb) x /64xb (char*)context[0].__jmpbuf
0x89f00 <context>:  0xa0    0xf6    0xff    0xbe    0x00    0x00    0x00    0x00
0x89f08 <context+8>:    0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x89f10 <context+16>:   0x00    0x00    0x00    0x00    0x5c    0xab    0x00    0x00
0x89f18 <context+24>:   0xfc    0xab    0x00    0x00    0x74    0xf6    0xff    0xbe
0x89f20 <context+32>:   0x3d    0xf2    0x25    0x48    0x61    0x89    0xda    0xf6
0x89f28 <context+40>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x89f30 <context+48>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x89f38 <context+56>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00

Nothing match the sp.

For gcc 4.6.3, gdb the file:


(gdb) p $sp
$1 = (void *) 0xbefff670
(gdb) x /64xb (char*)context[0].__jmpbuf
0x11040 <context>:  0x00    0x00    0x00    0x00    0xa8    0xf6    0xff    0xbe
0x11048 <context+8>:    0x39    0x84    0x00    0x00    0x70    0xf6    0xff    0xbe
0x11050 <context+16>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x11058 <context+24>:   0x00    0xf0    0x01    0x40    0x00    0x00    0x00    0x00
0x11060 <context+32>:   0x70    0xf6    0xff    0xbe    0xcf    0x84    0x00    0x00
0x11068 <context+40>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x11070 <context+48>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x11078 <context+56>:   0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00

The jmpbuf[8] is the sp.

Please read bug #190

@winlinvip
Copy link
Member

I will try to fix the high version of gcc for arm, maybe we can use the x86-64 st setjmp and longjmp.

@winlinvip
Copy link
Member

It's very hard to implments the setjmp and longjmp for arm for me.
I just error when glibc > 2.15.
That is, for this bug, you can build srs direclty on your armv7, not use the cross build which gcc tools glibc >2.15.
Or, for SRS:

  1. all i386/x86_64/amd64 are ok.
  2. arm only support glibc < 2.15.

I have tried your armv7 debian server, glibc is ok, srs is built to /root/srs/trunk/objs/srs

@winlinvip
Copy link
Member

I have confirmed:

  1. SRS3 introduced some bug
  2. Ubuntu cross build tool upgraded to 4.7.3, which changed the setjmp and longjmp of glibc 2.15+, this make st(state-threads) corrupt.

For 1, I have fixed it, please use 2.0.192.
For 2, it's impossible to fix it, there is a workaround, you can build srs by gcc 4.6.3 or directly build on your armv7 server(which gcc is 4.6.3).

What happended when all gcc upgrade to 4.7? SRS cannot run on ARM, maybe SRS will migrate to GO, haha.

@winlinvip
Copy link
Member

Directly build on your server:

cd ~/srs/trunk/ && ./configure && make -j4

@winlinvip
Copy link
Member

U can use the following url to visit your arm server:

http://ossrs.net/console/ng_index.html#/summaries?host=192.168.1.187&port=1985

Please use your server ip.

@deluxor
Copy link
Author

deluxor commented Sep 23, 2015

Thank you man you are tha best!

@winlinvip winlinvip self-assigned this Sep 25, 2021
@winlinvip winlinvip added TransByAI Translated by AI/GPT. EnglishNative This issue is conveyed exclusively in English. and removed TransByAI Translated by AI/GPT. labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

No branches or pull requests

2 participants