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

SG crashes on launch, built on macOS 10.12.4 / Xcode 8.3 #2417

Closed
snej opened this issue Mar 22, 2017 · 8 comments
Closed

SG crashes on launch, built on macOS 10.12.4 / Xcode 8.3 #2417

snej opened this issue Mar 22, 2017 · 8 comments
Labels
Milestone

Comments

@snej
Copy link
Contributor

snej commented Mar 22, 2017

I'm trying to build top-of-tree SG on my MBP. I did a clean checkout using the boostrap.sh script as described in the build instructions. The build script succeeded and the binary is in the expected place, but it crashes and burns immediately:

$  godeps/bin/sync_gateway
zsh: killed     godeps/bin/sync_gateway
$  lldb godeps/bin/sync_gateway
(lldb) target create "godeps/bin/sync_gateway"
Current executable set to 'godeps/bin/sync_gateway' (x86_64).
(lldb) run
error: error: ::posix_spawnp ( pid => 5727, path = '/Couchbase/sync_gateway/godeps/bin/sync_gateway', file_actions = 0x7fff50f3f628, attr = 0x7fff50f3f638, argv = 0x7f8ac971bbe0, envp = 0x7f8ac972d6f0 ) err = Cannot allocate memory (0x0000000c)
(lldb) bt
error: invalid process
(lldb)

I've been developing for OS X since 2000 and I've never seen anything like that! It looks like the binary is broken enough that it can't even be launched into a process.

@tleyden suggested I build and run sgload, just to make sure my Go toolchain works. I did, and it starts up, so that doesn't seem to be the problem.

  • MacBook Pro
  • macOS 10.12.4 beta (16E192b)
  • go version go1.8 darwin/amd64 (installed today via homebrew)
  • Xcode 8.3; clang -v reports "Apple LLVM version 8.1.0 (clang-802.0.38)"
@ajres
Copy link

ajres commented Mar 24, 2017

macOS 10.12.1, golang 1.8, xcode 8.1, I just upgraded to golang 1.8. SG 1.4 compiles and runs without error.

@sethrosetter
Copy link
Contributor

I tried on macOS 10.12.3, xcode 8.2.1, golang 1.8.

Works for me

~/sync_gateway » godeps/bin/sync_gateway
2017-03-24T12:02:39.599-07:00 ==== Couchbase Sync Gateway/HEAD(nobranch)(9480da7) ====
2017-03-24T12:02:39.599-07:00 Configured process to allow 5000 open file descriptors
2017-03-24T12:02:39.599-07:00 Opening db /sync_gateway as bucket "sync_gateway", pool "default", server <walrus:>
2017-03-24T12:02:39.599-07:00 Opening Walrus database sync_gateway on <walrus:>
2017-03-24T12:02:39.600-07:00 Using default sync function 'channel(doc.channels)' for database "sync_gateway"
2017-03-24T12:02:39.600-07:00     Reset guest user to config
2017-03-24T12:02:39.600-07:00 Starting profile server on
2017-03-24T12:02:39.600-07:00 Starting admin server on 127.0.0.1:4985
2017-03-24T12:02:39.605-07:00 Starting server on localhost:4984 ...

@snej
Copy link
Contributor Author

snej commented Mar 24, 2017

You can download Xcode 8.3 from Apple's developer site. It says "beta 5" but I believe it's a final candidate because the app itself doesn't have the beta badge on its icon and its version string just says "8.3".

When you launch it, it will ask to install developer tools. If you didn't replace the existing Xcode with this one, you may also need to use the xcode_select tool to point the command-line toolchain at the actual binaries inside the new Xcode.

@dmaclach
Copy link

This happened with Xcode 8.3 final on macOS 10.12.3 today on a different piece of code.

@snej
Copy link
Contributor Author

snej commented Mar 28, 2017

Thanks for filing the issue against Go, @dmaclach! From that thread, there's a workaround: "adding -ldflags -s during the go build phase."

Xcode 8.3 betas have been around for months, so I'm surprised that no one in the Go community ran into this issue before I did...

@djpongh
Copy link

djpongh commented Mar 29, 2017

FYI - looks like Xcode 8.3 final is out (8E162). @jens not sure if that fixes the issue...

@dmaclach
Copy link

It does not :(

@djpongh djpongh added the icebox label Mar 31, 2017
@djpongh djpongh added this to the 1.5.1 milestone Sep 28, 2017
@djpongh djpongh modified the milestones: 1.5.1, 2.0.0 Nov 27, 2017
@djpongh djpongh added backlog and removed icebox labels Nov 27, 2017
@djpongh djpongh modified the milestones: 2.0.0, 2.1.0 Dec 19, 2017
@djpongh djpongh added the icebox label Dec 19, 2017
@adamcfraser
Copy link
Collaborator

Not seeing this on 10.12.6 w/ xcode 9.2. Closing - please reopen if this is seen again.

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

No branches or pull requests

6 participants