Skip to content

Stun binding after close Load Exception #104

@deldering

Description

@deldering

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

When the agent is disconnected it should handle the memory properly when receiving a PeerIndication during closing.

Actual behavior (suspected bug)

A load exception is triggered when the STUN binding request fails after the agent is closed

Error logs or terminal output

I (1231616) AV_RENDER: Close done
====================Event 3======================
I (1231621) WebRTC: WebRTC disconnected
I (1231626) WebRTC: Restarting WebRTC due to hang up request
I (1231627) AGENT: 1 PeerIndication recv local:167.172.162.40:56140 remote:207.154.234.214:55390
I (Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x42206916  PS      : 0x00060330  A0      : 0x82114775  A1      : 0x3c34f350  
A2      : 0x3c3c11a1  A3      : 0x3c34f370  A4      : 0x00000014  A5      : 0x3c3c1700  
A6      : 0x3c34fa80  A7      : 0x00000057  A8      : 0x00000001  A9      : 0x3fcc031c  
A10     : 0x0185af90  A11     : 0x0185af8f  A12     : 0x000000ba  A13     : 0x3c2386e0  
A14     : 0x00000001  A15     : 0x3fce857c  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000016  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  

Backtrace

0x42114772: stun_msg_write_attr at /home/tempo/test/esp-webrtc/components/esp_webrtc/impl/peer_default/agent/stun.c:219
0x42112f8d: agent_response_indication at /home/tempo/test/esp-webrtc/components/esp_webrtc/impl/peer_default/agent/agent.c:628
0x421133bd: agent_process_stun_request at /home/tempo/test/esp-webrtc/components/esp_webrtc/impl/peer_default/agent/agent.c:781
0x421136b1: agent_recv_one_packet at /home/tempo/test/esp-webrtc/components/esp_webrtc/impl/peer_default/agent/agent.c:933
0x42113cda: agent_recv at /home/tempo/test/esp-webrtc/components/esp_webrtc/impl/peer_default/agent/agent.c:981
0x42111575: peer_recv_streams at /home/tempo/test/esp-webrtc/components/esp_webrtc/impl/peer_default/core/peer_default.c:1102

Steps to reproduce the behavior

Close the connection quickly after getting a connection

Project release version

esp_peer is on latest (1.2.6)

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Linux

Operating system version

Ubuntu 24.04

Shell

ZSH

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions