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

cockroach 19.1.1 #40103

Closed
wants to merge 1 commit into from
Closed

cockroach 19.1.1 #40103

wants to merge 1 commit into from

Conversation

ajkr
Copy link

@ajkr ajkr commented May 20, 2019

Update cockroachdb formula to v19.1.1

@chenrui333
Copy link
Member

relates to #40048
Also relates to cockroachdb/cockroach#35637

@benesch
Copy link
Contributor

benesch commented May 20, 2019

This built properly, but the formula's smoke test failed. Did the behavior of cockroach start --background change in 19.1? The test does something like this:

cockroach start --background
cockroach sql -e 'SELECT 1';

It's the cockroach sql command that's failing because the server's not yet running. Does --background no longer wait for the server to start listening before daemonizing?

@benesch
Copy link
Contributor

benesch commented May 20, 2019

Actually, I suppose it's more likely that something's gone wrong during server bootup. Unfortunately any such error messages are buried inside start.out, which isn't shown in the error log. Someone will have to adjust the test to print out those errors.

@bdarnell bdarnell mentioned this pull request May 20, 2019
@ajkr ajkr force-pushed the cockroach-19.1.1 branch from 6fe8400 to 6ed1824 Compare May 20, 2019 22:33
@zbeekman
Copy link
Contributor

@ajkr if that doesn't fix the test, you may try adding a few seconds of sleep before trying to contact the server process.

@zbeekman
Copy link
Contributor

Test still failing. Try following advice in output, and, maybe adding a few seconds of sleep before attempting to spawn the process that connects to the server...

darwin18:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/cockroach.rb --verbose
==> /usr/local/Cellar/cockroach/19.1.1/bin/cockroach start --insecure --background --advertise-host=localhost &> start.out
==> /usr/local/Cellar/cockroach/19.1.1/bin/cockroach quit --insecure
Error: cannot dial server.
Is the server running?
If the server is running, check --host client-side and --advertise server-side.

Failed to connect to the node: initial connection heartbeat failed: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:26257: connect: connection refused"
Failed running "quit"
Error: cockroach: failed

@zbeekman zbeekman added the test failure CI fails while running the test-do block label May 21, 2019
@ajkr ajkr force-pushed the cockroach-19.1.1 branch from 6ed1824 to 6b69764 Compare May 21, 2019 02:23
@bdarnell
Copy link
Contributor

bdarnell commented May 21, 2019

Sleeping shouldn't be necessary (the test uses --background instead of & because the former waits to open all its ports etc before going into the background). We need to see what's in start.out (so I guess change the &> to a tee).

When I try to reproduce this build locally (on two different machines), I get a lot of weird c++ errors that look like they're problems in how the c++ standard library is getting compiled:

In file included from /tmp/cockroach-20190520-38469-hvi3ra/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/protobuf/src/google/protobuf/stubs/hash.h:146:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/unordered_map:384:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__hash_table:19:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error: no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error: no member named 'isnan' in the global namespace
using ::isnan;
      ~~^

@zbeekman
Copy link
Contributor

When I try to reproduce this build locally (on two different machines), I get a lot of weird c++ errors that look like they're problems in how the c++ standard library is getting compiled:

Which xcode do you have? You may need to install the C++ headers:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

@bdarnell
Copy link
Contributor

That worked. Why was this manual step necessary? Are we missing a dependency? (one of the two machines I tested on had a brand new installation of brew; it had previously only used macports)

I have the latest xcode and CLI tools (or at least that's what software update and xcode-select --install tell me). I'm able to build c++ outside of a brew context.

And FWIW, brew test ./Formula/cockroach.rb works on my machine, so we'll need to get that output to see why it's failing CI.

@zbeekman
Copy link
Contributor

zbeekman commented May 21, 2019

That worked. Why was this manual step necessary? Are we missing a dependency?

No, it's because Apple messes with the C++ libs and tooling all the time. IIRC, that installs headers that Apple considers deprecated or something like that. ¯\_(ツ)_/¯

Edit: IIRC, it's also specific to Mojave, and happens everytime you upgrade xcode.

@bdarnell
Copy link
Contributor

Installing the package worked so I don't want to dwell on it here, but one last observation. This SO question suggests that brew tries to detect this condition and give a prompt for it; this didn't happen in my case. I still have a second machine on which that package has not been installed if it would be a useful test case for making that warning more reliable.

@benesch benesch mentioned this pull request May 21, 2019
@benesch
Copy link
Contributor

benesch commented May 21, 2019

I'm hopeful that #40132 will help us get to the bottom of this.

@benesch
Copy link
Contributor

benesch commented May 21, 2019

Not sure what to make of this:

* ERROR: cockroach server exited with error: failed to create engines: invalid argument

@bdarnell
Copy link
Contributor

An inscrutable error at this stage generally means we're either running on a filesystem with incomplete posix support (such as whatever WSL uses), or in this case, maybe sandbox-exec is blocking something.

It looks like one way we could produce "failed to create engines: invalid argument" without additional context is if the setrlimit system call fails. Most other error paths seem to have some more context added to them.

We have comments indicating that macos would sometimes fail to return an error if you try to set the file descriptor limit to a higher value than allowed. Maybe now it's behaving correctly, but we break if that error is ever hit. Is there any way to increase the allowed file descriptor limit in brew CI (the tests pass when run locally)? If not, we'll probably have to wait until 19.1.2 to get an updated package into brew.

@bdarnell
Copy link
Contributor

See also golang/go#30401

Update cockroachdb formula to v19.1.1
@ajkr ajkr force-pushed the cockroach-19.1.1 branch from d7fb539 to 342da24 Compare May 21, 2019 19:03
@benesch
Copy link
Contributor

benesch commented May 21, 2019

@bdarnell hit the nail on the head. I've gotten CI to pass in #40132 with a patch to the rlimit code.

@ajkr
Copy link
Author

ajkr commented May 22, 2019

Thanks for solving it, Nikhil and Ben. Will close this one in favor of #40132.

@ajkr ajkr closed this May 22, 2019
@lock lock bot added the outdated PR was locked due to age label Feb 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age test failure CI fails while running the test-do block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants