From: mstate@... Date: 2015-11-12T16:45:48+00:00 Subject: [ruby-core:71465] [Ruby trunk - Bug #11662] Hash#delete causes segmentation fault at 0x00000000001ec8 Issue #11662 has been updated by Mike State. Yes, we are using threads. @tmp_handlers is only called from one other location in line #129. ~~~ @tmp_handlers[id.to_s] = handler ~~~ Should it be safe to add a key to a hash while another thread is deleting a key from the same hash? Unfortunately, I'm not sure if I can inspect with GDB. Let me know if it's required and I'll try and figure out how to do it. ---------------------------------------- Bug #11662: Hash#delete causes segmentation fault at 0x00000000001ec8 https://bugs.ruby-lang.org/issues/11662#change-54835 * Author: Mike State * Status: Feedback * Priority: Normal * Assignee: Yukihiro Matsumoto * ruby -v: ruby 2.3.0dev (2015-11-02 trunk 52423) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- I have seen this bug happen several times, but only when the system is under heavy load. I have to apologize that don't have any means of easily reproducing it. I saw the same bug appear (segmentation fault at same line 296) on ruby 2.1.7p400 (2015-08-18 revision 51632) [x86_64-linux]. However on 2.1.7, the Segmentation fault was 0x00000000000000. I have the full core dump for 2.1.7 which I would be happy to provide if it's useful. Line 296 of client.rb contains: ~~~ruby if handler = @tmp_handlers.delete(stanza.id) ~~~ ~~~ /home/modus/apps/modus_surveyor/bundle/ruby/2.3.0/gems/blather-1.1.4/lib/blather/client/client.rb:296: [BUG] Segmentation fault at 0x00000000001ec8 ruby 2.3.0dev (2015-11-02 trunk 52423) [x86_64-linux] (snip) ~~~ ---Files-------------------------------- bug-11662.log (256 KB) -- https://bugs.ruby-lang.org/