{"action":"created","issue":{"url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/808","repository_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby","labels_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/808/labels{/name}","comments_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/808/comments","events_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/808/events","html_url":"https://github.com/ruby-concurrency/concurrent-ruby/issues/808","id":441480622,"node_id":"MDU6SXNzdWU0NDE0ODA2MjI=","number":808,"title":"Segmentation fault with ruby-2.6.3","user":{"login":"cesarizu","id":658725,"node_id":"MDQ6VXNlcjY1ODcyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/658725?v=4","gravatar_id":"","url":"https://api.github.com/users/cesarizu","html_url":"https://github.com/cesarizu","followers_url":"https://api.github.com/users/cesarizu/followers","following_url":"https://api.github.com/users/cesarizu/following{/other_user}","gists_url":"https://api.github.com/users/cesarizu/gists{/gist_id}","starred_url":"https://api.github.com/users/cesarizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesarizu/subscriptions","organizations_url":"https://api.github.com/users/cesarizu/orgs","repos_url":"https://api.github.com/users/cesarizu/repos","events_url":"https://api.github.com/users/cesarizu/events{/privacy}","received_events_url":"https://api.github.com/users/cesarizu/received_events","type":"User","site_admin":false},"labels":[{"id":49008423,"node_id":"MDU6TGFiZWw0OTAwODQyMw==","url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/labels/bug","name":"bug","color":"fc2929","default":true},{"id":985810332,"node_id":"MDU6TGFiZWw5ODU4MTAzMzI=","url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/labels/high-priority","name":"high-priority","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2019-05-07T23:00:35Z","updated_at":"2019-11-01T16:04:15Z","closed_at":null,"author_association":"NONE","body":"When updating an app to run with ruby 2.6.3 (from 2.4.4) I get the following error:\r\n\r\n```\r\n/home/user/.rvm/gems/ruby-2.6.3@project/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:87: [BUG] Segmentation fault at 0x000000002222002d\r\nruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]\r\n\r\n-- Control frame information -----------------------------------------------\r\nc:0002 p:0006 s:0007 e:000005 BLOCK  /home/user/.rvm/gems/ruby-2.6.3@project/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var. [FINISH]\r\nc:0001 p:---- s:0003 e:000002 (none) [FINISH]\r\n\r\n-- Ruby level backtrace information ----------------------------------------\r\n/home/user/.rvm/gems/ruby-2.6.3@project/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:87:in `block (2 levels) in threadlocal_finalizer'\r\n\r\n-- Machine register context ------------------------------------------------\r\n RIP: 0x00007fde9b71bf49 RBP: 0x0000000000021deb RSP: 0x00007fde97cb77e8\r\n RAX: 0x000000000b275620 RBX: 0x0000000001719630 RCX: 0x000000002222002d\r\n RDX: 0x0000000000000000 RDI: 0x000000000b275620 RSI: 0x000000000a667f70\r\n  R8: 0x0000000001718d50  R9: 0x0000000001719618 R10: 0x0000000000000008\r\n R11: 0x000000000a568038 R12: 0x000000000b2750f0 R13: 0x000000000a567ff8\r\n R14: 0x0000000001719640 R15: 0x000000000a667f70 EFL: 0x0000000000010206\r\n\r\n-- C level backtrace information -------------------------------------------\r\n```\r\n\r\nI tried using `Concurrent.use_stdlib_logger(Logger::DEBUG)` to get more information but nothing else is printed to the console. How can I start debugging this problem?\r\n\r\n```\r\n* Operating system:                linux\r\n* Ruby implementation:             Ruby 2.6.3\r\n* `concurrent-ruby` version:       1.1.5\r\n* `concurrent-ruby-ext` installed: no\r\n* `concurrent-ruby-edge` used:     no\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/comments/548844871","html_url":"https://github.com/ruby-concurrency/concurrent-ruby/issues/808#issuecomment-548844871","issue_url":"https://api.github.com/repos/ruby-concurrency/concurrent-ruby/issues/808","id":548844871,"node_id":"MDEyOklzc3VlQ29tbWVudDU0ODg0NDg3MQ==","user":{"login":"davidw","id":5064,"node_id":"MDQ6VXNlcjUwNjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5064?v=4","gravatar_id":"","url":"https://api.github.com/users/davidw","html_url":"https://github.com/davidw","followers_url":"https://api.github.com/users/davidw/followers","following_url":"https://api.github.com/users/davidw/following{/other_user}","gists_url":"https://api.github.com/users/davidw/gists{/gist_id}","starred_url":"https://api.github.com/users/davidw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidw/subscriptions","organizations_url":"https://api.github.com/users/davidw/orgs","repos_url":"https://api.github.com/users/davidw/repos","events_url":"https://api.github.com/users/davidw/events{/privacy}","received_events_url":"https://api.github.com/users/davidw/received_events","type":"User","site_admin":false},"created_at":"2019-11-01T16:04:15Z","updated_at":"2019-11-01T16:04:15Z","author_association":"NONE","body":"I filed a Ruby bug here: https://bugs.ruby-lang.org/issues/16288\r\n\r\nIn this code, the thread in the finalizer won't run, because the main thread has already been marked as killed, so it can't start a thread:\r\n\r\n```\r\nThread.DEBUG = 1\r\n\r\nclass Foo\r\n  def initialize\r\n    ObjectSpace.define_finalizer(self, proc do\r\n                                   Foo.foo_finalizer\r\n                                 end)\r\n  end\r\n\r\n  def bar\r\n    puts 'bar'\r\n  end\r\n\r\n  def Foo.foo_finalizer\r\n    puts \"foo_finalizer\"\r\n    t = Thread.new do\r\n      puts \"Thread reporting for duty\"\r\n    end\r\n    puts \"foo_finalizer thread launched\"\r\n    sleep 5\r\n  end\r\nend\r\n\r\nf = Foo.new\r\nf.bar\r\nf = nil\r\n\r\nsleep 1\r\n```\r\n\r\n`Exception `ThreadError' at ./the_finalizer.rb:18 - can't alloc thread`"}}
{"actor":{"display_login":"davidw"}}