bosh icon indicating copy to clipboard operation
bosh copied to clipboard

'Segmentation fault' reported in bosh director worker_n.stderr.log

Open gu-bin opened this issue 8 years ago • 4 comments

Describe the bug After running bosh director for some time (no regular pattern to follow), the director and worker jobs fail (maybe crash) and can't be recovered by 'monit restart'. The following error is reported in director worker_n.stderr.log. Even VM OS restart can't help. We can only re-deploy the bosh director to make the jobs running again. We've met this problem in some of our environments. Has anyone ever seen this problem? What's the root cause please? Thanks.

To Reproduce There is no guarantee that it will be reproduced.

Logs

cni/cni-wrapper-plugin.conf.erb:4: warning: already initialized constant Bosh::Template::EvaluationContext::VXLAN_OVERHEAD
cni/cni-wrapper-plugin.conf.erb:4: warning: previous definition of VXLAN_OVERHEAD was here
cni/cni-wrapper-plugin.conf.erb:4: warning: already initialized constant Bosh::Template::EvaluationContext::VXLAN_OVERHEAD
cni/cni-wrapper-plugin.conf.erb:4: warning: previous definition of VXLAN_OVERHEAD was here
WARNING:  terminating connection because of crash of another server process
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.
HINT:  In a moment you should be able to reconnect to the database and repeat your command.
/var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/postgres.rb:243:in `initialize': PG::Error: could not connect to serve
r: Connection refused (Sequel::DatabaseConnectionError)
        Is the server running on host "127.0.0.1" and accepting
        TCP/IP connections on port 5432?
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/postgres.rb:243:in `new'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/postgres.rb:243:in `connect'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/connection_pool.rb:103:in `make_new'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/connection_pool/threaded.rb:224:in `make_new'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/connection_pool/threaded.rb:197:in `available'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/connection_pool/threaded.rb:133:in `_acquire'

[BUG] Segmentation fault at 0x00000000000000
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0001 p:---- s:0002 e:000001 (none) [FINISH]
-- Machine register context ------------------------------------------------
 RIP: 0x00005636461025a5 RBP: 0x00007fb56eba3d88 RSP: 0x00007fb56eba3d88
 RAX: 0x4808408b48f8894c RBX: 0x00007fb56eba3ef0 RCX: 0x00007fb574c60c5a
 RDX: 0x0000000000008000 RDI: 0x0000563648f61b70 RSI: 0x00007fb56eba3d70
  R8: 0x0000000000000000  R9: 0x0000000000000000 R10: 0x0000000000000d70
 R11: 0x0000000000000246 R12: 0x0000000000000000 R13: 0x00007fffd28e6b2f
 R14: 0x0000000000100000 R15: 0x00005636490a6820 EFL: 0x0000000000010202
-- C level backtrace information -------------------------------------------
/var/vcap/packages/director/gem_home/ruby/2.3.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:321: [BUG] rb_vm_get_cref: unreachable
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0002 p:0007 s:0005 e:000004 BLOCK  /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:321 [FINISH]
c:0001 p:---- s:0002 e:000001 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/var/vcap/packages/director/gem_home/ruby/2.3.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:321:in `block in create_with_logging_context'
-- C level backtrace information -------------------------------------------
[BUG] Segmentation fault at 0x00000000000000
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0001 p:---- s:0002 e:000001 (none) [FINISH]


- Ruby level backtrace information ----------------------------------------
/var/vcap/packages/director/gem_home/ruby/2.3.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:321:in `block in create_with_logging_context'
-- C level backtrace information -------------------------------------------
[BUG] Segmentation fault at 0x00000000000000
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0001 p:---- s:0002 e:000001 (none) [FINISH]
-- Machine register context ------------------------------------------------
 RIP: 0x00005638e3d695a5 RBP: 0x00007f45937ccd88 RSP: 0x00007f45937ccd88
 RAX: 0x0000000000000000 RBX: 0x00007f45937ccef0 RCX: 0x00007f4599889c5a
 RDX: 0x0000000000008000 RDI: 0x00005638e800e0e0 RSI: 0x00007f45937ccd70
  R8: 0x0000000000000000  R9: 0x000000000000fef0 R10: 0x0000000000000d70
 R11: 0x0000000000000246 R12: 0x0000000000000000 R13: 0x00007fffbfcfe52f
 R14: 0x0000000000100000 R15: 0x00005638e80142f0 EFL: 0x0000000000010246
-- C level backtrace information -------------------------------------------
/var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/postgres.rb:243:in `initialize': PG::Error: could not connect to serve
r: Connection refused (Sequel::DatabaseConnectionError)
        Is the server running on host "127.0.0.1" and accepting
        TCP/IP connections on port 5432?
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/postgres.rb:243:in `new'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/adapters/postgres.rb:243:in `connect'
        from /var/vcap/packages/director/gem_home/ruby/2.3.0/gems/sequel-4.32.0/lib/sequel/connection_pool.rb:103:in `make_new'

Versions (please complete the following information):

  • Infrastructure: SoftLayer
  • BOSH version: 263.3.0
  • Stemcell version: ubuntu-xenial/97.17.9

gu-bin avatar Nov 26 '18 05:11 gu-bin

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/162189118

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Nov 26 '18 05:11 cf-gitbot

I don't think we have seen this before. It is very surprising that restarting the VM does not fix the issue, but recreating it does. If it is a runtime issue, restarting of process or VM should help. If it's external or host-related, recreates are more likely to fix it.

The following error seems most relevant to your issue. If it is a corrupted system or host memory-related issue, that might explain why the recreates fix it.

WARNING:  terminating connection because of crash of another server process
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.

Given this sounds specific to your environment and VMs, I'm not sure if we'll be able to be much help. Interested to hear what your investigation finds, or if the community has seen this issue.

dpb587-pivotal avatar Nov 26 '18 20:11 dpb587-pivotal

This issue was marked as Stale because it has been open for 21 days without any activity. If no activity takes place in the coming 7 days it will automatically be close. To prevent this from happening remove the Stale label or comment below.

bosh-admin-bot avatar Jul 27 '21 15:07 bosh-admin-bot

This issue was closed because it has been labeled Stale for 7 days without subsequent activity. Feel free to re-open this issue at any time by commenting below.

bosh-admin-bot avatar Aug 03 '21 15:08 bosh-admin-bot