Project

General

Profile

Actions

Bug #13079

closed

linked list corruption (probable race condition)

Added by fabianfrz (Fabian Franz) over 7 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
[ruby-core:78861]

Description

Hi, I am developing a binding for an external library and I encountered a problem with the ruby interpreter.

The library is made to run with threads and it randomly crashes the ruby interpreter which looks like a race codition with some of the core functions (I use the functions to append array elements and set key values of hashes).

Somtimes I get an error message, sometimes not - this is a sample:

*** Error in `ruby': corrupted double-linked list: 0x000000000380e390 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x70c4b)[0x389f9290c4b]
/usr/lib/libc.so.6(+0x76fe6)[0x389f9296fe6]
/usr/lib/libc.so.6(+0x7736c)[0x389f929736c]
/usr/lib/libc.so.6(+0x77e40)[0x389f9297e40]
/usr/lib/libruby.so.2.3(+0x9072d)[0x389f964e72d]
/usr/lib/libruby.so.2.3(+0xa11d4)[0x389f965f1d4]
/usr/lib/libruby.so.2.3(rb_io_fptr_finalize+0x22)[0x389f96609b2]
/usr/lib/libruby.so.2.3(+0x87db1)[0x389f9645db1]
/usr/lib/libruby.so.2.3(rb_gc_call_finalizer_at_exit+0x2b7)[0x389f9650057]
/usr/lib/libruby.so.2.3(ruby_cleanup+0x3ea)[0x389f9634cea]
/usr/lib/libruby.so.2.3(ruby_run_node+0x25)[0x389f9634f35]
ruby[0x4007cb]
/usr/lib/libc.so.6(__libc_start_main+0xf1)[0x389f9240291]
ruby(_start+0x2a)[0x4007fa]

While the function is running, I disable the GC because it would randomly crash this function (by deleting the objects while building the data structure).

Updated by ko1 (Koichi Sasada) over 7 years ago

  • Status changed from Open to Feedback

I'm not sure correctly, but you may violate something MRI requires.
Currently, I can't understand anything.
If you can make a reproducible source set, please submit again.

Thanks,
Koichi

Actions #2

Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0