knu/postgresql-plruby — Issue #7: Random segfaults
Author: michalf
Created: 2011-12-30 10:38:02+00:00
State: open

Hi,

I am getting random Ruby process segfaults leading to PostgreSQL restart

Here is a fragment of the log file:

/usr/local/rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
2011-12-28 14:19:56 UTC LOG: server process (PID 32359) was terminated by signal 6: Aborted
2011-12-28 14:19:56 UTC HINT: In a moment you should be able to reconnect to the database and repeat your command.
2011-12-28 14:19:56 UTC WARNING: terminating connection because of crash of another server process
2011-12-28 14:19:56 UTC DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2011-12-28 14:19:56 UTC HINT: In a moment you should be able to reconnect to the database and repeat your command.
2011-12-28 14:19:56 UTC FATAL: the database system is in recovery mode

This happens every few hours on a very busy server.
PostgreSQL 9.0.6 on Debian 6.0, Ruby 1.8.7-p352 from RVM.

I would be glad to help diagnose the problem, but no idea how to debug this thing. Any hints welcomed.