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

[mlaunch] Process mlaunch exited with 139 #1075

Closed
ivanpovazan opened this issue Sep 20, 2023 · 4 comments
Closed

[mlaunch] Process mlaunch exited with 139 #1075

ivanpovazan opened this issue Sep 20, 2023 · 4 comments
Assignees
Labels
apple iOS/tvOS/WatchOS/Mac Catalyst area device Related to a real HW device

Comments

@ivanpovazan
Copy link
Member

Description

Launching an app with the latest used mlaunch version 1.0.68 (included in xharness 8.0.0-prerelease.23456.2 - the version bump occurred in: #1072 ) fails with:

[12:00:16.5658560] Running /Users/ivan/.nuget/packages/microsoft.dotnet.xharness.cli/8.0.0-prerelease.23456.2/tools/net8.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch --sdkroot /Applications/Xcode_14.3.1.app --disable-memory-limits --devname XXXXXXXX-XXXXXXXXXXXXXXXX --launchdevbundleid net.dot.HelloiOS --wait-for-exit -v -v -v -v -v
[12:00:18.3727270] Process mlaunch exited with 139
[12:00:23.3800430] Killing process tree of 57852...
[12:00:23.4890430] Pids to kill: 57852

Repro

  1. Check out dotnet/runtime main branch
  2. Change dir to:
cd src/mono/sample/iOS
  1. Build the runtime and the sample app, and run it on a device:
make all TARGET=ios MONO_ARCH=arm64

Expected

The sample apps runs on a device

Actual

The console logs:

info: Starting 'HelloiOS' on 'Ivan’s iPhone'
  fail: App run has failed. mlaunch exited with 139
  info: Uninstalling the application 'net.dot.HelloiOS' from 'Ivan’s iPhone'
  info: Application 'net.dot.HelloiOS' was uninstalled successfully
  XHarness exit code: 83 (APP_LAUNCH_FAILURE)

Further inspecting the device logs:

[12:00:16.5658560] Running /Users/ivan/.nuget/packages/microsoft.dotnet.xharness.cli/8.0.0-prerelease.23456.2/tools/net8.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch --sdkroot /Applications/Xcode_14.3.1.app --disable-memory-limits --devname XXXXXXXX-XXXXXXXXXXXXXXXX --launchdevbundleid net.dot.HelloiOS --wait-for-exit -v -v -v -v -v
[12:00:18.3727270] Process mlaunch exited with 139
[12:00:23.3800430] Killing process tree of 57852...
[12:00:23.4890430] Pids to kill: 57852

Workaround

  1. Reverting to a previous version of xharness with:
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 7df4df2dd16..aa262536ceb 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -15,7 +15,7 @@
       ]
     },
     "microsoft.dotnet.xharness.cli": {
-      "version": "8.0.0-prerelease.23456.2",
+      "version": "8.0.0-prerelease.23431.1",
       "commands": [
         "xharness"
       ]
  1. Restoring the tool
 ../../../../dotnet.sh tool restore
  1. Running the built app with:
../../../../dotnet.sh xharness apple run --app=/Users/ivan/repos/runtime-mono-iOS/src/mono/sample/iOS/bin/ios-arm64/Bundle/HelloiOS/Debug-iphoneos/HelloiOS.app --targets=ios-device --output-directory=/tmp/out

Executes correctly:

[12:25:09.0695730] Running /Users/ivan/.nuget/packages/microsoft.dotnet.xharness.cli/8.0.0-prerelease.23431.1/tools/net8.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch --sdkroot /Applications/Xcode_14.3.1.app --disable-memory-limits --devname XXXXXXXX-XXXXXXXXXXXXXXXX --launchdevbundleid net.dot.HelloiOS --wait-for-exit -v -v -v -v -v
[12:25:16.1442720] Process mlaunch exited with 0
[12:25:21.1523210] Killing process tree of 58391...
[12:25:21.2418570] Pids to kill: 58391
@ivanpovazan
Copy link
Member Author

/cc: @premun @kotlarmilos

@ivanpovazan ivanpovazan added apple iOS/tvOS/WatchOS/Mac Catalyst area device Related to a real HW device labels Sep 20, 2023
@premun
Copy link
Member

premun commented Sep 20, 2023

This seems like a problem within mlaunch. @ivanpovazan is there a build where we can get the full logs?

EDIT: Or can you share the rest of the logs?

@rolfbjarne
Copy link
Member

I can reproduce, it's a problem with mlaunch.

@rolfbjarne rolfbjarne self-assigned this Sep 20, 2023
@rolfbjarne
Copy link
Member

Fix in progress: https://github.com/xamarin/maccore/pull/2709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple iOS/tvOS/WatchOS/Mac Catalyst area device Related to a real HW device
Projects
None yet
Development

No branches or pull requests

3 participants