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

README: Add note about DB fix for Apple Silicon #4282

Merged
merged 3 commits into from
May 24, 2024

Conversation

sampart
Copy link
Contributor

@sampart sampart commented Apr 16, 2024

Description

My colleague @mgriffin encountered this problem, and solved it with the change mentioned. Here's fuller error output from him:

[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.


FATAL: prematurely zombied
[39268] - Worker 0 (PID: 39439) booted in 0.05s, phase: 0
/Users/mike/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/pg-1.5.6/lib/pg/connection.rb:695: [BUG] Segmentation fault at 0x0000000103ba8abc
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]

-- Crash Report log information --------------------------------------------
   See Crash Report log file in one of the following locations:
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.
Don't forget to include the above Crash Report log file in bug reports.

-- Control frame information -----------------------------------------------

I've also very slightly tweaked a couple of other bits of the README to hopefully make it clearer.

Type of change

  • Documentation update

How Has This Been Tested?

Local setup

@sampart sampart changed the title Add note about DB fix for Apple Silicon README: Add note about DB fix for Apple Silicon Apr 16, 2024
dorner
dorner previously requested changes Apr 17, 2024
README.md Outdated
@@ -129,6 +130,7 @@ You can sign up [here](https://join.slack.com/t/rubyforgood/shared_invite/zt-21p
Please let us know by opening up an issue! We have many new contributors come through and it is likely what you experienced will happen to them as well.

- *"My RBENV installation didn't work!"* - The rbenv repository provides a [rbenv-doctor script](https://github.com/rbenv/rbenv-installer#rbenv-doctor) to verify the installation and check if a ruby version is installed
- *"I see a database segmentation fault"* - If you're running Apple Silicon, adding `gssencmode: "disable"` to `config/database.yml` should resolve this.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

database.yml is checked into git though. Is there a way to solve this that doesn't involve making a file dirty for your own machine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this on Intel Mac and the option seems okay there too. Assuming it's all okay in Linux too, we could just add it to the development section of database.yml for everyone, instead of changing the docs?

gssencmode
This option determines whether or with what priority a secure GSS TCP/IP connection will be negotiated with the server. There are three modes:

disable
only try a non-GSSAPI-encrypted connection
[...]

In development, not encrypting connections seems okay as a default?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, yep. I'm good with changing this in the YAML. I'll grab it and see if it causes any problems, and if not we should be good to merge.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine on linux as well -- I'd prefer adding it to the database.yml (development and test?) and not mentioning it in the README.

@dorner
Copy link
Collaborator

dorner commented May 17, 2024

I tried this out on Mac and it was fine. I'm good with moving this to database.yml. Feel free to repurpose this PR to do that.

@vsrnth
Copy link
Contributor

vsrnth commented May 19, 2024

Ran into this issue today ended up adding export PGGSSENCMODE="disable" to my .zshrc to fix this.

@sampart
Copy link
Contributor Author

sampart commented May 22, 2024

Thanks all. I've moved the change to database.yml in f6c1deb

Copy link
Collaborator

@awwaiid awwaiid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. If we need to add it for test-mode we can do that separately.

@awwaiid awwaiid merged commit 58cbea9 into rubyforgood:main May 24, 2024
19 of 20 checks passed
Copy link
Contributor

@sampart: Your PR README: Add note about DB fix for Apple Silicon is part of today's Human Essentials production release: 2024.05.26.
Thank you very much for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

4 participants