Project

General

Profile

Actions

Backport #5700

closed

fork {} segfaults during VM cleanup when run inside Fiber

Added by normalperson (Eric Wong) about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
[ruby-core:41456]

Description

The issue is very easy to reproduce:

Fiber.new do
  p Process.waitpid2(fork {})
end.resume

Parent process successfully exits, child process segfaults while
it is exiting.

Backtrace is attached (gdb_bt.txt)

MALLOC_CHECK_=3 with GNU libc malloc() implementation detects an
attempt to free invalid pointer (attachment: malloc_check_3.txt)

I can also reproduce this with 1.9.2-p290 and 1.9.3-p0 as well as
latest trunk, so it has been around a while and a fix needs to be
backported.


Files

gdb_bt.txt (2.57 KB) gdb_bt.txt GDB backtrace normalperson (Eric Wong), 12/03/2011 10:37 AM
malloc_check_3.txt (6.12 KB) malloc_check_3.txt output with MALLOC_CHECK_=3 when run with GNU libc normalperson (Eric Wong), 12/03/2011 10:37 AM
fiber_fork.rb (54 Bytes) fiber_fork.rb script to reproduce error normalperson (Eric Wong), 12/03/2011 10:37 AM
bug5700.patch (2.06 KB) bug5700.patch nagachika (Tomoyuki Chikanaga), 02/10/2012 12:30 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0