Project

General

Profile

Actions

Bug #4032

closed

Segmentation Fault on Random Lines

Added by kabaka (Kyle Johnson) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
Backport:
[ruby-core:33085]

Description

=begin
I am running Arch Linux x86_64 using the current Ruby available from the official repos (ruby 1.9.2_p0-4 according to pacman). All packages on the system are up-to-date.

I'm working on a log parser for IRC logs. This is the third re-write and I continue to have the same problem: segfaults on random lines. The attached segfault occurred on: if c == "\n"

When it does not segfault, it generally continues until it throws an error such as:

:in `puts': wrong argument type #Class:0x000000009b4f88 (expected Data) (TypeError)

The only fix I have found for both of these is to disable the garbage collector with GC.disable, but that is obviously not a final solution.

In every segfault, I always see both of the following:

/usr/lib/libruby.so.1.9(rb_gc_finalize_deferred+0x30)
/usr/lib/libruby.so.1.9(rb_io_fptr_finalize+0x25)

It consistently fails when the parser reads one small file and then reads a portion of another small file, so long as neither file is empty.

The code for the project is at https://github.com/kabaka/Ruby-IRC-Log-Processor and will not be updated while I wait for an answer on this. (Excuse the poor quality of the code — it's hard to work on it when it segfaults every time I run it).
=end


Files

segfault.txt (3.7 KB) segfault.txt Full segfault output kabaka (Kyle Johnson), 11/07/2010 10:37 AM
Actions #1

Updated by sorah (Sorah Fukumori) over 13 years ago

=begin
I think this problem is already fixed on trunk.

Please try it on trunk too.

--sora_h
=end

Actions #2

Updated by kabaka (Kyle Johnson) over 13 years ago

=begin
Yep, fixed on trunk. Neat.

Thanks.
=end

Actions #3

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Open to Closed

=begin
And has been backported to 1.9.2 already.
Wait for the next release.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0