One Week In!

What a week.

I started with Mozilla on Monday. One day I will have to tell the story of how the job came to be (or, ask me over 🍻), but it did. I'm super excited.

I've joined the JavaScript engine team, and am learning all about SpiderMonkey, Baseline, IonMonkey, CacheIR, and more. The first week was a fire hose of information. There's a ton of new things to learn, but so far so good.

I spent my first week in Toronto, in the Mozilla office, which was a great experience. If anyone from the Toronto Mozilla office ends up reading this, thanks so much for being very kind to me. I really appreciated it.

IBM's JIT Talk, RubyKaigi 2015

After I gave my talk at RubyKaigi, people told me that it went well. While I believed them, I really wanted to see how it went for myself. Fortunately, the talks were recorded, and have since been posted to Youtube. I'm reasonably happy with my performance! 

My talk's video has actually been available on YouTube for a little while now, but I held off posting it until our Technology Preview was  back in action, which happened last week. 

The slides are re-embedded below: 

Fixing Tradebeans and Tradesoap on 64 bit JVMs

Edit: March 10, 2014: It seems this may not be the panacea I thought it is. Will update if I can figure out more on what's going on, but be aware for now: YMMV.

Imagine you're trying to run the tradebeans or tradesoap benchmarks from the Dacapo Benchmark suite with a 64 bit JVM.

If you, like me, just downloaded the dacapo-9.12-bach.jar you'll likely see a huge stack trace failure like the below:

java -jar dacapo-9.12-bach.jar tradesoap -t 1 
Using scaled threading model. 8 processors detected, 1 threads used to drive the workload, in a possible range of [1,128]
11:08:54,419 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.apache.geronimo.framework/j2ee-system/2.1.4/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.4/car,j2eeType=AttributeStore,name=AttributeManager"
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -2
    at com.sun.xml.bind.v2.util.CollisionCheckStack.findDuplicate(
    at com.sun.xml.bind.v2.util.CollisionCheckStack.push(
    at com.sun.xml.bind.v2.runtime.XMLSerializer.pushObject(
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(
org.apache.geronimo.gbean.InvalidConfigurationException: Configuration org.apache.geronimo.framework/j2ee-system/2.1.4/car failed to start due to the following reasons:
  The service ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.4/car,j2eeType=AttributeStore,name=AttributeManager did not start because Array index out of range: -1
  The service ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.4/car,j2eeType=ConfigurationManager,name=ConfigurationManager did not start because org.apache.geronimo.framework/j2ee-system/2.1.4/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.4/car,j2eeType=AttributeStore,name=AttributeManager did not start.

    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(

This bug report is the hint you need.

Essentially the report points out that jaxb fails on 64 bit systems because it indexes an array using a hash code which can be negative.

Following that report, you can get Tradebeans and Tradesoap working by replacing the jaxb jars inside the dacapo jar.

Because the aforementioned bug report specificaly points out that they resolved the problem with 2.1.13, I also used JAXB 2.1.13.

After you unzip the dacapo jar, you'll need to unzip dat/ as well. Inside of that, the files you'll replace are geronimo-jetty6-minimal-2.1.4/repository/com/sun/xml/bind/jaxb-impl/2.0.5/jaxb-impl-2.0.5.jar, with the obtained jaxb-ri-20100511/lib/jaxb-impl.jar and ./repository/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar with jaxb-ri-20100511/lib/jaxb-api.jar (keeping the same names)

Seems to work now!