Hubert Jakubiak
Hubert Jakubiak

Reputation: 1013

How to invoke [BUG] Segmentation fault or another bug in Ruby for testing reasons?

I want to test Sidekiq PRO reliability on local machine so I need to somehow trigger bug like [BUG] Segmentation fault manually to kill Sidekiq process.

Upvotes: 2

Views: 281

Answers (2)

Mike Perham
Mike Perham

Reputation: 22228

Just kill the Sidekiq process: kill -9 <pid>

Upvotes: 1

Casper
Casper

Reputation: 34328

You can emulate a segmentation fault by sending SIGSEGV to self. This will trigger the bug handler.

Process.kill("SEGV", Process.pid)

Upvotes: 1

Related Questions