Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2174

Segfault when Forking after connecting

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.11.4
    • Component/s: Connections
    • None
    • Environment:
      CentOS 7
      Ruby 2.5.1 (although this exists in 2.7.0 as well)
      Mongo 4.2.3 & 3.4.23
      mongo gem 2.11.4

      When you connect to mongo before forking, a segfault occurs on CentOS 7.  This does not happen with 2.10.4 and seems to have been introduced in 2.11.0.

       

      require 'mongo'
      
      Mongo::Client.new('mongodb://127.0.0.1:27017/evil')
      
      Process.fork do
        Mongo::Client.new('mongodb://127.0.0.1:27017/evil')
      end
      
      

      A workaround is to close the connection before forking, but that is problematic in our case.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            jessebs@gmail.com Jesse Bowes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: