Segmentation fault in Ruby driver

50 views
Skip to first unread message

Matthew Welke

unread,
Feb 28, 2017, 11:02:41 PM2/28/17
to mongodb-user
I have an application that's producing a segmentation fault. The application code is available here.

It runs as two Docker containers. A mongo container has the /ebs/data/db (or /disk/data/db if I use GCP) directory bound to its /data/db directory, which is block storage for the clouds I use. A rails-tester container is linked to it so that it can use it as its database. When I do a siege with settings "-c 10 -r 5 -d 1" I get about 1-4 out of the 50 transactions failing. And a custom load tester script I use, which hits it with a request, waits for a response, and hits it again, looping forever, will encounter a 500 and stop after about 20-100 request cycles.

The segmentation fault error message from the console running the app in development is here.

This is the first time I've ever encountered a segfault in Ruby so I'm not sure what might cause it or how to interpret the error message, but it looks like it's coming from the MongoDB driver. I was wondering if anybody could provide some insight here.

Wan Bachtiar

unread,
Mar 15, 2017, 2:04:15 AM3/15/17
to mongodb-user

Hi Matthew,

The application code example in Gitlab has disappeared (or not accessible).

c:0109 p:0045 s:0714 e:000711 METHOD /usr/local/lib/ruby/2.4.0/forwardable.rb:228

However, based on your stack trace message, this seems related to problem described in def_delegators causes random errors in MRI 2.4.0 Which should be fixed in Ruby 2.4.1.

If you’re still seeing the problem after upgrading to Ruby v2.4.1+, would you be able to provide:

  • A simpler Ruby code/stack that others can reproduce easily
  • MongoDB Ruby driver version,
  • MongoDB version and topology (standalone, replicaset, sharded cluster)
  • Docker container file/setup for MongoDB
  • MongoDB log entries around the segmentation fault

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages