Bugs: Browse | Submit New | Admin

[#27888] Segmentation fault

Date:
2010-02-25 11:12
Priority:
3
Submitted By:
Xavier Noƫlle (gray)
Assigned To:
Erik Veenstra (erikveen)
Category:
None
State:
Open
Summary:
Segmentation fault

Detailed description
Hi,
Running a simple code with Ruby 1.9 computing a Levenshtein distance is alternatively very slow (I mean, below the speed
of the same script running 1.8) or ends with a segmentation fault, which backtrace is included at the end of this
message.

The guilty line is a simple call to Levenshtein::distance with various valid UTF-8 arguments (the only test being
distance(".tessa", ".tuning.") when the program segfaults, but I don't think that's relevant to
the problem, it might be more of an unstability problem, since the same code does not end with the same error when run
twice).


The backtrace:
/var/lib/gems/1.9.0/gems/levenshtein-0.2.0.1267019364/lib/levenshtein.rb:82: [BUG] Segmentation fault
ruby 1.9.0 (2008-10-04 revision 19669) [x86_64-linux]

-- control frame ----------
c:0021 p:---- s:0073 b:0073 l:000072 d:000072 CFUNC  :levenshtein_distance_fast
c:0020 p:0030 s:0067 b:0067 l:000066 d:000066 METHOD
/var/lib/gems/1.9.0/gems/levenshtein-0.2.0.1267019364/lib/levenshtein.rb:82
c:0019 p:0237 s:0061 b:0061 l:000060 d:000060 METHOD
/var/lib/gems/1.9.0/gems/levenshtein-0.2.0.1267019364/lib/levenshtein.rb:77
c:0018 p:0050 s:0053 b:0053 l:000108 d:000052 BLOCK  myfile.rb:25
c:0017 p:---- s:0051 b:0051 l:000050 d:000050 FINISH :new
c:0016 p:---- s:0049 b:0049 l:000048 d:000048 CFUNC  :downto
c:0015 p:0040 s:0045 b:0045 l:000108 d:000044 BLOCK  myfile.rb:22
c:0014 p:---- s:0042 b:0042 l:000041 d:000041 FINISH :puts
c:0013 p:---- s:0040 b:0040 l:000039 d:000039 CFUNC  :downto
c:0012 p:0049 s:0036 b:0036 l:000108 d:000035 BLOCK  myfile.rb:20
c:0011 p:---- s:0033 b:0033 l:000032 d:000032 FINISH :each_key
c:0010 p:---- s:0031 b:0031 l:000030 d:000030 CFUNC  :each
c:0009 p:0040 s:0028 b:0028 l:000108 d:000108 METHOD myfile.rb:17
c:0008 p:0063 s:0023 b:0023 l:000598 d:000598 METHOD myfile.rb:48
c:0007 p:0035 s:0018 b:0018 l:000010 d:000017 BLOCK  myfile.rb:30
c:0006 p:---- s:0016 b:0016 l:000015 d:000015 FINISH :method_added
c:0005 p:---- s:0014 b:0014 l:000013 d:000013 CFUNC  :each
c:0004 p:0012 s:0011 b:0011 l:000010 d:000010 METHOD myfile.rb:28
c:0003 p:0210 s:0008 b:0008 l:000007 d:000007 TOP    myfile.rb:43
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP    
---------------------------
DBG> : "/var/lib/gems/1.9.0/gems/levenshtein-0.2.0.1267019364/lib/levenshtein.rb:82:in
`levenshtein_distance_fast'"
DBG> : "/var/lib/gems/1.9.0/gems/levenshtein-0.2.0.1267019364/lib/levenshtein.rb:82:in
`distance_fast_or_slow'"
DBG> : "/var/lib/gems/1.9.0/gems/levenshtein-0.2.0.1267019364/lib/levenshtein.rb:77:in `distance'"
DBG> : "myfile.rb:25:in `block (3 levels) in singleWordsEquivalent'"
DBG> : "myfile.rb:22:in `downto'"
DBG> : "myfile.rb:22:in `block (2 levels) in singleWordsEquivalent'"
DBG> : "myfile.rb:20:in `downto'"
DBG> : "myfile.rb:20:in `block in singleWordsEquivalent'"
DBG> : "myfile.rb:17:in `each'"
DBG> : "myfile.rb:17:in `singleWordsEquivalent'"
DBG> : "myfile.rb:48:in `work'"
DBG> : "myfile.rb:30:in `block in run'"
DBG> : "myfile.rb:28:in `each'"
DBG> : "myfile.rb:28:in `run'"
DBG> : "myfile.rb:43:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0x7f3730bcd071
0x7f3730af9856
0x7f3730af99b3
0x7f3730b7907d
0x7f37308a1190
0x7f372f444f7b
0x7f372f444e3d
0x7f3730bbd45c
0x7f3730bc0355
0x7f3730bc37b2
0x7f3730bc6a1e
0x7f3730b230e1
0x7f3730bbd45c
0x7f3730bc0355
0x7f3730bc37b2
0x7f3730bc6a1e
0x7f3730b230e1
0x7f3730bbd45c
0x7f3730bc0355
0x7f3730bc37b2
0x7f3730bc6a1e
0x7f3730b0c747
0x7f3730b0cf74
0x7f3730b7f987
0x7f3730b0eaea
0x7f3730afac03
0x7f3730b0e016
0x7f3730b0e3be
0x7f3730bbd45c
0x7f3730bc0355
0x7f3730bc37b2
0x7f3730bc6a1e
0x7f3730adab91
0x7f3730bbd45c
0x7f3730bc0355
0x7f3730bc37b2
0x7f3730bc3b1f
0x7f3730afb82c
0x7f3730afcd07
0x4009cb
0x7f372fc78abd
0x4008b9
-------------------------------------------------------

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tonone2010-02-25 11:13gray