[ruby-core:95579] [Ruby master Bug#16283] A fork in transaction of PG cause Segmentation fault
From:
jean.boussier@...
Date:
2019-10-29 09:42:36 UTC
List:
ruby-core #95579
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/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>