Skip to content

Aborting after deadlock #142

@lukeadamson

Description

@lukeadamson

Hey @stasel, I'm seeing a crash in my app that uses the WebRTC package, and I can reproduce that same crash in your demo app (WebRTC-iOS). I'm wondering if you've seen it before or have any idea what might be causing it:

The demo app is crashing in the iOS Simulator after logging:

SetProperty: RPC timeout. Apparently deadlocked. Aborting now.

Here are my repro steps:

  1. Launch the signaling server (I'm just testing with your Swift signaling server on my local system).
  2. Update the demo project with the IP address of the signaling server.
  3. Build and run the demo app on the iOS Simulator (Xcode 15, iOS 17, macOS 14).
  4. Build and run the demo app on an iOS device (in my case, an iPhone 12 Pro running iOS 17).
  5. Tap "Send offer" on the app running on the device.
  6. Tap "Send answer" on the app running on the iOS Simulator.

After several seconds... the app on the Sim will log the above error about a deadlock and crash. Here's a screenshot of the crash, showing abort being called from one of the threads:

CleanShot 2023-10-31 at 13 35 19@2x

Sadly, I can't reproduce this reliably in your demo app (though it's happening very reliably for me in my real app). I thought it was 100% reproducible in the demo, but then it just started working on fine and continued to do so after several re-launches and re-attempts at crashing it.

Both the "...Apparently deadlocked" message and the intermittent nature of the crash give it a strong smell of a multithreading bug.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions