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 on raspberrypi zero2w running on Raspberry Pi crashes #2807

Closed
idreamerhx opened this issue Dec 23, 2021 · 4 comments
Closed

crash on raspberrypi zero2w running on Raspberry Pi crashes #2807

idreamerhx opened this issue Dec 23, 2021 · 4 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@idreamerhx
Copy link

idreamerhx commented Dec 23, 2021

Note: Before asking a question, please read the FAQ (Please read FAQ before filing an issue) #2716

Description

Description

Please describe the issue you encountered here. The program crashes when running on Raspberry Pi Zero 2W.

1. SRS Version

Version: 4.0release

1. SRS Log

Log:


[2021-12-23 12:56:47.789][Trace][2830][h219s5f4] HTTP #0 192.168.1.35:62102 GET http://192.168.1.34:8080/console/js/srs.console.js, content-length=-1
[2021-12-23 12:56:47.789][Trace][2830][h219s5f4] http match file=./objs/nginx/html/console/js/srs.console.js, pattern=/, upath=/console/js/srs.console.js
[2021-12-23 12:56:47.811][Trace][2830][1823a257] TCP: before dispose resource(HttpStream)(0x94c648), conns=7, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:47.811][Warn][2830][1823a257][104] client disconnect peer. ret=1007
[2021-12-23 12:56:47.811][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=7, removing=0, unsubs=0
[2021-12-23 12:56:47.811][Trace][2830][1823a257] TCP: disposing #0 resource(HttpStream)(0x94c648), conns=7, disposing=1, zombies=0
[2021-12-23 12:56:47.845][Trace][2830][w990i6l0] TCP: before dispose resource(HttpStream)(0x948a00), conns=6, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:47.845][Warn][2830][w990i6l0][104] client disconnect peer. ret=1007
[2021-12-23 12:56:47.845][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=6, removing=0, unsubs=0
[2021-12-23 12:56:47.845][Trace][2830][w990i6l0] TCP: disposing #0 resource(HttpStream)(0x948a00), conns=6, disposing=1, zombies=0
[2021-12-23 12:56:47.914][Trace][2830][wab17s83] TCP: before dispose resource(HttpStream)(0x944f58), conns=5, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:47.914][Warn][2830][wab17s83][104] client disconnect peer. ret=1007
[2021-12-23 12:56:47.914][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=5, removing=0, unsubs=0
[2021-12-23 12:56:47.914][Trace][2830][wab17s83] TCP: disposing #0 resource(HttpStream)(0x944f58), conns=5, disposing=1, zombies=0
[2021-12-23 12:56:47.943][Trace][2830][2190n5kb] TCP: before dispose resource(HttpStream)(0x957628), conns=4, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:47.943][Warn][2830][2190n5kb][104] client disconnect peer. ret=1007
[2021-12-23 12:56:47.943][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=4, removing=0, unsubs=0
[2021-12-23 12:56:47.943][Trace][2830][2190n5kb] TCP: disposing #0 resource(HttpStream)(0x957628), conns=4, disposing=1, zombies=0
[2021-12-23 12:56:47.945][Trace][2830][2x92gu52] TCP: before dispose resource(HttpStream)(0x944c10), conns=3, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:47.945][Warn][2830][2x92gu52][104] client disconnect peer. ret=1007
[2021-12-23 12:56:47.946][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=3, removing=0, unsubs=0
[2021-12-23 12:56:47.946][Trace][2830][2x92gu52] TCP: disposing #0 resource(HttpStream)(0x944c10), conns=3, disposing=1, zombies=0
[2021-12-23 12:56:47.961][Trace][2830][h219s5f4] TCP: before dispose resource(HttpStream)(0x949018), conns=2, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:47.961][Warn][2830][h219s5f4][104] client disconnect peer. ret=1007
[2021-12-23 12:56:47.961][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2021-12-23 12:56:47.961][Trace][2830][h219s5f4] TCP: disposing #0 resource(HttpStream)(0x949018), conns=2, disposing=1, zombies=0
[2021-12-23 12:56:48.059][Trace][2830][515d330v] HTTP #0 192.168.1.35:62104 GET http://192.168.1.34:8080/console/views/streams.html, content-length=-1
[2021-12-23 12:56:48.059][Trace][2830][515d330v] http match file=./objs/nginx/html/console/views/streams.html, pattern=/, upath=/console/views/streams.html
[2021-12-23 12:56:48.148][Trace][2830][aq27562x] HTTP #0 192.168.1.35:62106 GET http://192.168.1.34:8080/favicon.ico, content-length=-1
[2021-12-23 12:56:48.148][Trace][2830][aq27562x] http match file=./objs/nginx/html/favicon.ico, pattern=/, upath=/favicon.ico
[2021-12-23 12:56:48.207][Trace][2830][515d330v] TCP: before dispose resource(HttpStream)(0x948fc0), conns=3, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:48.207][Warn][2830][515d330v][104] client disconnect peer. ret=1007
[2021-12-23 12:56:48.207][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=3, removing=0, unsubs=0
[2021-12-23 12:56:48.207][Trace][2830][515d330v] TCP: disposing #0 resource(HttpStream)(0x948fc0), conns=3, disposing=1, zombies=0
[2021-12-23 12:56:48.291][Trace][2830][4h60cb23] HTTP #0 192.168.1.35:62107 GET http://192.168.1.34:1985/api/v1/raw?callback=angular.callbacks._0&rpc=raw, content-length=-1
[2021-12-23 12:56:48.293][Trace][2830][aq27562x] TCP: before dispose resource(HttpStream)(0x944f80), conns=4, zombies=0, ign=0, inz=0, ind=0
[2021-12-23 12:56:48.293][Warn][2830][aq27562x][104] client disconnect peer. ret=1007
[2021-12-23 12:56:48.293][Trace][2830][34i19d6o] HTTP #0 192.168.1.35:62108 GET http://192.168.1.34:1985/api/v1/vhosts/?callback=angular.callbacks._1, content-length=-1
[2021-12-23 12:56:48.294][Trace][2830][e3i5rqz1] TCP: clear zombies=1 resources, conns=4, removing=0, unsubs=0
[2021-12-23 12:56:48.294][Trace][2830][aq27562x] TCP: disposing #0 resource(HttpStream)(0x944f80), conns=4, disposing=1, zombies=0
[2021-12-23 12:56:48.505][Trace][2830][4h60cb23] HTTP #1 192.168.1.35:62107 GET http://192.168.1.34:1985/api/v1/streams/?callback=angular.callbacks._2, content-length=-1
[2021-12-23 12:56:48.675][Trace][2830][91ve98t9] Hybrid cpu=5.01%,12MB, cid=2,1, timer=63,0,0, clock=0,49,1,0,1,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:21,oth:0,buf:0)
[2021-12-23 12:56:51.721][Trace][2830][4h60cb23] HTTP #2 192.168.1.35:62107 GET http://192.168.1.34:1985/api/v1/streams/?callback=angular.callbacks._3, content-length=-1


1. SRS Configuration

Config:


# main config for srs.
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
#srs_log_tank        file;
#srs_log_file        ./objs/srs.log;
daemon              off;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
rtc_server {
    enabled on;
    listen 8000; # UDP port
    # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#config-candidate
    candidate $CANDIDATE;
}
vhost __defaultVhost__ {
    hls {
        enabled         on;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    rtc {
        enabled     on;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtmp-to-rtc
        rtmp_to_rtc off;
        # @see https://github.com/ossrs/srs/wiki/v4_CN_WebRTC#rtc-to-rtmp
        rtc_to_rtmp off;
    }
}


Replay

How to replay bug?

git clone -b 4.0release https://gitee.com/ossrs/srs.git &&
cd srs/trunk && ./configure && make && ./objs/srs -c conf/srs.conf

ffmpeg -re -i ./doc/source.flv -c copy -f flv -y rtmp://localhost/live/livestream

Open http://localhost:8080/

Expect

Expect

Describe your expectation
No crashing.

Note
root@raspi2w:/opt/srs-4.0release/trunk# uname -a
Linux raspi2w 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux

TRANS_BY_GPT3

@idreamerhx
Copy link
Author

root@raspi2w:/opt/srs-4.0release/trunk# gdb objs/srs
GNU gdb (Raspbian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from objs/srs...
set(gdb) set args -c conf/srs.conf
(gdb) r
Starting program: /opt/srs-4.0release/trunk/objs/srs -c conf/srs.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[2021-12-23 12:56:28.682][Trace][2830][540046g6] XCORE-SRS/4.0.207(Leo)
[2021-12-23 12:56:28.683][Trace][2830][540046g6] config parse complete
[2021-12-23 12:56:28.683][Trace][2830][540046g6] you can check log by: tail -n 30 -f ./objs/srs.log
[2021-12-23 12:56:28.684][Trace][2830][540046g6] please check SRS by: ./etc/init.d/srs status

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/arm/armv6/strlen.S:26
26 ../sysdeps/arm/armv6/strlen.S: No such file or directory.
(gdb) l
21 in ../sysdeps/arm/armv6/strlen.S
(gdb)

@idreamerhx
Copy link
Author

crash on 3.0

(gdb) set args -c conf/srs.conf
(gdb) r
Starting program: /opt/srs-3.0release/trunk/objs/srs -c conf/srs.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[2021-12-23 13:20:00.734][Trace][4516][0] XCORE-SRS/3.0.170(OuXuli)
[2021-12-23 13:20:00.735][Trace][4516][0] config parse complete
[2021-12-23 13:20:00.735][Trace][4516][0] you can check log by: tail -f ./objs/srs.log (@see https://github.com/ossrs/srs/wiki/v1_CN_SrsLog)
[2021-12-23 13:20:00.735][Trace][4516][0] please check SRS by: ./etc/init.d/srs status

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/arm/armv6/strlen.S:26
26 ../sysdeps/arm/armv6/strlen.S: No such file or directory.
(gdb) bt
#0 strlen () at ../sysdeps/arm/armv6/strlen.S:26
#1 0x76a72890 in __vfprintf_internal (s=0x38e870, s@entry=0x0, format=format@entry=0x201270 "-> HLS time=%dms, sno=%d, ts=%s, dur=%.2f, dva=%dp", ap=..., ap@entry=...,
mode_flags=mode_flags@entry=3729904) at vfprintf-internal.c:1688
#2 0x76a8480c in __vsnprintf_internal (
string=0x26410c "-> HLS time=10000739ms, sno=0, ts= 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)\napp]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1\nter --with-http-"..., maxlen=, format=0x201270 "-> HLS time=%dms, sno=%d, ts=%s, dur=%.2f, dva=%dp", args=..., mode_flags=mode_flags@entry=0) at vsnprintf.c:114
#3 0x76a84870 in ___vsnprintf (string=, maxlen=, format=, args=...) at vsnprintf.c:124
#4 0x0012dd00 in SrsFastLog::trace (this=0x2640c0, tag=0x0, context_id=187, fmt=0x201270 "-> HLS time=%dms, sno=%d, ts=%s, dur=%.2f, dva=%dp") at src/app/srs_app_log.cpp:151
#5 0x001193dc in SrsHls::hls_show_mux_log (this=0x334700) at src/app/srs_app_hls.cpp:1361
#6 0x001191b0 in SrsHls::on_video (this=0x334700, shared_video=0x38ec88, format=0x334060) at src/app/srs_app_hls.cpp:1345
#7 0x001017dc in SrsOriginHub::on_video (this=0x3346c0, shared_video=0x38ec88, is_sequence_header=false) at src/app/srs_app_source.cpp:1062
#8 0x00108468 in SrsSource::on_video_imp (this=0x334658, msg=0x38ec88) at src/app/srs_app_source.cpp:2303
#9 0x0010803c in SrsSource::on_video (this=0x334658, shared_video=0x3a1b40) at src/app/srs_app_source.cpp:2258
#10 0x000f9d18 in SrsRtmpConn::process_publish_message (this=0x319080, source=0x334658, msg=0x3a1b40) at src/app/srs_app_rtmp_conn.cpp:1021
#11 0x000f9aec in SrsRtmpConn::handle_publish_message (this=0x319080, source=0x334658, msg=0x3a1b40) at src/app/srs_app_rtmp_conn.cpp:993
#12 0x001a5088 in SrsPublishRecvThread::consume (this=0x32f2e0, msg=0x3a1b40) at src/app/srs_app_recv_thread.cpp:389
#13 0x001a3c0c in SrsRecvThread::do_cycle (this=0x32f2e8) at src/app/srs_app_recv_thread.cpp:146
#14 0x001a39f4 in SrsRecvThread::cycle (this=0x32f2e8) at src/app/srs_app_recv_thread.cpp:115
#15 0x0012d4fc in SrsSTCoroutine::cycle (this=0x37e050) at src/app/srs_app_st.cpp:198
#16 0x0012d5a8 in SrsSTCoroutine::pfn (arg=0x37e050) at src/app/srs_app_st.cpp:213
#17 0x001e3240 in _st_thread_main () at sched.c:337
#18 0x001e3b9c in st_thread_create (start=0x2aa590, arg=0x333af0, joinable=3338468, stk_size=3338468) at sched.c:616
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

@idreamerhx
Copy link
Author

I temporary close hls and it works.
please fix this small bug.

seem the string is to long for # 4 0x0012dd00 in SrsFastLog::trace

@winlinvip
Copy link
Member

👍 Thanks for your report, very specific.

@winlinvip winlinvip self-assigned this Dec 23, 2021
@winlinvip winlinvip added the Bug It might be a bug. label Dec 23, 2021
@winlinvip winlinvip added this to the 4.0 milestone Dec 23, 2021
@winlinvip winlinvip changed the title crash on raspberrypi zero2w 在树莓派上运行崩溃 crash on raspberrypi zero2w running on Raspberry Pi crashes Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 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. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants