Locks seem to get the process into a state where it can't be interrupted. A test case is attached.
I first noticed the problem with "select ... for update" row-level locks, but switched the example to use an advisory lock to simplify.
The overall story is one thread grabs the lock, another waits on it. When the process gets INT, the thread with the lock seems to shutdown without releasing the lock. The remaining thread keeps waiting indefinitely, and the process doesn't respond to INT, QUIT, or TERM. It does still respond to USR1 which the example uses to dump thread backtraces.
postgres 9.5.1 on CentOS 7.1 in VirtualBox VM.
OS X 10.10.5 Ruby 2.3.1 PG 0.18.4 lib 9.4.4