Running go run main.go in cloud shell without deploying app engine, returning errors - shell

I am deploying a REST API using app engine
When I use gcloud app deploy, the API works perfectly fine. However, I want to be able to test my go code without deploying by using
go run main.go
however, I get this error when I run it
panic: Metadata fetch failed for 'instance/attributes/gae_backend_version': metadata server returned HTTP 404
goroutine 66 [running]:
google.golang.org/appengine/internal.mustGetMetadata(0xac3a19, 0x27, 0x0, 0x0, 0x1d)
/google/gopath/src/google.golang.org/appengine/internal/metadata.go:34 +0x148
google.golang.org/appengine/internal.VersionID(0x0, 0x0, 0xaaafac, 0x1)
/google/gopath/src/google.golang.org/appengine/internal/identity_vm.go:91 +0x100
google.golang.org/appengine/internal.DefaultTicket.func1()
/google/gopath/src/google.golang.org/appengine/internal/api.go:299 +0x13f
sync.(*Once).doSlow(0xffb060, 0xad9bb8)
/usr/local/go/src/sync/once.go:66 +0xe3
sync.(*Once).Do(...)
/usr/local/go/src/sync/once.go:57
google.golang.org/appengine/internal.DefaultTicket(0xc0002c8240, 0x971640)
/google/gopath/src/google.golang.org/appengine/internal/api.go:292 +0x65
google.golang.org/appengine/internal.Call(0xb80880, 0xc0002c8240, 0xab04b5, 0xa, 0xaabd4e, 0x5, 0xb7c080, 0xc00028a1c0, 0xb7b280, 0xc00044e080, ...)
/google/gopath/src/google.golang.org/appengine/internal/api.go:499 +0x907
google.golang.org/appengine/internal.(*context).flushLog(0xc0002502a0, 0x1, 0x0)
/google/gopath/src/google.golang.org/appengine/internal/api.go:644 +0x419
google.golang.org/appengine/internal.handleHTTP.func1(0xc000468180, 0xc0002502a0)
/google/gopath/src/google.golang.org/appengine/internal/api.go:141 +0x60
created by google.golang.org/appengine/internal.handleHTTP
/google/gopath/src/google.golang.org/appengine/internal/api.go:137 +0x38c
exit status 2
This link
https://groups.google.com/forum/#!topic/google-appengine-go/Fd8DxpzEoVs
says to add appengine.Main() to my main func which is already added

Related

Trying to start an app after build, but getting "router initialize error". How to fix it?

This is what i get in terminal, looks like problem in first hook, but what's that?
Same app is working fine if just use revel run, but for some reason, when i try execute builded .exe i got that error((
INFO 16:56:12 revel revel_logger.go:29: There is 7 hooks need to run ... section=server
INFO 16:56:12 revel revel_logger.go:29: Run the 1 hook ... section=util
panic: init: router initialize error [recovered]
panic: Fatal error in startup
goroutine 1 [running]:
github.com/revel/revel.Run.func1()
C:/Users/User/go/pkg/mod/github.com/revel/revel#v1.0.0/server.go:70 +0xcf
panic({0xcd9f80, 0xc0004cfbf0})
C:/Program Files/Go/src/runtime/panic.go:838 +0x207
github.com/revel/revel/logger.(*RevelLogger).Panic(0xc0004ec040?, {0xddff4b, 0x1d}, {0xc0004e64e0?, 0xc00019e300?, 0xc00049ce58?})
C:/Users/User/go/pkg/mod/github.com/revel/revel#v1.0.0/logger/revel_logger.go:66 +0x4e
github.com/revel/revel.init.5.func1()
C:/Users/User/go/pkg/mod/github.com/revel/revel#v1.0.0/router.go:866 +0x217
github.com/revel/revel.RevelHooks.Run({0xc000124680, 0x7, 0x8})
C:/Users/User/go/pkg/mod/github.com/revel/revel#v1.0.0/revel_hooks.go:32 +0x18a
github.com/revel/revel.InitServer()
C:/Users/User/go/pkg/mod/github.com/revel/revel#v1.0.0/server.go:39 +0x52
github.com/revel/revel.Run(0xdc7709?)
C:/Users/User/go/pkg/mod/github.com/revel/revel#v1.0.0/server.go:81 +0x118
lfacturabackend/app/tmp/run.Run(0x0?)
C:/Users/User/go/lfactura/lfacturabackend/app/tmp/run/run.go:27 +0x28
main.main()
C:/Users/User/go/lfactura/lfacturabackend/app/tmp/main.go:24 +0x98
PS C:\Users\User\go\lfactura\testtarget>
well answer is simple. revel generates run.bat with following line
lfacturabackend.exe -importPath lfacturabackend -srcPath "%CD%\src" -runMode prod
Firstly i removed "-runMode prod" that caused "not found run mode prod" error.
And to fix error in my question i changed -srcPath "%CD%\src" to -srcPath "src"

Why am I getting ‘panic: runtime error: invalid memory address or nil pointer dereference’ accessing Firestore on new computer? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I get a Panic if I attempt to run the tests or runthe app directly via: go run main.go
The code works great on my old Macbook Pro. It panics on my new Macbook Pro.
I believe the error has Something to do with accessing the Firestore datastore but I'm not sure what's going wrong.
I'm running the same code so datastore Keys and everything else should be identical.
Here is the Github repo:
https://github.com/golangnewb/FirestoreTestHttp
Working Computer:
go version go1.11.2 darwin/amd64
Panic Computer:
go version go1.13.5 darwin/amd64
❯ go test
--- FAIL: TestCities (0.01s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x14d557a]
goroutine 6 [running]:
testing.tRunner.func1(0xc000312200)
/usr/local/go/src/testing/testing.go:874 +0x3a3
panic(0x15ac100, 0x1b3e740)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
cloud.google.com/go/firestore.(*Client).path(...)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:107
cloud.google.com/go/firestore.(*Client).Collection(0x0, 0x1677ac0, 0x6, 0x14)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:122 +0x9a
_/Users/XXX/Dropbox/go/src/firestoreTestHttp.addCitiesFirestore(0x5e4c4feb, 0xc000064760)
/Users/XXX/Dropbox/go/src/firestoreTestHttp/city_handlers_test.go:218 +0x13d
_/Users/XXX/Dropbox/go/src/firestoreTestHttp.TestCities(0xc000312200)
/Users/XXX/Dropbox/go/src/firestoreTestHttp/city_handlers_test.go:19 +0x26
testing.tRunner(0xc000312200, 0x16a1c98)
/usr/local/go/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:960 +0x350
exit status 2
FAIL _/Users/XXX/Dropbox/go/src/firestoreTestHttp 0.165s
Here is the panic if I try to run via:
❯ go run main.go
2020/02/18 17:19:39 http: panic serving [::1]:60479: runtime error: invalid memory address or nil pointer dereference
goroutine 9 [running]:
net/http.(*conn).serve.func1(0xc00027c6e0)
/usr/local/go/src/net/http/server.go:1767 +0x139
panic(0x15a69c0, 0x1b39a50)
/usr/local/go/src/runtime/panic.go:679 +0x1b2
cloud.google.com/go/firestore.(*Client).path(...)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:107
cloud.google.com/go/firestore.(*Client).Collection(0x0, 0x16728ba, 0x6, 0x14)
/Users/XXX/go/src/cloud.google.com/go/firestore/client.go:122 +0x9a
main.indexHandler(0x1744360, 0xc000322000, 0xc0002c8200)
/Users/XXX/Dropbox/go/src/firestoreTestHttp/main.go:50 +0xa2
net/http.HandlerFunc.ServeHTTP(0x169da80, 0x1744360, 0xc000322000, 0xc0002c8200)
/usr/local/go/src/net/http/server.go:2007 +0x44
net/http.(*ServeMux).ServeHTTP(0xc0002ea100, 0x1744360, 0xc000322000, 0xc0002c8200)
/usr/local/go/src/net/http/server.go:2387 +0x1bd
net/http.serverHandler.ServeHTTP(0xc000312000, 0x1744360, 0xc000322000, 0xc0002c8200)
/usr/local/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc00027c6e0, 0x17457a0, 0xc00008cf80)
/usr/local/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2928 +0x384
Although I dont feel well in Go I will try a shot. If I am wrong just let me know.
From the error it seems that Client is nil. In attached Git repo in main you are logging that it should be set as environment variable GCLOUD_PROJECT, however I haven't found any so.Getenv function that gets this value. Maybe this value is wrong...?
So I guess this statement client, _ := firestore.NewClient(ctx, projectID) is being called with wrong projectID. In the statement error handling is omitted, so we do not know if the client has been created properly. If it was not created, that we should get such error.
Maybe you should add error handling like in example in Go Firestore Reference, to ensure that there is no error during client creation.
I hope this will help you!

Using centos7 as base image for Jaeger

I am trying to setup Jaeger using a CentOS base image instead of Alpine. The agent, collector, and Cassandra containers all work fine except for the query container.
The Jaeger repository is here.
After changing the base image to CentOS 7, commenting out the sections that apply to copying ca-certificates.crt and running docker-compose, I get the following nil pointer error message when tailing the query container
panic: runtime error: invalid memory address or nil pointer dereference
I ran the makefile with the necessary flags to compile the code in the app directory.
Has anyone ever setup Jaeger using CentOS as a base image?
Below is the full stack error from the container
goroutine 1 [running]:
github.com/jaegertracing/jaeger/cmd/query/app.NewStaticAssetsHandler(0x0, 0x0, 0xe6cb85, 0x1, 0x0, 0x0, 0xc0000397a0, 0xc0000397b0, 0xc000137098)
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/cmd/query/app/static_handler.go:74 +0x5e
github.com/jaegertracing/jaeger/cmd/query/app.RegisterStaticHandler(0xc0000a7bd0, 0xc00009d080, 0xc0001eec80)
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/cmd/query/app/static_handler.go:45 +0x74
main.main.func1(0xc0001746c0, 0xc000184f60, 0x0, 0x2, 0x0, 0x0)
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/cmd/query/main.go:131 +0x14eb
github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).execute(0xc0001746c0, 0xc00008e0a0, 0x2, 0x2, 0xc0001746c0, 0xc00008e0a0)
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:698 +0x47a
github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0001746c0, 0x0, 0x4, 0xc00009cfc0)
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:783 +0x2dc
github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra.(*Command).Execute(0xc0001746c0, 0xc0001746c0, 0xc000137f28)
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/vendor/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
/Users/myusername/Go/src/github.com/jaegertracing/jaeger/cmd/query/main.go:172 +0x5a6
{"level":"info","ts":1539888666.5870771,"caller":"healthcheck/handler.go:99","msg":"Health Check server started","http-port":16687,"status":"unavailable"}
{"level":"info","ts":1539888666.6052766,"caller":"cassandra/factory.go:92","msg":"Cassandra archive storage configuration is empty, skipping"}
{"level":"info","ts":1539888666.6063912,"caller":"query/main.go:186","msg":"Archive storage not created","reason":"Archive storage not configured"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbe2b9e
This is most likely caused by the static assets not being included in the binary. You can try that out by running the binary you compiled.
Instead of compiling on your own, a better approach would be to get the official binaries from the releases page and build your Docker container using that.
https://github.com/jaegertracing/jaeger/releases/latest

Kapacitor record stream with influxdb connection probleme

I'am trying to record a stream task in kapacitor & Influxdb.
I Use Windows 7 Entreprise, I've installed telegraf (to collect data) & influxdb and they both work (tested with grafana dashboard), but when i start Kapacitor and try to record a task, i get this error "wsarecv : An existing connection was forcibly closed by the remote host" (And Kapacitor server Stop).
And I get this error on Kapacitor Server Cmd :
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x48 pc=0x5ada1d]
goroutine 46 [running]:
panic(0x1d23000, 0xc04200e070)
/usr/local/go/src/runtime/panic.go:500 +0x1af
github.com/influxdata/kapacitor/services/replay.(*Service).doRecordStream(0xc042
17d290, 0xc042ac5bc0, 0x24, 0x0, 0x0, 0xed1baf5dd, 0xc0079d8620, 0x2ed2e20, 0xc0
42679000, 0x1, ...)
/root/go/src/github.com/influxdata/kapacitor/services/replay/service.go:
1256 +0x11d
github.com/influxdata/kapacitor/services/replay.(*Service).handleRecordStream.fu
nc1(0xc04202a680, 0xc04217d290, 0xc0425308c0, 0xc042531680, 0xc042ac5bc0, 0x24,
0xc04220e7e0, 0x62, 0x0, 0x0, ...)
/root/go/src/github.com/influxdata/kapacitor/services/replay/service.go:
622 +0x12c
created by github.com/influxdata/kapacitor/services/replay.(*Service).handleReco
rdStream
/root/go/src/github.com/influxdata/kapacitor/services/replay/service.go:
624 +0x4f0
c:\InfluxDb\kapacitor>
Anyone got an idea on how to resolve this ?
This bug has been fixed in the latest release 1.4.0. See for the specific fix https://github.com/influxdata/kapacitor/pull/15422
The 1.4.0 release contains that fix. Version 1.4.0 was released 3 days ago and the downloads page should be updated soon.

VirtualBox: NS_ERROR_FAILURE error on MacOS Sierra

I am using virtualbox+vagrant for running a virtual machine for development purposes. It was running perfectly fine before I made the stupid mistake of upgrading to Sierra. Here's the trace:
nkohlis-MacBook-Pro:vagrant nkohli$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface:
failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp
I tried one of the solutions suggested elsewhere:
nkohlis-MacBook-Pro:vagrant nkohli$ sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
Password:
/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart => /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl => /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxDD2GC.gc => /Applications/VirtualBox.app/Contents/MacOS/VBoxDD2GC.gc-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxDDGC.gc => /Applications/VirtualBox.app/Contents/MacOS/VBoxDDGC.gc-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxExtPackHelperApp => /Applications/VirtualBox.app/Contents/MacOS/VBoxExtPackHelperApp-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless => /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage => /Applications/VirtualBox.app/Contents/MacOS/VBoxManage-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdpCtl => /Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdpCtl-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxNetDHCP => /Applications/VirtualBox.app/Contents/MacOS/VBoxNetDHCP-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxNetNAT => /Applications/VirtualBox.app/Contents/MacOS/VBoxNetNAT-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxSVC => /Applications/VirtualBox.app/Contents/MacOS/VBoxSVC-amd64
/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMIPCD => /Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMIPCD-amd64
/Applications/VirtualBox.app/Contents/MacOS/VMMGC.gc => /Applications/VirtualBox.app/Contents/MacOS/VMMGC.gc-amd64
/Applications/VirtualBox.app/Contents/MacOS/VirtualBox => /Applications/VirtualBox.app/Contents/MacOS/VirtualBox-amd64
/Applications/VirtualBox.app/Contents/MacOS/VirtualBoxVM => /Applications/VirtualBox.app/Contents/MacOS/VirtualBoxVM-amd64
/Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv => /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv-amd64
Loading VBoxDrv.kext
/Library/Application Support/VirtualBox/VBoxDrv.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
Error: Failed to load /Library/Application Support/VirtualBox/VBoxDrv.kext
Loading VBoxUSB.kext
/Library/Application Support/VirtualBox/VBoxUSB.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
Error: Failed to load /Library/Application Support/VirtualBox/VBoxUSB.kext
Loading VBoxNetFlt.kext
/Library/Application Support/VirtualBox/VBoxNetFlt.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetFlt.kext
Loading VBoxNetAdp.kext
/Library/Application Support/VirtualBox/VBoxNetAdp.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetAdp.kext
(kernel) Kext org.virtualbox.kext.VBoxNetAdp not found for unload request.
Failed to unload org.virtualbox.kext.VBoxNetAdp - (libkern/kext) not found.
(kernel) Kext org.virtualbox.kext.VBoxNetFlt not found for unload request.
Failed to unload org.virtualbox.kext.VBoxNetFlt - (libkern/kext) not found.
(kernel) Kext org.virtualbox.kext.VBoxUSB not found for unload request.
Failed to unload org.virtualbox.kext.VBoxUSB - (libkern/kext) not found.
(kernel) Kext org.virtualbox.kext.VBoxDrv not found for unload request.
Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) not found.
Fatal error: VirtualBox
...to no avail.
Here's the stack trace when I ran vagrant up after reinstalling VirtualBox:
failed MSpanList_Insert 0x1e3000 0x215290116bd5 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.throw(0x19816b)
/Users/mitchellh/code/3rdparty/go/src/runtime/panic.go:491 +0xad fp=0x7fff5fbff7d0 sp=0x7fff5fbff7a0
runtime.MSpanList_Insert(0x1b3988, 0x1e3000)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:692 +0x8f fp=0x7fff5fbff7f8 sp=0x7fff5fbff7d0
MHeap_FreeSpanLocked(0x1b0580, 0x1e3000, 0x100)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:583 +0x163 fp=0x7fff5fbff838 sp=0x7fff5fbff7f8
MHeap_Grow(0x1b0580, 0x8, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:420 +0x1a8 fp=0x7fff5fbff878 sp=0x7fff5fbff838
MHeap_AllocSpanLocked(0x1b0580, 0x1, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:298 +0x365 fp=0x7fff5fbff8b8 sp=0x7fff5fbff878
mheap_alloc(0x1b0580, 0x1, 0x12, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:190 +0x121 fp=0x7fff5fbff8e0 sp=0x7fff5fbff8b8
runtime.MHeap_Alloc(0x1b0580, 0x1, 0x10000000012, 0x10d39)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:240 +0x66 fp=0x7fff5fbff918 sp=0x7fff5fbff8e0
MCentral_Grow(0x1b82f8, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mcentral.c:197 +0x8b fp=0x7fff5fbff980 sp=0x7fff5fbff918
runtime.MCentral_CacheSpan(0x1b82f8, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mcentral.c:85 +0x167 fp=0x7fff5fbff9b8 sp=0x7fff5fbff980
runtime.MCache_Refill(0x1df000, 0x12, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mcache.c:90 +0xa0 fp=0x7fff5fbff9e0 sp=0x7fff5fbff9b8
runtime.mcacheRefill_m()
/Users/mitchellh/code/3rdparty/go/src/runtime/malloc.c:368 +0x57 fp=0x7fff5fbffa00 sp=0x7fff5fbff9e0
runtime.onM(0x13d650)
/Users/mitchellh/code/3rdparty/go/src/runtime/asm_amd64.s:273 +0x9a fp=0x7fff5fbffa08 sp=0x7fff5fbffa00
runtime.mallocgc(0x120, 0xff4a0, 0x0, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/malloc.go:178 +0x849 fp=0x7fff5fbffab8 sp=0x7fff5fbffa08
runtime.newobject(0xff4a0, 0x1df000)
/Users/mitchellh/code/3rdparty/go/src/runtime/malloc.go:353 +0x49 fp=0x7fff5fbffae0 sp=0x7fff5fbffab8
runtime.newG(0x2520a)
/Users/mitchellh/code/3rdparty/go/src/runtime/proc.go:233 +0x2a fp=0x7fff5fbffaf8 sp=0x7fff5fbffae0
allocg(0x1a33e0)
/Users/mitchellh/code/3rdparty/go/src/runtime/proc.c:925 +0x1f fp=0x7fff5fbffb08 sp=0x7fff5fbffaf8
runtime.malg(0x8000, 0x1a3480)
/Users/mitchellh/code/3rdparty/go/src/runtime/proc.c:2106 +0x1f fp=0x7fff5fbffb38 sp=0x7fff5fbffb08
runtime.mpreinit(0x1a3840)
/Users/mitchellh/code/3rdparty/go/src/runtime/os_darwin.c:137 +0x27 fp=0x7fff5fbffb50 sp=0x7fff5fbffb38
mcommoninit(0x1a3840)
/Users/mitchellh/code/3rdparty/go/src/runtime/proc.c:201 +0xc9 fp=0x7fff5fbffb78 sp=0x7fff5fbffb50
runtime.schedinit()
/Users/mitchellh/code/3rdparty/go/src/runtime/proc.c:138 +0x55 fp=0x7fff5fbffba0 sp=0x7fff5fbffb78
runtime.rt0_go(0x7fff5fbffbd8, 0x2, 0x7fff5fbffbd8, 0x0, 0x0, 0x2, 0x7fff5fbffcd0, 0x7fff5fbffcd8, 0x0, 0x7fff5fbffcdb, ...)
/Users/mitchellh/code/3rdparty/go/src/runtime/asm_amd64.s:95 +0x116 fp=0x7fff5fbffba8 sp=0x7fff5fbffba0
I've looked around but didn't find a similar issue reported elsewhere.
Upgrading Vagrant and VirtualBox fixed the issue for me. For those wondering, no you don't end up losing your existing VMs if you upgrade.
Vagrant: https://www.vagrantup.com/downloads.html
VirtualBox: https://www.virtualbox.org/wiki/Downloads
some reported issues after update to macos Sierra. re-installing Virtualbox solves the issue
This issue affects anyone installing VirtualBox for the first time on a fresh macOS High Sierra 10.13.
This effectively breaks our fully automated installation process on macOS, since the user now has to perform a manual approval and then restart the installation (reboot and rerun the installation in some cases)
First, try to restart the Virtualbox with below command.
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
If you are still facing this issue then given assign the below permission as per the screenshot.
Note: If the Allow button does not show up, run sudo kextcache -system-caches
Source: https://github.com/docksal/docksal/issues/417
Solved. VirtualBox would always fail installation no matter how many times I tried. What worked for me was to reboot and try again, it worked! (Earlier, before trying to install, I had already upgraded fuse, vagrant, and checked to 'allow' Oracle to load its extensions from the System Preferences/Security panel. The key thing was the computer reboot before trying to install VB on High Sierra.
Run the following command in your terminal:
for bin in VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT VBoxHeadless; do
sudo chmod u+s "/Applications/VirtualBox.app/Contents/MacOS/${bin}"
done
It worked for me without upgrading anything.
NOTE: This will allow any user on your system to run any of these commands as root. Please be sure you understand what these commands mean before you run them.

Resources