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

Panic on darwin due to go-ieproxy #36

Open
Brcrwilliams opened this issue Jun 1, 2022 · 1 comment
Open

Panic on darwin due to go-ieproxy #36

Brcrwilliams opened this issue Jun 1, 2022 · 1 comment

Comments

@Brcrwilliams
Copy link

github.com/mattn/go-ieproxy performs syscalls which can panic due to unexpected signal on MacOS: mattn/go-ieproxy#35

This issue is fixed in github.com/mattn/[email protected]. However, given #29 and #31, it's probably better to remove this dependency rather than upgrade it.

 fatal error: unexpected signal during runtime execution
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7ff8054f94f6]
 
 runtime stack:
 runtime.throw({0x4fa5528, 0xffffffffffffffff})
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/panic.go:1198 +0x71
 runtime.sigpanic()
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/signal_unix.go:719 +0x396
 
 goroutine 1 [syscall, locked to thread]:
 runtime.cgocall(0x4c4b840, 0xc0001a17e0)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/cgocall.go:156 +0x5c fp=0xc0001a17b8 sp=0xc0001a1780 pc=0x400613c
 github.com/mattn/go-ieproxy._Cfunc_CFNumberGetValue(0x0, 0x9, 0xc0000425b8)
       _cgo_gotypes.go:191 +0x49 fp=0xc0001a17e0 sp=0xc0001a17b8 pc=0x431f0e9
 github.com/mattn/go-ieproxy.cfNumberGetGoInt.func1(0x431f4a9, 0x4c4b8e0)
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/ieproxy_darwin.go:43 +0x59 fp=0xc0001a1820 sp=0xc0001a17e0 pc=0x431fb19
 github.com/mattn/go-ieproxy.cfNumberGetGoInt(0x0)
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/ieproxy_darwin.go:43 +0x37 fp=0xc0001a1850 sp=0xc0001a1820 pc=0x431fa97
 github.com/mattn/go-ieproxy.writeConf()
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/ieproxy_darwin.go:76 +0x275 fp=0xc0001a1940 sp=0xc0001a1850 pc=0x431ff95
 sync.(*Once).doSlow(0x7, 0xe)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/sync/once.go:68 +0xd2 fp=0xc0001a19a8 sp=0xc0001a1940 pc=0x40848f2
 sync.(*Once).Do(...)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/sync/once.go:59
 github.com/mattn/go-ieproxy.getConf(...)
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/ieproxy_darwin.go:23
 github.com/mattn/go-ieproxy.GetConf(...)
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/ieproxy.go:36
 github.com/mattn/go-ieproxy.proxyMiddleman()
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/proxy_middleman_darwin.go:12 +0x57 fp=0xc0001a1a48 sp=0xc0001a19a8 pc=0x431e957
 github.com/mattn/go-ieproxy.GetProxyFunc(...)
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/mattn/[email protected]/proxy_middleman.go:10
 github.com/Azure/azure-pipeline-go/pipeline.newDefaultHTTPClient()
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/!azure/[email protected]/pipeline/core.go:208 +0x1d fp=0xc0001a1a80 sp=0xc0001a1a48 pc=0x4322e7d
 github.com/Azure/azure-pipeline-go/pipeline.init()
       /Users/dcouture/.asdf/installs/golang/1.17.9/packages/pkg/mod/github.com/!azure/[email protected]/pipeline/core.go:202 +0x19 fp=0xc0001a1aa0 sp=0xc0001a1a80 pc=0x4324f59
 runtime.doInit(0x5c8fdc0)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/proc.go:6498 +0x123 fp=0xc0001a1bd8 sp=0xc0001a1aa0 pc=0x40490c3
 runtime.doInit(0x5c94b20)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/proc.go:6475 +0x71 fp=0xc0001a1d10 sp=0xc0001a1bd8 pc=0x4049011
 runtime.doInit(0x5c8dc00)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/proc.go:6475 +0x71 fp=0xc0001a1e48 sp=0xc0001a1d10 pc=0x4049011
 runtime.doInit(0x5c93800)
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/proc.go:6475 +0x71 fp=0xc0001a1f80 sp=0xc0001a1e48 pc=0x4049011
 runtime.main()
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/proc.go:238 +0x1e6 fp=0xc0001a1fe0 sp=0xc0001a1f80 pc=0x403be06
 runtime.goexit()
       /Users/dcouture/.asdf/installs/golang/1.17.9/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0001a1fe8 sp=0xc0001a1fe0 pc=0x406dce1
@Brcrwilliams
Copy link
Author

@zezha-msft @adreed-msft Could one of you look at this issue and also #29 and #31? This dependency seems quite problematic. I considered submitting a PR to replace it with http.ProxyFromEnvironment, but it looks like it might be here for Windows support? Do you know why this dependency is needed?

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

1 participant