Skip to content

gorm-cli won't work on my m2 sonoma #15

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

Open
bochengyang opened this issue Oct 5, 2023 · 5 comments
Open

gorm-cli won't work on my m2 sonoma #15

bochengyang opened this issue Oct 5, 2023 · 5 comments

Comments

@bochengyang
Copy link

bochengyang commented Oct 5, 2023

I've made this cli work on a previous MAC OS, but after I upgrade to Sonoma, something goes wrong

❯ gorm-cli db:migrate -f
unexpected fault address 0x1019000000001
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x1019000000001 pc=0x104ffbe60]

goroutine 1 [running]:
runtime.throw({0x1051f0d00?, 0x0?})
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/panic.go:1077 +0x40 fp=0x14000187660 sp=0x14000187630 pc=0x104fea760
runtime.sigpanic()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/signal_unix.go:875 +0x22c fp=0x140001876c0 sp=0x14000187660 pc=0x105002c6c
runtime.doInit1(0x105288a01?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:6712 +0x20 fp=0x14000187800 sp=0x140001876d0 pc=0x104ffbe60
runtime.doInit({0x10547ef20, 0x42, 0x140001b8000?})
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:6707 +0x38 fp=0x14000187820 sp=0x14000187800 pc=0x104ffbdf8
plugin.open({0x140000df650, 0x22})
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/plugin/plugin_dlopen.go:95 +0x520 fp=0x14000187aa0 sp=0x14000187820 pc=0x1051d1510
plugin.Open(...)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/plugin/plugin.go:80
github.com/iKala/gorm-cli/migrate.getPlugin({0x1051f2f19?, 0x1051ef468?}, {0x1051f0c29, 0x5})
        /Users/bochengyang/go/pkg/mod/github.com/i!kala/[email protected]/migrate/util.go:52 +0x60 fp=0x14000187b60 sp=0x14000187aa0 pc=0x1051d3220
github.com/iKala/gorm-cli/migrate.NewDB()
        /Users/bochengyang/go/pkg/mod/github.com/i!kala/[email protected]/migrate/init_db.go:9 +0x34 fp=0x14000187b90 sp=0x14000187b60 pc=0x1051d28b4
main.main()
        /Users/bochengyang/go/pkg/mod/github.com/i!kala/[email protected]/main.go:153 +0xa98 fp=0x14000187f30 sp=0x14000187b90 pc=0x1051ef528
runtime.main()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:267 +0x2bc fp=0x14000187fd0 sp=0x14000187f30 pc=0x104fedecc
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000187fd0 sp=0x14000187fd0 pc=0x10501fb94

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000050f90 sp=0x14000050f70 pc=0x104fee2f8
runtime.goparkunlock(...)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:404
runtime.forcegchelper()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:322 +0xb8 fp=0x14000050fd0 sp=0x14000050f90 pc=0x104fee188
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000050fd0 sp=0x14000050fd0 pc=0x10501fb94
created by runtime.init.6 in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:310 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000051760 sp=0x14000051740 pc=0x104fee2f8
runtime.goparkunlock(...)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:404
runtime.bgsweep(0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgcsweep.go:321 +0x108 fp=0x140000517b0 sp=0x14000051760 pc=0x104fd86f8
runtime.gcenable.func1()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:200 +0x28 fp=0x140000517d0 sp=0x140000517b0 pc=0x104fccfb8
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000517d0 sp=0x140000517d0 pc=0x10501fb94
created by runtime.gcenable in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:200 +0x6c

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x140000260e0?, 0x10524de60?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000051f50 sp=0x14000051f30 pc=0x104fee2f8
runtime.goparkunlock(...)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:404
runtime.(*scavengerState).park(0x1054896a0)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgcscavenge.go:425 +0x5c fp=0x14000051f80 sp=0x14000051f50 pc=0x104fd5d8c
runtime.bgscavenge(0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgcscavenge.go:658 +0xac fp=0x14000051fb0 sp=0x14000051f80 pc=0x104fd636c
runtime.gcenable.func2()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:201 +0x28 fp=0x14000051fd0 sp=0x14000051fb0 pc=0x104fccf58
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000051fd0 sp=0x14000051fd0 pc=0x10501fb94
created by runtime.gcenable in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:201 +0xac

goroutine 18 [finalizer wait]:
runtime.gopark(0x8?, 0x10527bf40?, 0x1?, 0x5?, 0x10503daf4?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000050580 sp=0x14000050560 pc=0x104fee2f8
runtime.runfinq()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mfinal.go:193 +0x108 fp=0x140000507d0 sp=0x14000050580 pc=0x104fcc0a8
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000507d0 sp=0x140000507d0 pc=0x10501fb94
created by runtime.createfing in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mfinal.go:163 +0x80

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x1400004c730 sp=0x1400004c710 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x1400004c7d0 sp=0x1400004c730 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400004c7d0 sp=0x1400004c7d0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 20 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x1400004cf30 sp=0x1400004cf10 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x1400004cfd0 sp=0x1400004cf30 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400004cfd0 sp=0x1400004cfd0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000488730 sp=0x14000488710 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x140004887d0 sp=0x14000488730 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140004887d0 sp=0x140004887d0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 21 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x1400004d730 sp=0x1400004d710 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x1400004d7d0 sp=0x1400004d730 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400004d7d0 sp=0x1400004d7d0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 5 [GC worker (idle)]:
runtime.gopark(0x10c945b1d14c3?, 0x3?, 0xd6?, 0x6?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000052730 sp=0x14000052710 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x140000527d0 sp=0x14000052730 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000527d0 sp=0x140000527d0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 6 [GC worker (idle)]:
runtime.gopark(0x10c945b1d7424?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x14000052f30 sp=0x14000052f10 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x14000052fd0 sp=0x14000052f30 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000052fd0 sp=0x14000052fd0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 22 [GC worker (idle)]:
runtime.gopark(0x10c945b1c78d7?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x1400004df30 sp=0x1400004df10 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x1400004dfd0 sp=0x1400004df30 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400004dfd0 sp=0x1400004dfd0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28

goroutine 23 [GC worker (idle)]:
runtime.gopark(0x10c945b1d7836?, 0x0?, 0x0?, 0x0?, 0x0?)
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/proc.go:398 +0xc8 fp=0x1400004e730 sp=0x1400004e710 pc=0x104fee2f8
runtime.gcBgMarkWorker()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1293 +0xd8 fp=0x1400004e7d0 sp=0x1400004e730 pc=0x104fcec08
runtime.goexit()
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400004e7d0 sp=0x1400004e7d0 pc=0x10501fb94
created by runtime.gcBgMarkStartWorkers in goroutine 1
        /opt/homebrew/Cellar/go/1.21.0/libexec/src/runtime/mgc.go:1217 +0x28
@bochengyang
Copy link
Author

I've also use GOOS="darwin" GOARCH="arm64" gorm-cli db:init to rebuild the connection.so, but I think the problem is not here, it might be the cli

@bochengyang
Copy link
Author

the go version I used is go version go1.21.0 darwin/arm64

@oxr463
Copy link
Contributor

oxr463 commented Oct 17, 2023

What does your migration directory look like?

@Calvin-Huang
Copy link
Contributor

Hi there, I've addressed that issue. It appears the problem originates from Go itself. Could you update your Go version to go version go1.21.3 darwin/arm64? I believe that will solve the error.

Reference: golang/go#59369.

BTW, there's been feedback that Go's plugin functionality is quite unstable. Just considering removing all plugin implementations. What do you think.

@Calvin-Huang
Copy link
Contributor

What does your migration directory look like?

Hmmm, not sure about the relations between migration directory and the error but might be a point. Can you give some further info for reproducing the error?

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

3 participants