gavv / webrtc-cli

WebRTC command-line peer.
MIT License
225 stars 24 forks source link

Hang on ^C #1

Closed gavv closed 4 years ago

gavv commented 4 years ago
Starting recording...
Starting playback...
ICE connection state changed to connected
Accepting remote track
Recovered 1920 samples using FEC and 0 samples using PLC
^CGot interrupt, exiting
^C^\SIGQUIT: quit
PC=0x4602c1 m=0 sigcode=128

goroutine 0 [idle]:
runtime.futex(0xc0cc48, 0x80, 0x0, 0x0, 0x0, 0xc0004d2480, 0xc000031270, 0x40e701, 0x7ffff3530ef8, 0x40eaff, ...)
    /usr/lib/go-1.13/src/runtime/sys_linux_amd64.s:535 +0x21
runtime.futexsleep(0xc0cc48, 0x100000000, 0xffffffffffffffff)
    /usr/lib/go-1.13/src/runtime/os_linux.go:44 +0x46
runtime.notesleep(0xc0cc48)
    /usr/lib/go-1.13/src/runtime/lock_futex.go:151 +0x9f
runtime.stopm()
    /usr/lib/go-1.13/src/runtime/proc.go:1928 +0xc0
runtime.findrunnable(0xc000030000, 0x0)
    /usr/lib/go-1.13/src/runtime/proc.go:2391 +0x53f
runtime.schedule()
    /usr/lib/go-1.13/src/runtime/proc.go:2524 +0x2be
runtime.park_m(0xc000145800)
    /usr/lib/go-1.13/src/runtime/proc.go:2610 +0x9d
runtime.mcall(0x6d4a30)
    /usr/lib/go-1.13/src/runtime/asm_amd64.s:318 +0x5b

goroutine 1 [chan receive]:
github.com/gavv/webrtc-cli/src/snd.(*PulsePlayer).Stop(0xc000286000)
    /home/mtas/victor/webrtc-cli/src/snd/pulse_player.go:54 +0x4a
main.mainWithCode(0x0)
    /home/mtas/victor/webrtc-cli/main.go:303 +0x1001
main.main()
    /home/mtas/victor/webrtc-cli/main.go:28 +0x22

goroutine 6 [syscall]:
os/signal.signal_recv(0x8020e0)
    /usr/lib/go-1.13/src/runtime/sigqueue.go:147 +0x9c
os/signal.loop()
    /usr/lib/go-1.13/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
    /usr/lib/go-1.13/src/os/signal/signal_unix.go:29 +0x41

goroutine 24 [chan receive]:
github.com/pion/transport/packetio.(*Buffer).Read(0xc0002984b0, 0xc000352000, 0x2000, 0x2000, 0xc0cb00, 0x7ff489482460, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/transport/packetio/buffer.go:135 +0x3a
github.com/pion/srtp.(*ReadStreamSRTP).Read(...)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/stream_srtp.go:69
github.com/pion/webrtc/v2.(*RTPReceiver).readRTP(0xc000190060, 0xc000352000, 0x2000, 0x2000, 0x2000, 0x70f200, 0xc000268d01)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/rtpreceiver.go:146 +0x70
github.com/pion/webrtc/v2.(*Track).Read(0xc000332000, 0xc000352000, 0x2000, 0x2000, 0x430e81, 0x7adb60, 0xc000268de8)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/track.go:90 +0xf1
github.com/pion/webrtc/v2.(*Track).ReadRTP(0xc000332000, 0x6bda32, 0xc000190088, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/track.go:96 +0x72
github.com/pion/webrtc/v2.(*Track).determinePayloadType(0xc000332000, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/track.go:191 +0x37
github.com/pion/webrtc/v2.(*PeerConnection).startReceiver(0xc00008f520, 0x1, 0xc000182195, 0x10, 0xc0001821a6, 0x10, 0x4b08b92b, 0xc000190060)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/peerconnection.go:1025 +0x14b
created by github.com/pion/webrtc/v2.(*PeerConnection).openSRTP
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/peerconnection.go:1122 +0x7dd

goroutine 9 [select]:
github.com/pion/ice.(*Agent).taskLoop(0xc0000a0500)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/agent.go:697 +0x107
created by github.com/pion/ice.NewAgent
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/agent.go:398 +0x7f0

goroutine 26 [chan receive]:
github.com/pion/transport/packetio.(*Buffer).Read(0xc0001e8500, 0xc000336000, 0x2000, 0x2000, 0x70f200, 0x1, 0xc000336000)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/transport/packetio/buffer.go:135 +0x3a
github.com/pion/webrtc/v2/internal/mux.(*Endpoint).Read(0xc0001d8be0, 0xc000336000, 0x2000, 0x2000, 0x2, 0x2, 0xc0001320e0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/internal/mux/endpoint.go:36 +0x4d
github.com/pion/srtp.(*session).start.func1(0xc000186230, 0xc000131430, 0x8039a0, 0xc000186230)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/session.go:124 +0xd0
created by github.com/pion/srtp.(*session).start
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/session.go:111 +0x1e1

goroutine 18 [IO wait]:
internal/poll.runtime_pollWait(0x7ff489435ea0, 0x72, 0x0)
    /usr/lib/go-1.13/src/runtime/netpoll.go:184 +0x55
internal/poll.(*pollDesc).wait(0xc0000d4b18, 0x72, 0x2000, 0x2000, 0x0)
    /usr/lib/go-1.13/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
    /usr/lib/go-1.13/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).ReadFrom(0xc0000d4b00, 0xc000164000, 0x2000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.13/src/internal/poll/fd_unix.go:219 +0x1c3
net.(*netFD).readFrom(0xc0000d4b00, 0xc000164000, 0x2000, 0x2000, 0xc0000456f0, 0x40ffe6, 0x7ff489481d98, 0x65, 0xc000164000)
    /usr/lib/go-1.13/src/net/fd_unix.go:208 +0x5b
net.(*UDPConn).readFrom(0xc000010570, 0xc000164000, 0x2000, 0x2000, 0x0, 0x0, 0xc000045720, 0x44704c)
    /usr/lib/go-1.13/src/net/udpsock_posix.go:47 +0x6a
net.(*UDPConn).ReadFrom(0xc000010570, 0xc000164000, 0x2000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.13/src/net/udpsock.go:121 +0x5d
github.com/pion/ice.(*candidateBase).recvLoop(0xc0000a35e0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/candidate_base.go:92 +0x14b
created by github.com/pion/ice.(*candidateBase).start
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/candidate_base.go:81 +0xe0

goroutine 20 [IO wait]:
internal/poll.runtime_pollWait(0x7ff489435dd0, 0x72, 0x0)
    /usr/lib/go-1.13/src/runtime/netpoll.go:184 +0x55
internal/poll.(*pollDesc).wait(0xc000166018, 0x72, 0x2000, 0x2000, 0x0)
    /usr/lib/go-1.13/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
    /usr/lib/go-1.13/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).ReadFrom(0xc000166000, 0xc000180000, 0x2000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x0)
    /usr/lib/go-1.13/src/internal/poll/fd_unix.go:219 +0x1c3
net.(*netFD).readFrom(0xc000166000, 0xc000180000, 0x2000, 0x2000, 0x0, 0x1, 0x120, 0xc0002853e0, 0xc0001db200)
    /usr/lib/go-1.13/src/net/fd_unix.go:208 +0x5b
net.(*UDPConn).readFrom(0xc000168000, 0xc000180000, 0x2000, 0x2000, 0x11b, 0xc000138bd0, 0x0, 0xc0000a0500)
    /usr/lib/go-1.13/src/net/udpsock_posix.go:47 +0x6a
net.(*UDPConn).ReadFrom(0xc000168000, 0xc000180000, 0x2000, 0x2000, 0x2000, 0x801de0, 0xc000138bd0, 0x8081c0, 0xc0000219c0)
    /usr/lib/go-1.13/src/net/udpsock.go:121 +0x5d
github.com/pion/ice.(*candidateBase).recvLoop(0xc0000ae360)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/candidate_base.go:92 +0x14b
created by github.com/pion/ice.(*candidateBase).start
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/candidate_base.go:81 +0xe0

goroutine 25 [chan receive]:
github.com/pion/transport/packetio.(*Buffer).Read(0xc0001e84b0, 0xc00033c000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/transport/packetio/buffer.go:135 +0x3a
github.com/pion/webrtc/v2/internal/mux.(*Endpoint).Read(0xc0001d8bd0, 0xc00033c000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/internal/mux/endpoint.go:36 +0x4d
github.com/pion/srtp.(*session).start.func1(0xc0001861c0, 0xc0001313d0, 0x8039e0, 0xc0001861c0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/session.go:124 +0xd0
created by github.com/pion/srtp.(*session).start
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/session.go:111 +0x1e1

goroutine 36 [syscall, locked to thread]:
github.com/mesilliac/pulse-simple._Cfunc_pa_simple_read(0x7ff460000b80, 0xc00025d000, 0xf00, 0xc0001d691c, 0x0)
    _cgo_gotypes.go:762 +0x4d
github.com/mesilliac/pulse-simple.(*Stream).Read.func1(0xc0001f8028, 0xc00026adb8, 0xc0001d691c, 0xc0001d6901)
    /home/mtas/victor/webrtc-cli/vendor/github.com/mesilliac/pulse-simple/simple.go:158 +0x12e
github.com/mesilliac/pulse-simple.(*Stream).Read(0xc0001f8028, 0xc00025d000, 0xf00, 0xf00, 0x2, 0x7ffff35316db, 0x34)
    /home/mtas/victor/webrtc-cli/vendor/github.com/mesilliac/pulse-simple/simple.go:158 +0x58
github.com/gavv/webrtc-cli/src/snd.(*PulseRecorder).runRecording(0xc0001d4940, 0x7ffff35316db, 0x34, 0xbb80, 0x2, 0x1312d00)
    /home/mtas/victor/webrtc-cli/src/snd/pulse_recorder.go:85 +0x390
github.com/gavv/webrtc-cli/src/snd.NewPulseRecorder.func1(0xc0001d4940, 0x7ffff35316db, 0x34, 0xbb80, 0x2, 0x1312d00)
    /home/mtas/victor/webrtc-cli/src/snd/pulse_recorder.go:27 +0x4e
created by github.com/gavv/webrtc-cli/src/snd.NewPulseRecorder
    /home/mtas/victor/webrtc-cli/src/snd/pulse_recorder.go:25 +0x149

goroutine 50 [chan receive]:
main.mainWithCode.func2(0x801860, 0xc0001d4940, 0xc0001f6180, 0xc0000b2150, 0xc0001f2fc0)
    /home/mtas/victor/webrtc-cli/main.go:214 +0x86
created by main.mainWithCode
    /home/mtas/victor/webrtc-cli/main.go:213 +0x1669

goroutine 51 [syscall, locked to thread]:
github.com/mesilliac/pulse-simple._Cfunc_pa_simple_write(0x7ff454000b80, 0xc0002cb000, 0xf00, 0xc00013671c, 0x0)
    _cgo_gotypes.go:778 +0x4d
github.com/mesilliac/pulse-simple.(*Stream).Write.func1(0xc000288000, 0xc000266d88, 0xc00013671c, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/mesilliac/pulse-simple/simple.go:139 +0x12e
github.com/mesilliac/pulse-simple.(*Stream).Write(0xc000288000, 0xc0002cb000, 0xf00, 0xf00, 0xf00, 0xf00, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/mesilliac/pulse-simple/simple.go:139 +0x58
github.com/gavv/webrtc-cli/src/snd.(*PulsePlayer).runPlayback(0xc000286000, 0x7ffff3531717, 0x32, 0xbb80, 0x2, 0x0)
    /home/mtas/victor/webrtc-cli/src/snd/pulse_player.go:98 +0x31c
github.com/gavv/webrtc-cli/src/snd.NewPulsePlayer.func1(0xc000286000, 0x7ffff3531717, 0x32, 0xbb80, 0x2, 0x0)
    /home/mtas/victor/webrtc-cli/src/snd/pulse_player.go:29 +0x4e
created by github.com/gavv/webrtc-cli/src/snd.NewPulsePlayer
    /home/mtas/victor/webrtc-cli/src/snd/pulse_player.go:27 +0x175

goroutine 52 [chan receive]:
main.mainWithCode.func3(0xc000286000, 0xc0001f6180)
    /home/mtas/victor/webrtc-cli/main.go:247 +0x85
created by main.mainWithCode
    /home/mtas/victor/webrtc-cli/main.go:246 +0x1227

goroutine 53 [chan receive]:
github.com/pion/transport/packetio.(*Buffer).Read(0xc0001e8780, 0xc00032e000, 0x2000, 0x2000, 0xc000046a80, 0x7ff4894816d0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/transport/packetio/buffer.go:135 +0x3a
github.com/pion/srtp.(*ReadStreamSRTP).Read(...)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/stream_srtp.go:69
github.com/pion/webrtc/v2.(*RTPReceiver).readRTP(0xc000190000, 0xc00032e000, 0x2000, 0x2000, 0x2000, 0x70f200, 0x2d01)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/rtpreceiver.go:146 +0x70
github.com/pion/webrtc/v2.(*Track).Read(0xc0001e2240, 0xc00032e000, 0x2000, 0x2000, 0x6c59cc, 0xc00016a410, 0xc0000ae990)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/track.go:90 +0xf1
github.com/pion/webrtc/v2.(*Track).ReadRTP(0xc0001e2240, 0xc000055eb0, 0x2, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/track.go:96 +0x72
github.com/gavv/webrtc-cli/src/rtc.(*Peer).getPacket(0xc0000b2150, 0x8, 0xc000055f10, 0x524023)
    /home/mtas/victor/webrtc-cli/src/rtc/peer.go:287 +0x126
github.com/gavv/webrtc-cli/src/rtc.(*Peer).Read(0xc0000b2150, 0xc000366000, 0x780, 0x2d00, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/src/rtc/peer.go:258 +0x2f
main.mainWithCode.func4(0xc0000b2150, 0xc0001f6180, 0xc000296000)
    /home/mtas/victor/webrtc-cli/main.go:269 +0x56
created by main.mainWithCode
    /home/mtas/victor/webrtc-cli/main.go:267 +0x13a5

goroutine 37 [chan receive]:
github.com/pion/transport/packetio.(*Buffer).Read(0xc0000a8be0, 0xc0002d6000, 0x2000, 0x2000, 0x2000100, 0x0, 0xffffffffffffffff)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/transport/packetio/buffer.go:135 +0x3a
github.com/pion/ice.(*Conn).Read(0xc0001d4980, 0xc0002d6000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/ice/transport.go:79 +0x96
github.com/pion/webrtc/v2/internal/mux.(*Mux).readLoop(0xc0001e8410)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/internal/mux/mux.go:105 +0xdc
created by github.com/pion/webrtc/v2/internal/mux.NewMux
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/internal/mux/mux.go:43 +0x127

goroutine 40 [chan receive]:
github.com/pion/transport/packetio.(*Buffer).Read(0xc0001e8460, 0xc0002d4000, 0x2000, 0x2000, 0x35, 0x35, 0xc0002d4000)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/transport/packetio/buffer.go:135 +0x3a
github.com/pion/webrtc/v2/internal/mux.(*Endpoint).Read(0xc0001d8bc0, 0xc0002d4000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/internal/mux/endpoint.go:36 +0x4d
github.com/pion/dtls.(*Conn).inboundLoop(0xc0002d2000)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/dtls/conn.go:468 +0xd3
created by github.com/pion/dtls.createConn
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/dtls/conn.go:199 +0x71c

goroutine 27 [chan receive]:
github.com/pion/srtp.(*SessionSRTCP).AcceptStream(0xc000186230, 0xc000186230, 0x0, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/session_srtcp.go:74 +0x45
github.com/pion/webrtc/v2.(*PeerConnection).drainSRTP(0xc00008f520)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/peerconnection.go:1205 +0xc4
created by github.com/pion/webrtc/v2.(*PeerConnection).startTransports
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/peerconnection.go:1926 +0x484

goroutine 41 [chan receive]:
github.com/pion/srtp.(*SessionSRTP).AcceptStream(0xc0001861c0, 0xc0001861c0, 0x0, 0x0, 0x45e3c1)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/srtp/session_srtp.go:81 +0x45
github.com/pion/webrtc/v2.(*PeerConnection).drainSRTP.func1(0xc00008f520)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/peerconnection.go:1185 +0x57
created by github.com/pion/webrtc/v2.(*PeerConnection).drainSRTP
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/peerconnection.go:1177 +0x43

goroutine 28 [chan receive]:
github.com/pion/dtls.(*Conn).Read(0xc0002d2000, 0xc000448000, 0x2000, 0x2000, 0x0, 0x0, 0x0)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/dtls/conn.go:253 +0x4e
github.com/pion/sctp.(*Association).readLoop(0xc00034e000)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/sctp/association.go:421 +0x193
created by github.com/pion/sctp.(*Association).init
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/sctp/association.go:298 +0xaa

goroutine 29 [select]:
github.com/pion/sctp.(*Association).writeLoop(0xc00034e000)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/sctp/association.go:455 +0x18b
created by github.com/pion/sctp.(*Association).init
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/sctp/association.go:299 +0xcf

goroutine 56 [chan receive]:
github.com/pion/sctp.(*Association).AcceptStream(...)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/sctp/association.go:1121
github.com/pion/datachannel.Accept(0xc00034e000, 0xc000174f88, 0x44e83b, 0xc00016bae8, 0xc000190f01)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/datachannel/datachannel.go:128 +0x49
github.com/pion/webrtc/v2.(*SCTPTransport).acceptDataChannels(0xc0001ea000, 0xc00034e000)
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/sctptransport.go:132 +0xc5
created by github.com/pion/webrtc/v2.(*SCTPTransport).Start
    /home/mtas/victor/webrtc-cli/vendor/github.com/pion/webrtc/v2/sctptransport.go:98 +0x145

rax    0xca
rbx    0xc0cb00
rcx    0x4602c3
rdx    0x0
rdi    0xc0cc48
rsi    0x80
rbp    0x7ffff3530ec0
rsp    0x7ffff3530e78
r8     0x0
r9     0x0
r10    0x0
r11    0x286
r12    0x0
r13    0xbfcd40
r14    0x0
r15    0x0
rip    0x4602c1
rflags 0x286
cs     0x33
fs     0x0
gs     0x0
gavv commented 4 years ago

Should be fixed.

gavv commented 4 years ago

Not fixed.

gavv commented 4 years ago

Finally fixed.