You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A race condition exists between the RTSP server and the PAUSE command, leading to a crash with a nil pointer dereference. The crash occurs when writePacketRTPInQueueTCP attempts to access tcpConn after it has been set to nil by the PAUSE command.
The lock in writePacketRTP does not guard writePacketRTPInQueue as it's running in an async process. Additionally, the lock is not acquired during the pause command.
The PAUSE command sets ss.tcpConn = nil.
The async writePacketRTPInQueueTCP attempts to use tcpConn.nconn.SetWriteDeadline, leading to a nil pointer dereference.
Testing
Simulated rapid PAUSE and RESUME calls to verify stability.
In our case,
Launch ffplay -i rtsp://localhost:8554/a
Play and pause repeatability by holding the p key.
The text was updated successfully, but these errors were encountered:
A race condition exists between the RTSP server and the
PAUSE
command, leading to a crash with a nil pointer dereference. The crash occurs whenwritePacketRTPInQueueTCP
attempts to accesstcpConn
after it has been set tonil
by thePAUSE
command.Stack trace:
Root Cause
The lock in
writePacketRTP
does not guardwritePacketRTPInQueue
as it's running in an async process. Additionally, the lock is not acquired during the pause command.The PAUSE command sets
ss.tcpConn = nil
.The async
writePacketRTPInQueueTCP
attempts to usetcpConn.nconn.SetWriteDeadline
, leading to anil
pointer dereference.Testing
Simulated rapid PAUSE and RESUME calls to verify stability.
In our case,
Launch
ffplay -i rtsp://localhost:8554/a
Play and pause repeatability by holding the
p
key.The text was updated successfully, but these errors were encountered: