Bug #11481
closedSegmentation fault when thread is killed during `require`.
Description
One of a library used by us executes open
from uri-open
in multiple thread in parallel under a timeout.
open-uri
implicitly require
s 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 require
s 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
Updated by t-8ch (Thomas Weißschuh) about 9 years ago
- File backtrace.symbols backtrace.symbols added
Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago
- Related to Bug #11404: Segfault when 'throw' occurs while loading a Ruby source file [PATCH] added
Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago
[But #11404] seems the similar issue and fixed on trunk.
Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago
- Status changed from Open to Closed
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE
r51292, r51439 and r51440 were backported into ruby_2_2
branch at r52655.
Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago
Backport r51445 into ruby_2_2
branch at r52661 to suppress warning in CI.