Comments (3)
Hello, i tried replicating the issue but in my case the number of goroutines remained constant, so there must be some specific configuration combination that triggers the leak. This is my configuration:
paths:
nonexisting_url:
source: whep://127.0.0.1:8889/nonexisting/whep
nonexisting_host:
source: whep://nonexisting:8889/nonexisting/whep
working:
source: whep://127.0.0.1:8889/stream/whep
can you provide a configuration that allows to trigger the leak?
also, can you provide a goroutine dump by using the integrated pprof server? you need to set pprof: yes
inside the configuration and post the output of
go tool pprof -text http://localhost:9999/debug/pprof/goroutine
from mediamtx.
Hello, the initial report was far from enough, apologies!
In fact, trying to isolate what's happening, I end up with the following minimal config:
pprof: yes
paths:
m400_dltv_whep:
source: whep://1.2.3.4:8889/m400_dltv/whep
The other side is a mediamtx instance (v1.5.1) on another machine with the following relevant config:
paths:
m400_dltv:
source: rtsp://5.6.7.8:5000/dltv1
The camera in question is a shitty one in terms of RTSP. It sends RTP/H264 but:
- SPS and PPS are not part of the stream, only sent in SDP
- Last RTP packet of a NAL should be marked, and it does not do it.
I noticed that in the mediamtx log, I get the following error in loop, which may hint on the issue location:
2024/03/09 19:07:52 ERR [path m400_dltv_whep] [WebRTC source] deadline exceeded while waiting tracks
2024/03/09 19:07:58 INF [path m400_dltv_whep] [WebRTC source] peer connection established, local candidate: host/udp/172.16.212.245/58274, remote candidate: host/udp/1.2.3.4/8189
[... again and again ...]
Attached is a dump of goroutines after a few minutes (basically the time it took to fill this message)
goroutine_3118.txt
If that's not enough, I can try to take an anonymized recording of the video in question. Or find a way to modify to craft one.
It looks like it does connect successfully with WHEP, but because the video format is crap, it ends up retrying to connect, and probably misses some cleanup in the process?
from mediamtx.
fixed by #3124
from mediamtx.
Related Issues (20)
- Allow reading Multichannel Opus streams with WebRTC HOT 7
- Hooks not working (runOnRead,runOnUnread,runOnRecordSegmentCreate,runOnRecordSegmentComplete)
- ffmpeg pull rtsp stream from mediamtx server error HOT 1
- Failed to apply the description for m= section with mid='1': Failed to setup RTCP mux.' HOT 2
- Extra connections when attempting to read an SRT stream with incorrect credentials
- Problem in overriding authInternalUsers configuration HOT 1
- Support streaming H265 over WebRTC HOT 1
- RTMP does not follow standard URL schema so many apps won't accept the URL HOT 1
- docker image has no tzdata so files are saved with incorect timestamps HOT 1
- Hide raspberry pi settings from path API endpoints when the camera isn't an rpi cam HOT 1
- Hide raspberry pi settings from path API endpoints when the camera isn't an rpi cam
- modify config by api wanted HOT 1
- buffer length exceeds 64 HOT 1
- Can't read RTMP source: not enough bytes / Can I push a stream via SRT?
- Make webrtcHandshakeTimeout and webrtcTrackGatherTimeout configurable HOT 2
- Feature Request: Accept German Characters in Camera Path Validation HOT 1
- Feature Request: Accept German Characters in Camera Path Validation HOT 1
- Accept German Characters in Camera Path Validation
- New webrtc configurations not recognized HOT 1
- `remoteAddr` for metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediamtx.