Project

General

Profile

Actions

Bug #16283

closed

A fork in transaction of PG cause Segmentation fault

Added by doloopwhile@gmail.com (健司 小本) over 4 years ago. Updated over 4 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
[ruby-core:95578]

Description

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) bug.zip doloopwhile@gmail.com (健司 小本), 10/29/2019 03:42 AM
stderr.txt (97.3 KB) stderr.txt doloopwhile@gmail.com (健司 小本), 10/29/2019 03:44 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #13646: Segmentation fault with postgresql_adapter in RailsThird Party's IssueActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0