EM segfaults on exit in multi threaded environment

./lib/em/lib/eventmachine.rb:235: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i486-linux]

or

Illegal instruction

for me meant “it seems that EM does call backs during its process loop.  During these callbacks the EM thread itself can spontaneously “jump” to do its release_machine [for example, if there's an uncaught exception, or if the root thread terminates, of if you call Thread.raise on it].  This means that during its release_machine, its Descriptor array is in a half-terminated state.

To overcome it: go to em.cpp and change the logic to just substitute in the end one when it fails.

rails [active record] optimization links

http://dev.rubyonrails.org/ticket/2172

appears to be one.
http://dev.rubyonrails.org/ticket/10978 was already committed.

So…we need to find the bottleneck, and fix that bottleneck. Fix it. As in fix it.

todo: override :find and :find_by_sql and also output ‘this long creating AR stuffs!’ per request lol.

Investigate 11000 hash calls.

Use it with mfp, not the big one! no!!!!!

trivial erb takes .0002[1]

[1]http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/

ruby install woe

So…you bust open a new copy of Hardy Heron [ubuntu] and apt-get install ruby, then install an extension and it dies?

Example:

/usr/bin/ld: crt1.o: No such file: No such file or directory

or

checking for main() in -lpthread… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

when compiling a gem from source?

Well this means that you need to install some c headers:

apt-get install libc6-dev

and it should work

happened to me with eventmachine.

virtualbox woe

so…you’re on mac os x and you install ubuntu on your virtualbox and then…networking doesn’t work at all?  Like at all?  No IP Address?

1) go to devices | network adapters and make sure device 0 is checked

run wget google.com

should work

if not

run

sudo dhclient #might help — restarts your dhcp

bamboo on os x woe

Exception in thread “main” java.lang.UnsatisfiedLinkError: /Users/rogerpack/dev/bamboo/lib/darwin/libdb_java-4.2.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at com.sleepycat.db.db_javaJNI.(db_javaJNI.java:36)
at com.sleepycat.db.DbEnv.(DbEnv.java:1081)
at bamboo.db.StorageManager.init(StorageManager.java:737)
at bamboo.lss.DustDevil.init_nodes(DustDevil.java:138)
at bamboo.lss.DustDevil.main(DustDevil.java:281)
at bamboo.lss.DustDevil.main(DustDevil.java:184)
at bamboo.lss.DustDevil.main(DustDevil.java:338)

this meant “follow this post to a t:
http://bamboo-dht.org/pipermail/bamboo-users/2006-July/000787.html”
but at the end copy
cd .libs; cp libdb_java-4.2.* ../../../bamboo/lib/darwin/
and works!