bugtracker
bugtracker copied to clipboard
PlayEndpoint connect rtsp-camera , the log report Abnormal alarm
Related:
- https://github.com/Kurento/bugtracker/issues/532
Prerequisites
- [] I have read the SUPPORT document yes
- [] I have checked the Troubleshooting Guide yes
- [] I have tested with the latest version of Kurento I use the version 6.13.2
Issue description
if i use PlayEndpoint play a rtsp url , it will report some alarm in the log like below:
2020-06-18T18:00:40,875779 1996 0x00007ff29cff9700 error libav :0 () no frame!
2020-06-18T18:00:40,875948 1996 0x00007ff29cff9700 warning libav gstavviddec.c:1528 gst_ffmpegviddec_frame() <avdec_h264-46> avdec_h264: decoding error (len: -1094995529, have_data: 0)
2020-06-18T18:00:40,930307 1996 0x00007ff242ff5700 error libav :0 () no frame!
2020-06-18T18:00:40,930460 1996 0x00007ff242ff5700 warning libav gstavviddec.c:1528 gst_ffmpegviddec_frame() <avdec_h264-47> avdec_h264: decoding error (len: -1094995529, have_data: 0)
2020-06-18T18:00:42,594393 1996 0x00007ff242ff5700 error libav :0 () no frame!
2020-06-18T18:00:42,594546 1996 0x00007ff242ff5700 warning libav gstavviddec.c:1528 gst_ffmpegviddec_frame() <avdec_h264-47> avdec_h264: decoding error (len: -1094995529, have_data: 0)
2020-06-18T18:00:42,892234 1996 0x00007ff29cff9700 error libav :0 () no frame!
2020-06-18T18:00:42,892376 1996 0x00007ff29cff9700 warning libav gstavviddec.c:1528 gst_ffmpegviddec_frame() <avdec_h264-46> avdec_h264: decoding error (len: -1094995529, have_data: 0)
I watch the kurento-meida-server' memory use the interface of serverManager.getUsedMemory()
the memory will keep increasing, 2 cameras will occupy about 1.8GB memory .
I guess the memory keep increasing, Is it whether related to the alarm log information I release the playEndpoint object, but the memory can not decline . so if after a certain period of time, my memory will be exhausted, and kurento will crash. I need to restart the all server
Context
I wish the playEndpoint release , the memory can release. And the endpoint not increasing, the memory is not increasing .
I need to confirm if this is a known problem.
How to reproduce?
1 Create mediaPipeline ; 2 Create a playendpoint to read a rtsp url or mp4 (the case is same), and the encode is H.264 3 Remind the memory stauts 4 see the kurento-media-server ' log , it will report above log info .
the main code
public PlayerEndpoint createPlayEndPoint(String url
) {
MediaPipeline mediaPipeline = kurentoClientWrapper.getEdgeMediaPipeline();
PlayerEndpoint playerEndpoint = null;
try {
playerEndpoint = new PlayerEndpoint.Builder(mediaPipeline, url)
.withNetworkCache(100)
.build();
} catch (Exception e) {
log.warn("createPlayerEndpoint ===>>> create err = {}",e);
return null;
}
return playerEndpoint;
}
private void play(EdgeCameraSession edgeCameraSession) {
PlayerEndpoint playerEndpoint = edgeCameraSession.getPlayerEndpoint();
playerEndpoint.play(new Continuation<Void>() {
@Override
public void onSuccess(Void result) throws Exception {
edgeCameraSession.setDeviceStatus(GlobalValue.EDGE_CAMERA_STATE_ACTIVE);
edgeCameraSession.updateDeviceStatus();
}
@Override
public void onError(Throwable cause) throws Exception {
}
});
}
Expected & current behavior
not report error log info , and the memory not increasing i think, one playEndpoint should not occupy so much memory
(Optional) Possible solution
I try to release the playEndpoint obejct and destory the kurentoclient obejct ,but no effect Unless we restart the kurento service, memory never drops
INFO about your environment
- Use the service in a local network
- The system is ubutun 18.04 lts
- I use the java to development the program
Commands output
cat /etc/lsb-release
**DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"**
kurento-media-server --version
Kurento Media Server version: 6.13.2~14.g4e543d0
Found modules:
'core' version 6.13.2~11.g2f144b59
'elements' version 6.13.2~11.ga4c9f35
'filters' version 6.13.2~2.gd6fea92
dpkg -l | grep -Pi 'kurento|kms-|gst.*1.5|nice'
ii gstreamer1.5-libav:amd64 1.8.1-1kurento1.18.04~20200506171443.gbpb33143 amd64 libav plugin for GStreamer
ii gstreamer1.5-nice:amd64 0.1.16-1.18.04~20200506171443.gbp1854ac amd64 ICE library (GStreamer 1.5 plugin)
ii gstreamer1.5-plugins-bad:amd64 1.8.1-1kurento4.18.04~20200506171443.gbp17d48d amd64 GStreamer plugins from the "bad" set
ii gstreamer1.5-plugins-base:amd64 1.8.1-1kurento2.18.04~20200506171443.gbp7fb324 amd64 GStreamer plugins from the "base" set
ii gstreamer1.5-plugins-good:amd64 1.8.1-1kurento3.18.04~20200506171443.gbp9c3835 amd64 GStreamer plugins from the "good" set
ii gstreamer1.5-plugins-ugly:amd64 1.8.1-1kurento1.18.04~20200506171443.gbpbed8b0 amd64 GStreamer plugins from the "ugly" set
ii gstreamer1.5-pulseaudio:amd64 1.8.1-1kurento3.18.04~20200506171443.gbp9c3835 amd64 GStreamer plugin for PulseAudio
ii kms-core 6.13.2-0kurento1.18.04~20200507140307.gbp2f144b amd64 Kurento Core module
ii kms-elements 6.13.2-0kurento1.18.04~20200507140307.gbpa4c9f3 amd64 Kurento Elements module
ii kms-filters 6.13.2-0kurento1.18.04~20200507140307.gbpd6fea9 amd64 Kurento Filters module
ii kms-jsonrpc 6.13.2-0kurento1.18.04~20200507140307.gbpfd864c amd64 Kurento JSON-RPC library
ii kmsjsoncpp 1.6.3-1kurento1.18.04~20200506171443.gbp15940b amd64 Kurento jsoncpp library
ii kurento-media-server 6.13.2-0kurento1.18.04~20200507140307.gbp4e543d amd64 Kurento Media Server
ii libgstreamer-plugins-bad1.5-0:amd64 1.8.1-1kurento4.18.04~20200506171443.gbp17d48d amd64 GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base1.5-0:amd64 1.8.1-1kurento2.18.04~20200506171443.gbp7fb324 amd64 GStreamer libraries from the "base" set
ii libgstreamer1.5-0:amd64 1.8.1-1kurento2.18.04~20200506171443.gbp84c84b amd64 Core GStreamer libraries and elements
ii libnice10:amd64 0.1.16-1.18.04~20200506171443.gbp1854ac amd64 ICE library (shared library)
ii libsrtp0:amd64 1.6.0-0kurento1.18.04~20200506171443.gbp577e0a amd64 Secure RTP (SRTP) and UST Reference Implementations - shared library
ii libusrsctp 0.9.2-1kurento1.18.04~20200506171443.gbpfd1d0e amd64 sctp-refimpl library
ii openh264 1.4.0-1kurento1.18.04~20200506171443.gbpb8cb17 amd64 OpenH264 library
ii openh264-gst-plugins-bad-1.5:amd64 1.8.1-1kurento4.18.04~20200506171443.gbp17d48d amd64 GStreamer plugins from openh264
ii openwebrtc-gst-plugins 0.10.0-1kurento1.18.04~20200506171443.gbp6a0d22 amd64 OpenWebRTC specific GStreamer plugins
Could you please test with the branch bionic-gstreamer
? Instructions here: Kurento 7.0 moving to GStreamer 1.14 in Bionic
You can choose between apt-get
or Docker image. Docker is better.
If you choose apt-get
, make sure you uninstall properly all packages (Local Upgrade).
thanks , i guess my I problem is same to #433
@ywcai Were you able to upgrade to solve this by upgrading to the newest version of Kurento (inclusive of PR 22)?
@ywcai Were you able to upgrade to solve this by upgrading to the newest version of Kurento (inclusive of PR 22)?
No , we don't upgrade kurento . The bug is because my rtsp stream is disconnect and we auto repeat it , It's use the playEndpoint will cause this bug . Now i use the rtpEndpoint assemble the rtsp protocol to pull the camera stream , it's ok !