Issue #16385 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Third Party's Issue

This crash happens inside the pg gem. It's either caused by the pg gem, libpq (PostgreSQL), or one of the internal Mac OS libraries listed.

```
3   libsystem_platform.dylib            0x00007fff64d62b1d _sigtramp + 29
4   libdispatch.dylib                   0x00007fff64b1b44e _dispatch_mgr_queue_push + 41
5   libdispatch.dylib                   0x00007fff64b1150e _dispatch_client_callout + 8
6   libdispatch.dylib                   0x00007fff64b1d567 _dispatch_lane_barrier_sync_invoke_and_complete + 60
7   Security                            0x00007fff3a083661 _ZN8Security12KeychainCore14StorageManager14tickleKeychainEPNS0_12KeychainImplE + 485
8   Security                            0x00007fff39e56374 _ZN8Security12KeychainCore12KCCursorImpl4nextERNS0_4ItemE + 352
9   Security                            0x00007fff3a0256a1 _ZN8Security12KeychainCore14IdentityCursor4nextERNS_10SecPointerINS0_8IdentityEEE + 217
10  Security                            0x00007fff3a04a1ef SecIdentitySearchCopyNext + 155
11  Security                            0x00007fff3a055504 _Z23SecItemCopyMatching_osxPK14__CFDictionaryPPKv + 261
12  Security                            0x00007fff3a058d50 SecItemCopyMatching + 338
13  Heimdal                             0x00007fff4f787f43 keychain_query + 531
14  Heimdal                             0x00007fff4f785b8c hx509_certs_find + 92
15  Heimdal                             0x00007fff4f744592 _krb5_pk_find_cert + 466
16  GSS                                 0x00007fff302f998b _gsspku2u_acquire_cred + 619
17  GSS                                 0x00007fff302debbc gss_acquire_cred + 940
18  libpq.5.dylib                       0x00000001084b36e3 pg_GSS_have_cred_cache + 54
19  libpq.5.dylib                       0x00000001084a1eb0 PQconnectPoll + 6356
20  libpq.5.dylib                       0x000000010849f026 connectDBComplete + 231
21  libpq.5.dylib                       0x000000010849f1ad PQconnectdb + 36
22  pg_ext.bundle                       0x0000000108467c61 gvl_PQconnectdb_skeleton + 17
23  libruby.2.5.dylib                   0x0000000105b604a2 rb_thread_call_without_gvl + 82
24  pg_ext.bundle                       0x0000000108467c3d gvl_PQconnectdb + 45
25  pg_ext.bundle                       0x000000010846c8d9 pgconn_init + 121
26  libruby.2.5.dylib                   0x0000000105bb0fad vm_call0_body + 557
```

It's very similar to #16239.  If I had to guess, this is a PostgreSQL issue with GSS authentication on Mac OS. Since PostgreSQL 12 was just released, it may be a regression. Please try contacting the PostgreSQL developers.

----------------------------------------
Bug #16385: Segmentation fault when running a rails app with puma
https://bugs.ruby-lang.org/issues/16385#change-82904

* Author: itkin (nicolas paon)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.1
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
got a new machine and after reinstalling a dev env, i cannot run locally a functional rails app
seems to be linked to puma since the app can be booted and the database can be accessed from the rails console.

If somebody more competent than me could take a quick look this is surely a huge setup mistake on my part (fact is that i don't see it)

NB : i set up the macbook with disk encryption in a first time, then (trying to blindly fix the issue) reverted this option and reinstalled rvm . 


osx 10.15.1
xcode 11.2.1
rvm 1.29.9 (latest)
ruby 2.5.1 
postgres (PostgreSQL) 12.1

gems : 
rails 5.2.0
puma 3.11.4
pg 0.18.4

the error trace (the complete trace is attached) : 

`/Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:299: [BUG] Segmentation fault at 0x0000000000000110
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin19]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:                    
     * ~/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 -----------------------------------------------
c:0005 p:---- s:0020 e:000019 CFUNC  :sleep
c:0004 p:0007 s:0015 e:000014 BLOCK  /Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connecti [FINISH]
c:0003 p:---- s:0012 e:000011 CFUNC  :loop
c:0002 p:0006 s:0008 e:000007 BLOCK  /Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connecti [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:298:in `block in run'
/Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:298:in `loop'
/Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:299:in `block (2 levels) in run'
/Users/nicolas/.rvm/gems/ruby-2.5.1@softcorner2/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:299:in `sleep'

`

---Files--------------------------------
crash-trace.txt (494 KB)
ruby_2019-12-02-133809_toto.crash (70.3 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>