Project

General

Profile

Actions

Bug #11481

closed

Segmentation fault when thread is killed during `require`.

Added by t-8ch (Thomas Weißschuh) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[ruby-core:<unknown>]

Description

One of a library used by us executes open from uri-open in multiple thread in parallel under a timeout.
open-uri implicitly requires net/http. When the import machinery is killed during performing an import this will lead to a segfault further down the line.

I readily accept that it is very poor practice to do require in a loop which is suspect to uncatchable exceptions,
But unfortunately the user has no idea that requires are performed.

The test.rb script from the attachements triggers this bug. You may want to spawn less threads. The high number was chosen to improve the rate of triggering the bug.

We tested this on ruby 2.1.5p273 as shipped with debian Jessie. And ruby 2.2.3p173 from ArchLinux.


Files

backtrace (255 KB) backtrace Backtrace from the execution t-8ch (Thomas Weißschuh), 08/24/2015 12:49 PM
test.rb (231 Bytes) test.rb Script which demonstrates the bug t-8ch (Thomas Weißschuh), 08/24/2015 12:49 PM
backtrace.symbols (122 KB) backtrace.symbols Another backtrace including symbols t-8ch (Thomas Weißschuh), 08/25/2015 07:28 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #11404: Segfault when 'throw' occurs while loading a Ruby source file [PATCH]ClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0