ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:95578] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault
       [not found] <redmine.issue-16283.20191029035536@ruby-lang.org>
@ 2019-10-29  3:55 ` doloopwhile
  2019-10-29  9:42 ` [ruby-core:95579] " jean.boussier
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: doloopwhile @ 2019-10-29  3:55 UTC (permalink / raw)
  To: ruby-core

Issue #16283 has been reported by doloopwhile@gmail.com (健司 小本).

----------------------------------------
Bug #16283: A fork in transaction of PG cause Segmentation fault
https://bugs.ruby-lang.org/issues/16283

* Author: doloopwhile@gmail.com (健司 小本)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Call Kernel#fork in transaction of Postgres and call some Socket method in fork's block, then ruby on the child process abort with segmentation fault.

Conceptual code:

```
MGModel.connection.transaction do

  # Do something

  fork do
    Socket.gethostbyname('localhost') # <- Segmentation fault.
  end
end
```

Expected behavior: The child process successfully exists or raises exception.

Please see attached files for Reproduction code and full error log.


---Files--------------------------------
bug.zip (1.51 KB)
stderr.txt (97.3 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:95579] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault
       [not found] <redmine.issue-16283.20191029035536@ruby-lang.org>
  2019-10-29  3:55 ` [ruby-core:95578] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault doloopwhile
@ 2019-10-29  9:42 ` jean.boussier
  2019-10-29 18:28 ` [ruby-core:95581] " merch-redmine
  2019-10-30  7:27 ` [ruby-core:95587] " doloopwhile
  3 siblings, 0 replies; 4+ messages in thread
From: jean.boussier @ 2019-10-29  9:42 UTC (permalink / raw)
  To: ruby-core

Issue #16283 has been updated by byroot (Jean Boussier).


Pretty sure that's the OSX specific bug that got fixed in 2.6.4 or 2.6.5 (This one IIRC but I might be wrong https://bugs.ruby-lang.org/issues/15887).

Can you try with 2.6.5 ?

----------------------------------------
Bug #16283: A fork in transaction of PG cause Segmentation fault
https://bugs.ruby-lang.org/issues/16283#change-82365

* Author: doloopwhile@gmail.com (健司 小本)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Call Kernel#fork in transaction of Postgres and call some Socket method in fork's block, then ruby on the child process abort with segmentation fault.

Conceptual code:

```
MGModel.connection.transaction do

  # Do something

  fork do
    Socket.gethostbyname('localhost') # <- Segmentation fault.
  end
end
```

Expected behavior: The child process successfully exists or raises exception.

Please see attached files for Reproduction code and full error log.


---Files--------------------------------
bug.zip (1.51 KB)
stderr.txt (97.3 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:95581] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault
       [not found] <redmine.issue-16283.20191029035536@ruby-lang.org>
  2019-10-29  3:55 ` [ruby-core:95578] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault doloopwhile
  2019-10-29  9:42 ` [ruby-core:95579] " jean.boussier
@ 2019-10-29 18:28 ` merch-redmine
  2019-10-30  7:27 ` [ruby-core:95587] " doloopwhile
  3 siblings, 0 replies; 4+ messages in thread
From: merch-redmine @ 2019-10-29 18:28 UTC (permalink / raw)
  To: ruby-core

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

Status changed from Open to Third Party's Issue

This looks like the Mac OS getaddrinfo bug. See the part of the C-level backtrace before the crash:

```
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1d) [0x7fff7cbf8b5d]
/usr/lib/system/libsystem_trace.dylib(_os_log_preferences_refresh+0x4c) [0x7fff7cc1b90a]
/usr/lib/system/libsystem_trace.dylib(0x7fff7cc1c13d) [0x7fff7cc1c13d]
/usr/lib/system/libsystem_info.dylib(si_destination_compare_rfc6724+0x97e) [0x7fff7cb2fbee]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb2d1f9) [0x7fff7cb2d1f9]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb2cd3f) [0x7fff7cb2cd3f]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb0b6df) [0x7fff7cb0b6df]
/usr/lib/system/libsystem_c.dylib(_isort+0xc1) [0x7fff7cab5e5b]
/usr/lib/system/libsystem_c.dylib(0x7fff7cab5d88) [0x7fff7cab5d88]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb02f2d) [0x7fff7cb02f2d]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb01885) [0x7fff7cb01885]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb00f77) [0x7fff7cb00f77]
/usr/lib/system/libsystem_info.dylib(0x7fff7cb00e7d) [0x7fff7cb00e7d]
/Users/k-omoto/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/socket.bundle(nogvl_getaddrinfo+0xb5) [0x1048ea295]
```

Many variations of this bug have been reported, see all the bugs linked in #13646.  As this crash happens inside a Mac OS system library, there doesn't appear to be anything Ruby can do to fix it.

----------------------------------------
Bug #16283: A fork in transaction of PG cause Segmentation fault
https://bugs.ruby-lang.org/issues/16283#change-82369

* Author: doloopwhile@gmail.com (健司 小本)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Call Kernel#fork in transaction of Postgres and call some Socket method in fork's block, then ruby on the child process abort with segmentation fault.

Conceptual code:

```
MGModel.connection.transaction do

  # Do something

  fork do
    Socket.gethostbyname('localhost') # <- Segmentation fault.
  end
end
```

Expected behavior: The child process successfully exists or raises exception.

Please see attached files for Reproduction code and full error log.


---Files--------------------------------
bug.zip (1.51 KB)
stderr.txt (97.3 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:95587] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault
       [not found] <redmine.issue-16283.20191029035536@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-10-29 18:28 ` [ruby-core:95581] " merch-redmine
@ 2019-10-30  7:27 ` doloopwhile
  3 siblings, 0 replies; 4+ messages in thread
From: doloopwhile @ 2019-10-30  7:27 UTC (permalink / raw)
  To: ruby-core

Issue #16283 has been updated by doloopwhile@gmail.com (健司 小本).


FYI:

```
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.5
BuildVersion:	18F132
```

----------------------------------------
Bug #16283: A fork in transaction of PG cause Segmentation fault
https://bugs.ruby-lang.org/issues/16283#change-82375

* Author: doloopwhile@gmail.com (健司 小本)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Call Kernel#fork in transaction of Postgres and call some Socket method in fork's block, then ruby on the child process abort with segmentation fault.

Conceptual code:

```
MGModel.connection.transaction do

  # Do something

  fork do
    Socket.gethostbyname('localhost') # <- Segmentation fault.
  end
end
```

Expected behavior: The child process successfully exists or raises exception.

Please see attached files for Reproduction code and full error log.


---Files--------------------------------
bug.zip (1.51 KB)
stderr.txt (97.3 KB)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-30  7:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-16283.20191029035536@ruby-lang.org>
2019-10-29  3:55 ` [ruby-core:95578] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault doloopwhile
2019-10-29  9:42 ` [ruby-core:95579] " jean.boussier
2019-10-29 18:28 ` [ruby-core:95581] " merch-redmine
2019-10-30  7:27 ` [ruby-core:95587] " doloopwhile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).