-
Type: Bug
-
Resolution: Works as Designed
-
Priority: 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.