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

Kernel Panic on RTMP Stream Opening #1459

Closed
1 task done
XavierGeerinck opened this issue Feb 8, 2023 · 7 comments · Fixed by #1502
Closed
1 task done

Kernel Panic on RTMP Stream Opening #1459

XavierGeerinck opened this issue Feb 8, 2023 · 7 comments · Fixed by #1502
Labels
bug Something isn't working rtmp

Comments

@XavierGeerinck
Copy link

XavierGeerinck commented Feb 8, 2023

Which version are you using?

master

Which operating system are you using?

  • macOS arm64 standard

Describe the issue

2023/02/08 15:07:51 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2023/02/08 15:07:51 INF [RTMP] listener opened on :1935
2023/02/08 15:07:51 INF [HLS] listener opened on :8888
2023/02/08 15:07:51 INF [WebRTC] listener opened on :8889 (HTTP)
2023/02/08 15:07:59 INF [RTMP] [conn 192.168.1.28:55154] opened
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104e22240]

goroutine 24 [running]:
github.com/aler9/gortsplib/v2/pkg/format.(*H264).PayloadType(0x4645bee4e3eda3c7?)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/rtsp-gortsplib/pkg/format/h264.go:95
github.com/aler9/gortsplib/v2.newServerStreamMedia(0x140004f08a0, 0x1400004a190)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/rtsp-gortsplib/server_stream_media.go:41 +0x2b8
github.com/aler9/gortsplib/v2.NewServerStream({0x140003780e0, 0x2, 0x2})
        /Users/xaviergeerinck/Projects/rtsp-simple-server/rtsp-gortsplib/server_stream.go:42 +0x130
github.com/aler9/rtsp-simple-server/internal/core.newStream({0x140003780e0?, 0x10495a59c?, 0x14000451718?}, 0x8?, 0x140002fe288)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/stream.go:24 +0x28
github.com/aler9/rtsp-simple-server/internal/core.(*path).sourceSetReady(0x14000502820, {0x140003780e0?, 0x140004015c0?, 0x140004518ba?}, 0xf?)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/path.go:640 +0x3c
github.com/aler9/rtsp-simple-server/internal/core.(*path).handlePublisherStart(0x14000502820, {{0x1053b93b8, 0x1400001a000}, {0x140003780e0, 0x2, 0x2}, 0x1, 0x1400058e300})
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/path.go:788 +0xd8
github.com/aler9/rtsp-simple-server/internal/core.(*path).run.func2(0x14000502820)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/path.go:473 +0x6b8
github.com/aler9/rtsp-simple-server/internal/core.(*path).run(0x14000502820)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/path.go:499 +0x27c
created by github.com/aler9/rtsp-simple-server/internal/core.newPath
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/path.go:283 +0x570
exit status 2

Describe how to replicate the issue

Start the server with the below:

go run .

Opened an RTMP stream through the DJI Streaming

Did you attach the server logs?

yes

Did you attach a network dump?

yes

capture_rtmp_rtsp.pcapng.zip

@XavierGeerinck
Copy link
Author

Did you have the time to check this already @aler9 ? :) would love to help but I'm not so fluent in this stuff

@aler9
Copy link
Member

aler9 commented Feb 22, 2023

Thanks for reporting the crash, it has been fixed and the fix will be included in the next release.

@XavierGeerinck
Copy link
Author

Thank you! That worked!!

image

Still getting the following though but I suspect it is normal?

2023/02/22 19:50:45 WAR [RTSP] [session bf9a406c] rtcp: invalid packet version
2023/02/22 19:50:45 WAR [RTSP] [session bf9a406c] rtcp: invalid packet version
2023/02/22 19:50:45 WAR [RTSP] [session bf9a406c] rtcp: invalid packet version

@XavierGeerinck
Copy link
Author

Also receiving the following when going from Audio Only to Audio + Video stream:

2023/02/23 10:59:16 INF [RTSP] [conn 127.0.0.1:49741] closed (read tcp 127.0.0.1:8554->127.0.0.1:49741: read: connection reset by peer)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1054812ec]

goroutine 73 [running]:
github.com/aler9/rtsp-simple-server/internal/core.(*stream).writeData(...)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/stream.go:64
github.com/aler9/rtsp-simple-server/internal/core.(*rtmpConn).runPublish(0x140004aa0f0, {0x30997cd198?, 0x105d22260?}, 0x105d22260?)
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/rtmp_conn.go:588 +0xcac
github.com/aler9/rtsp-simple-server/internal/core.(*rtmpConn).runInner(0x140004aa0f0, {0x1057d2068?, 0x140004a2180})
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/rtmp_conn.go:218 +0x138
github.com/aler9/rtsp-simple-server/internal/core.(*rtmpConn).run.func3()
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/rtmp_conn.go:181 +0x30
created by github.com/aler9/rtsp-simple-server/internal/core.(*rtmpConn).run
        /Users/xaviergeerinck/Projects/rtsp-simple-server/internal/core/rtmp_conn.go:180 +0x298
exit status 2

@aler9
Copy link
Member

aler9 commented Feb 23, 2023

2023/02/22 19:50:45 WAR [RTSP] [session bf9a406c] rtcp: invalid packet version

This is caused by your video player, not by the DJI drone. If you believe that's a bug, open another issue.

Also receiving the following when going from Audio Only to Audio + Video stream:

This is fixed by #1504 . If you encounter additional bugs, please open additional issues, do not reuse this one.

@aler9
Copy link
Member

aler9 commented Mar 12, 2023

added in v0.21.6

@github-actions
Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working rtmp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants