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

Updating DVR configuration information through API causes system crash #2015

Closed
qisuwan opened this issue Nov 3, 2020 · 2 comments · Fixed by #2435
Closed

Updating DVR configuration information through API causes system crash #2015

qisuwan opened this issue Nov 3, 2020 · 2 comments · Fixed by #2435
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@qisuwan
Copy link

qisuwan commented Nov 3, 2020

Description'

Please ensure that the markdown structure is maintained.

System crash caused by updating dvr configuration through API

  1. SRS version: 4.0.44
  2. SRS log as follows:'

Please ensure that the markdown structure is maintained.

[2020-11-03 14:16:32.776][Warn][8261][262d282v][0] stats network use index=0, ip=192.168.0.248, ifname=enp3s0
[2020-11-03 14:16:32.776][Warn][8261][262d282v][0] stats disk list: sda sdb xvda xvdb 
[2020-11-03 14:16:32.776][Trace][8261][262d282v] write log to console
[2020-11-03 14:16:32.776][Trace][8261][262d282v] features, rch:on, dash:on, hls:on, hds:off, srt:off, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2020-11-03 14:16:32.776][Trace][8261][262d282v] SRS on  amd64 x86_64, conf:conf/srs.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2020-11-03 14:16:32.776][Trace][8261][262d282v] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2020-11-03 14:16:32.776][Trace][8261][262d282v] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2020-11-03 14:16:32.776][Trace][8261][262d282v] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2020-11-03 14:16:32.776][Warn][8261][262d282v][0] SRS/4.0.44 is not stable
[2020-11-03 14:16:32.776][Trace][8261][262d282v] st_init success, use epoll
[2020-11-03 14:16:32.783][Trace][8261][262d282v] fingerprint=14:57:DA:22:B3:CB:C9:8E:8D:F1:24:CF:EC:76:2D:03:87:C5:BC:C2:B4:A3:C2:04:68:AD:40:33:84:1E:91:54
[2020-11-03 14:16:32.783][Trace][8261][262d282v] RTC server init ok
[2020-11-03 14:16:32.783][Trace][8261][262d282v] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
[2020-11-03 14:16:32.784][Trace][8261][262d282v] http: root mount to ./objs/nginx/html
[2020-11-03 14:16:32.784][Trace][8261][262d282v] server main cid=262d282v, pid=8261, ppid=31018, asprocess=0
[2020-11-03 14:16:32.784][Trace][8261][262d282v] write pid=8261 to ./objs/srs.pid success!
[2020-11-03 14:16:32.784][Trace][8261][262d282v] RTMP listen at tcp://0.0.0.0:1935, fd=7
[2020-11-03 14:16:32.784][Trace][8261][262d282v] HTTP-API listen at tcp://0.0.0.0:1985, fd=8
[2020-11-03 14:16:32.784][Trace][8261][262d282v] HTTP-Server listen at tcp://0.0.0.0:8079, fd=9
[2020-11-03 14:16:32.784][Trace][8261][262d282v] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2020-11-03 14:16:32.784][Trace][8261][262d282v] http: api mount /console to ./objs/nginx/html/console
[2020-11-03 14:16:32.785][Trace][8261][5uo8n0i7] RTC connection manager run
[2020-11-03 14:16:32.785][Trace][8261][e0x77n58] RTMP/API connection manager run
[2020-11-03 14:16:46.637][Trace][8261][7b5z8478] API server client, ip=192.168.0.18:59473
[2020-11-03 14:16:46.637][Trace][8261][7b5z8478] HTTP API 192.168.0.18:59473 GET http://192.168.0.248:1985/api/v1/raw?rpc=update&scope=dvr&value=__defalutVhost__&param=enable&data=live/livestream, content-length=-1, chunked=0
Segmentation fault (core dumped)
  1. SRS configuration is as follows:

Please ensure that the markdown structure is maintained.

listen              1935;
max_connections     1000;
srs_log_tank        console;
srs_log_file        ./objs/srs.log;
daemon              off;
http_api {
    enabled         on;
    listen          1985;
    raw_api {
        enabled  on;
        allow_reload  on;
        allow_query   on;
        allow_update  on;
    }
}
http_server {
    enabled         on;
    listen          8079;
    dir             ./objs/nginx/html;
}
stats {
    network         0;
    disk            sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
    http_hooks {
        enabled    on;
        on_connect    http://192.168.0.18:4003/srs/hook;
        on_close      http://192.168.0.18:4003/srs/hook;
        on_publish    http://192.168.0.18:4003/srs/hook;
        on_unpublish  http://192.168.0.18:4003/srs/hook;
        on_play       http://192.168.0.18:4003/srs/hook;
        on_stop       http://192.168.0.18:4003/srs/hook;
        on_dvr        http://192.168.0.18:4003/srs/hook;
    }
    hls {
        enabled         on;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    dvr {
        enabled    on;
        dvr_apply    test/test;
        dvr_path            ./objs/nginx/html/[app]/[stream]/[2006]/[01]/[02]/[15].[04].[05].[999].flv;
        dvr_plan            segment;
        dvr_duration        30;
        dvr_wait_keyframe   on;
    }
}

Replay

Please ensure that the markdown structure is maintained.

How to replay bug?

Please ensure that the markdown structure is maintained.

How to replay bug?

  1. git pull repository and switch to v4 branch
  2. Start with specified configuration
  3. Use Postman to access: http://192.168.0.248:1985/api/v1/raw?rpc=update&scope=dvr&value=__defaultVhost__&param=enable&data=live/livestream

Please ensure that the markdown structure is maintained.

Expected Behavior

Please ensure that the markdown structure is maintained.

Configuration Update, System Normal

Please ensure that the markdown structure is maintained.

core.dump.zip

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 1, 2020

This needs to be looked at.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Dec 1, 2020
@winlinvip winlinvip added this to the SRS 4.0 release milestone Dec 1, 2020
@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented Jun 23, 2021

  1. post man 访问:http://192.168.0.248:1985/api/v1/raw?rpc=update&scope=dvr&value=__defalutVhost__&param=enable&data=live/livestream
    '

Translation:

'> 3. Postman access: http://192.168.0.248:1985/api/v1/raw?rpc=update&scope=dvr&value=__defalutVhost__&param=enable&data=live/livestream

单词拼写错误。

Translation:

Spelling error in the word.
__defalutVhost__ --> __defaultVhost__.

TRANS_BY_GPT3

@duiniuluantanqin duiniuluantanqin self-assigned this Jun 23, 2021
@duiniuluantanqin duiniuluantanqin linked a pull request Jun 24, 2021 that will close this issue
@winlinvip winlinvip changed the title 通过API更新dvr配置信息导致系统崩溃 Updating DVR configuration information through API causes system crash 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

Successfully merging a pull request may close this issue.

3 participants