Project

General

Profile

Actions

Bug #4032

closed

Segmentation Fault on Random Lines

Added by kabaka (Kyle Johnson) about 14 years ago. Updated over 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

Also available in: Atom PDF

Like0
Like0Like0Like0