Skip to content

segfault on ruby 2.5.1 (on travis-ci) #849

Closed

Description

@DavidS
* Operating system:                linux
* Ruby implementation:             Ruby 2.5.1
* `concurrent-ruby` version:       1.1.6
* `concurrent-ruby-ext` installed: no
* `concurrent-ruby-edge` used:   no

Running puppetlabs/puppet_litmus@1fd29fe on travis consistently gives the attached ruby segfault: log.txt

Running against 1 targets.
..../home/travis/build/puppetlabs/puppet_litmus/puppetlabs-motd/vendor/bundle/ruby/2.5.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:113: [BUG] Segmentation fault at 0x00000000371bb696
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
[...]

The same code works fine on ruby 2.5.7.

Activity

  1. added
    bugA bug in the library or documentation.
    on Feb 16, 2020
  2. pitr-ch commented on Feb 16, 2020

    @pitr-ch
    Member

    Thanks for the report. Few notes:

    Further investigation is needed.

  3. pitr-ch commented on Feb 17, 2020

    @pitr-ch
    Member

    @fzakaria would you be interested to take a look at this?
    So far I know that Thread creation, Mutex, Queue cause problems and at the moment I do not have more ideas how to get around this.

  4. fzakaria commented on Feb 17, 2020

    @fzakaria
    Contributor

    Sure thing.
    I'll build 2.51 from source & run the tests and see what I can uncover.

  5. fzakaria commented on Feb 17, 2020

    @fzakaria
    Contributor

    Few notes from looking into it:

    1. @pitr-ch added some changes to address https://bugs.ruby-lang.org/issues/16288 as part of Safer finalizers #821

    The change basically removed creating new threads in the finalizers since the finalizers may be called during shutdown & threads cannot be started.

    1. This bug involves changes post the submission of the PR above; where the segfault is occurring within Queue#push
      To me that means either the Queue or the @index have been garbage collected already.
  6. pitr-ch commented on Mar 1, 2020

    @pitr-ch
    Member

    Thanks for looking into this. I got an idea how to deal with it, please have a look #856

  7. pitr-ch commented on Mar 1, 2020

    @pitr-ch
    Member

    @DavidS could you try the PR if it works for you?

  8. DavidS commented on Mar 9, 2020

    @DavidS
    Author

    Apologies for the delay - I've been on vacation the last week. I'll see if I can run that PR through our CI systems, we've had quite a high hit-rate on the segfault.

  9. pitr-ch commented on Mar 9, 2020

    @pitr-ch
    Member

    @DavidS No problem, thank you for giving it a try.

  10. schuylr commented on May 11, 2020

    @schuylr

    Just want to confirm I'm also seeing this on Ruby 2.5.3 with Version 1.1.6 of the gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug in the library or documentation.high-priorityShould be done ASAP.looking-for-contributorWe are looking for a contributor to help with this issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions