Skip to content

Application crashes with signal 31 when closing sockets #364

@guillerodriguez

Description

@guillerodriguez

Issue details

I am seeing a strange crash that only happens when Crashlytics is enabled.
The problem happens when cancelling outstanding HTTP requests.

When running from the console I see this:

AppLauncher failed with an exception:
java.lang.RuntimeException: The app crashed: Terminated due to signal 31. Check the device logs in Xcode (Window->Devices) for more info.
    at org.robovm.libimobiledevice.util.AppLauncher.pipeStdOut(AppLauncher.java:829)
    at org.robovm.libimobiledevice.util.AppLauncher.launchInternal(AppLauncher.java:734)
    at org.robovm.libimobiledevice.util.AppLauncher.launch(AppLauncher.java:1052)
    at org.robovm.compiler.target.ios.AppLauncherProcess$1.run(AppLauncherProcess.java:67)

Signal 31 is SIGUSR2. AFAICT this is used by RoboVM to unblock threads blocked on I/O. See AsynchronousSocketCloseMonitor.cpp

I am installing Crashlytics using the installSignals API, with preservePorts = true. Perhaps SIGUSR2 is not being handled / chained / whatever?

If I perform the exact same sequence but Crashlytics is NOT installed, then the problem is not reproduced.

Reproduction steps/code

Sample code available in comment below.

Configuration

Build Tools:

  • IDEA plugin
  • Eclipse plugin
  • Gradle plugin

Versions:

  • Robovm: 2.3.6
  • XCode: 10.1
  • JDK: 1.8

Build Targets:

All iPhone models.

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