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

Unknown error related to Rosetta translation #52

Open
hungkhoaitay opened this issue Oct 10, 2021 · 6 comments
Open

Unknown error related to Rosetta translation #52

hungkhoaitay opened this issue Oct 10, 2021 · 6 comments

Comments

@hungkhoaitay
Copy link

hungkhoaitay@Hungs-MacBook-Air in-summer-we-render % cargo instruments -t time --release --bin ply_to_png -- -i $plySource/binary_longdress/longdress_vox10_1223.ply -x 600 -w 400 -h 800 -o ouput.png
   Compiling in-summer-we-render v0.1.0 (/Users/hungkhoaitay/Documents/Uni/Summer Y1/CP3108B/in-summer-we-render)
    Finished release [optimized + debuginfo] target(s) in 3.32s
   Profiling target/release/ply_to_png with template 'Time Profiler'
2021-10-10 22:21:11.467991+0800 ply_to_png[79442:7334462] +[MTLIOAccelDevice registerDevices]: Zero Metal services found
Image saved to "ouput.png"
      Failed instruments errored: [ERROR] Run issues detected (trace is still ready to be viewed):
* Failed to pause recording session: Cannot pause session session unless it's running. Current state: kSessionError 

* Failed to start the recording: ktrace cannot trace the system under Rosetta translation

* No configuration information received, will have to guess.  Data may be misleading.

* Data stream: Time Mapping

* Failed to resume recording session: Cannot resume session session unless it's paused. Current state: kSessionError 

Thank you

@cmyr
Copy link
Owner

cmyr commented Oct 13, 2021

It looks like you might have Xcode running via rosetta? Are you running a recent version?

@cmyr
Copy link
Owner

cmyr commented Oct 13, 2021

related to your other issue, you want brew config to say Rosetta 2: false at the bottom.

@ruseinov
Copy link

I've been facing a similar error, wasn't able to fix it though yet as it seems easier to run xctrace manually than dealing with this.

To give some context: cargo instruments is using open utility to run xctrace. And the open binary on my machine has two architectures listed:

$ file `which open`
/usr/bin/open: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/open (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/bin/open (for architecture arm64e):	Mach-O 64-bit executable arm64e

What this means is, since arch is arm64 - this would automatically run in compatibility mode. I'm pretty sure this is the culprit, as otherwise this is running fine.

@cmyr
Copy link
Owner

cmyr commented Jul 12, 2023

I see the same thing from the command line, but cargo instruments works as expected, for me. :(

@dukeeagle
Copy link

dukeeagle commented Oct 4, 2023

I'm facing this exact same issue on my M2 machine! Did you resolve this @ruseinov?

@ruseinov
Copy link

ruseinov commented Oct 4, 2023

I'm facing this exact same issue on my M2 machine! Did you resolve this @ruseinov?

To be honest I didn't bother. I don't remember exactly, but I think I ended up using xctrace manually.
The fix should probably entail using xctrace directly as opposed to doing it through open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants