Closed pbesedm closed 7 years ago
Directly configuring FLV did not reproduce, let me check if there is a race condition in the code.
TRANS_BY_GPT3
http://www.kuqin.com/language/20100307/80980.html The behavior of a wild pointer is undefined, but from what I understand, we generally get an "access violation" rather than a "pure virtual function call". The situations we encounter in reality can be more complex than mentioned above: during the destruction process, a subclass object encounters an exception and is not completely destroyed, leaving behind a "defective" object. The program continues to use this defective object and calls a pure virtual function.
TRANS_BY_GPT3
SRS version: srs-2.0-b4
Source (192.168.4.172):
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Configuration (conf/http.flv.live.conf):
listen 1935;
max_connections 1000;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
}
edge1 (192.168.1.128):
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
Configuration (conf/http.flv.live.edge1.conf)
listen 19351;
max_connections 1000;
pid objs/srs.flv.19351.pid;
srs_log_file objs/srs.flv.19351.log;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
mode remote;
origin 192.168.4.172;
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
}
Reproduction steps:
[2017-02-25 11:48:16.659][trace][27708][108] complex handshake success.
[2017-02-25 11:48:16.659][trace][27708][108] edge ingest from 192.168.4.172:1935 at rtmp://192.168.4.172/live
[2017-02-25 11:48:16.737][trace][27708][108] connected, version=2.0.230, ip=192.168.4.172, pid=31970, id=124, dsu=1
[2017-02-25 11:48:16.738][trace][27708][108] edge change from 100 to state 101 (pull).
[2017-02-25 11:48:16.750][trace][27708][108] got metadata, width=1280, height=720
[2017-02-25 11:48:16.750][trace][27708][108] protocol in.buffer=0, in.ack=2500000, out.ack=2500000, in.chunk=60000, out.chunk=60000
[2017-02-25 11:48:16.750][trace][27708][108] 7B audio sh, codec(10, profile=LC, 2channels, 0kbps, 22050HZ), flv(16bits, 2channels, 22050HZ)
[2017-02-25 11:48:16.751][trace][27708][108] 45B video sh, codec(7, profile=High, level=3.1, 1280x720, 0kbps, 0fps, 0s)
[2017-02-25 11:48:17.116][trace][27708][105] update source_id=108[108]
[2017-02-25 11:48:19.666][warn][27708][108][4] origin disconnected, retry. ret=1007
Terminal output:
pure virtual method called
terminate called without an active exception
TRANS_BY_GPT3
Fixed in #752
CentOS release 6.7 (Final) x86_64 SRS-V2.0 b4 Accessing http-flv edge with VLC: http://x.x.x.x:xxxx/live/livestream.flv?token=xxxx&time=xxxxx can be played. In the case of only one VLC accessing the edge, if this user disconnects, the edge will output the log: origin disconnected, retry. ret=1007. At this time, the SRS edge program crashes and the terminal prints: pure virtual method called terminate called without an active exception Below is the call stack:
TRANS_BY_GPT3