Skip to content

Instantly share code, notes, and snippets.

View digitalextremist's full-sized avatar
🏴

//de digitalextremist

🏴
View GitHub Profile
@digitalextremist
digitalextremist / handler-class.rb
Created April 23, 2013 06:42
Partial ( somewhat messy )snippet of WebSocket support implemented in Reel using Rack hijack_io's pre-header form. Client side is using portal.js and jQuery Mobile. Mu is a base class of utilities (such as Mu.debug to output data to the console) and Mu.socket to manipulate the socket itself, once captured. Ma is an instance of Sinatra::Base with…
require 'forwardable'
require "websocket/protocol/hybi"
module ProtocolAlias
def << data
text data
end
end
class Mu
@digitalextremist
digitalextremist / mail-compile.error-trace-001.log
Last active December 16, 2015 18:19
Stack trace of failing compile for Mail gem under rbx-head with ubuntu 12.04LTS & up-to-date packages.
root@convergence:/home/mu/one# scripts/one-server.sh
root@convergence:/home/mu/one# I, [2013-04-28T02:34:19.541402 #15521] INFO -- : Reel 0.3.0
I, [2013-04-28T02:34:19.543178 #15521] INFO -- : Listening on 0.0.0.0:80
I, [2013-04-28T02:34:19.543395 #15521] INFO -- : Number of workers: 51
I, [2013-04-28T02:34:19.543590 #15521] INFO -- : Process ID saved to: tmp/01E.pid
I, [2013-04-28T02:34:19.543783 #15521] INFO -- : Process ID: 15521
E, [2013-04-28T02:34:23.033263 #15521] ERROR -- : Celluloid::PoolManager crashed!
Rubinius::CompileError: Error trying to compile /usr/local/rvm/gems/rbx-head/gems/mail-2.5.3/lib/mail/parsers/rfc2822_obsolete.rb
/usr/local/rvm/rubies/rbx-head/runtime/19/compiler/compiler.rbc:13:in `compiler_error'
/usr/local/rvm/rubies/rbx-head/runtime/19/compiler/compiler.rbc:92:in `compile'
@digitalextremist
digitalextremist / all.subsequent.calls.log
Last active December 16, 2015 18:20
Aiming a browser at the websocket address ws://host/!sync?when=open is Reel::RackWorker genocide.
Reel::RackWorker crashed!
Celluloid::DeadActorError: attempted to call a dead actor
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/proxies/sync_proxy.rb:25:in `method_missing'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/legacy.rb:14:in `call (method_missing)'
/usr/local/rvm/gems/rbx-head/gems/sinatra-1.3.6/lib/sinatra/base.rb:1417:in `call'
/usr/local/rvm/gems/rbx-head/gems/sinatra-1.3.6/lib/sinatra/base.rb:1499:in `synchronize'
/usr/local/rvm/gems/rbx-head/gems/sinatra-1.3.6/lib/sinatra/base.rb:1417:in `call'
/usr/local/rvm/gems/rbx-head/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
/usr/local/rvm/gems/rbx-head/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `call'
kernel/bootstrap/array.rb:68:in `each'
@digitalextremist
digitalextremist / aftermath.log
Created May 1, 2013 15:31
rubinius log from segv aftermath
root@two:~# cat /root/.rbx/rubinius_last_error_7339
Rubinius Crash Report #rbxcrashreport
Error: signal SIGSEGV
[[Backtrace]]
ruby[0x5904a0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fdd3877acb0]
ruby(_ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x41eb)[0x5b5c5b]
ruby(_ZN8rubinius11MachineCode19execute_specializedINS_12TwoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x2a5)[0x5ef465]
@digitalextremist
digitalextremist / http_parser.failure.log
Created May 28, 2013 06:18
http_parser.rb failing under rbx-head
NoMethodError: undefined method `request_path' on an instance of HTTP::Parser.
kernel/delta/kernel.rb:81:in `request_path (method_missing)'
/mu/penultimatix/reel/lib/reel/request_parser.rb:14:in `__script__'
/mu/penultimatix/reel/lib/reel/mixins.rb:51:in `path'
/mu/penultimatix/reel/lib/reel/rack_worker.rb:135:in `env'
/mu/penultimatix/reel/lib/reel/rack_worker.rb:95:in `request_env'
/mu/penultimatix/reel/lib/reel/rack_worker.rb:74:in `handle_request'
/mu/penultimatix/reel/lib/reel/rack_worker.rb:65:in `handle'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:25:in `dispatch'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:67:in `dispatch'
@digitalextremist
digitalextremist / mula.rb
Last active December 22, 2015 11:29
Futures interface silent death repro?
class Muile
include Celluloid
def router method, *args
puts "Called Muile.#{method}"
if respond_to? "#{method}!"
puts "Calling Muile.#{method}!"
send "#{method}!", *args
else
@digitalextremist
digitalextremist / gist:9f6c9b556f0efefd0819
Created January 24, 2015 10:09
nio4r build failure @qrohlf gets on OSX 10.10
$ gem install nio4r -v '1.0.0'
ERROR: Error installing nio4r:
ERROR: Failed to build gem native extension.
/Users/qrohlf/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150120-2702-11w6zzo.rb extconf.rb
checking for rb_thread_blocking_region()... no
checking for sys/select.h... yes
checking for poll.h... yes
checking for sys/epoll.h... no
checking for sys/event.h... yes
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f425049b4c1, pid=19966, tid=139922265310976
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591
#
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f49cbaac4c1, pid=16804, tid=139954030249728
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591
#
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fa0bfbc14c1, pid=22136, tid=140327325411072
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591
#