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

[any 2023 update?] MacOS Apple Silicon - M1/M2, permissions denied - darwin/arm64 #122

Open
paulmil1 opened this issue Mar 6, 2023 · 12 comments

Comments

@paulmil1
Copy link

paulmil1 commented Mar 6, 2023

internal gomonkey's call
err := syscall.Mprotect(page, prot)
returns permission denied

any update to make it work with ARM64 latest GO 1.20, Macos 12.6/13.0
has anyone figured out how to make the GOARCH=amd64 debugger work?

im looking for an ultimate solution, without having 'one or the other' situation with test working but debugger not and viceversa

can anybody confirm if downloading GO 1.17 with https://github.com/eisenxp/macos-golink-wrapper works?
i see the issues of that repo and people claim its not working anymore on newer macs

@Vex7eX
Copy link

Vex7eX commented Mar 15, 2023

Same problem

@Gordon-x
Copy link

https://blog.csdn.net/weixin_42873928/article/details/129957307

@lowang-bh
Copy link

https://blog.csdn.net/weixin_42873928/article/details/129957307

Not works for me.

@lowang-bh
Copy link

The latest release of v2.10.1

testing.tRunner.func1.2({0x1020a40a0, 0x10327ada8})
	/usr/local/go/src/testing/testing.go:1526 +0x1c8
testing.tRunner.func1()
	/usr/local/go/src/testing/testing.go:1529 +0x364
panic({0x1020a40a0, 0x10327ada8})
	/usr/local/go/src/runtime/panic.go:884 +0x1f4
github.com/agiledragon/gomonkey/v2.modifyBinary(0x101aedcd0, {0x1400051e900, 0x18, 0x102050240?})
	/Users/wlh/go/src/github.com/volcano-sh/volcano/vendor/github.com/agiledragon/gomonkey/v2/modify_binary_darwin.go:9 +0xa0
github.com/agiledragon/gomonkey/v2.replace(0x101aedcd0, 0x101fc8ae0?)
	/Users/wlh/go/src/github.com/volcano-sh/volcano/vendor/github.com/agiledragon/gomonkey/v2/patch.go:269 +0x88
github.com/agiledragon/gomonkey/v2.(*Patches).ApplyCore(0x140002df930, {0x101fc8ae0?, 0x14000518ca0?, 0x0?}, {0x101fc8ae0, 0x1022cb9f0, 0x13})
	/Users/wlh/go/src/github.com/volcano-sh/volcano/vendor/github.com/agiledragon/gomonkey/v2/patch.go:213 +0x4c
github.com/agiledragon/gomonkey/v2.(*Patches).ApplyMethod(0x0?, {0x10228a4e0, 0x1022bfce0}, {0x101b27ea0, 0x11}, {0x101fc8ae0?, 0x1022cb9f0?})
	/Users/wlh/go/src/github.com/volcano-sh/volcano/vendor/github.com/agiledragon/gomonkey/v2/patch.go:92 +0x1b0
github.com/agiledragon/gomonkey/v2.ApplyMethod(...)
	/Users/wlh/go/src/github.com/volcano-sh/volcano/vendor/github.com/agiledragon/gomonkey/v2/patch.go:29

@ns-chsu
Copy link

ns-chsu commented Jul 7, 2023

I am suggesting running your unit test in docker images so the problem would not occur again.
It works fine for me with the imagegolang:1.20. I am using M1.

@lowang-bh
Copy link

I am suggesting running your unit test in docker images so the problem would not occur again. It works fine for me with the imagegolang:1.20. I am using M1.

Yes, it works in docker and I did it to skip this error. But that's just a workaroud.

@BlackSinny
Copy link

I am suggesting running your unit test in docker images so the problem would not occur again. It works fine for me with the imagegolang:1.20. I am using M1.

it work successly on my mac, but it is necessary everyone need update file?

@zoulux
Copy link

zoulux commented Aug 17, 2023

mark

@ShuaiGao
Copy link

@Zh1Cheung
Copy link

still have this problem, go monkey couldn't solve it thoroughly? if so,please note it at readme

@qiuzhongrun
Copy link

still no solution?

@xhd2015
Copy link

xhd2015 commented Mar 25, 2024

Gophers, if you repeatedly encounter this problem, that demonstrate one thing: gomonkey is hard to get started.
We now can try https://github.com/xhd2015/xgo as a brand new replacement.

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