Toxic Elephant

How I found a bug in GirFFI using Travis and Git

Posted by matijs 17/02/2013 at 20h15

I love Travis CI. I love git bisect. I used both recently to track down a bug in GirFFI.

Suddenly, builds were failing on JRuby. The problem did not occur on my own, 64 bit, machine, so it seemed hard to debug. I tried making Travis use different JVMs, but that didn’t help, apart from crashing in a different way (faster, too, which was nice).

Building a Travis box

Using the travis-boxes repository, I created a VM as used by Travis. This is currently not documented well in the READMEs, so I’m writing it down here, slightly out of order of actual events.

I cloned the following three repositories:

travis-cookbooks travis-boxes veewee-definitions

First, I created a base box in veewee-definitions, according to its README. In this case, I created a precise32 box, since that’s the box Travis uses for the builds. The final, export, stage creates a precise32.box file.

Then, I moved the precise32.box file to travis-boxes/boxes, making a base box available there. There is a Thor task to create just such a base box right there, but it doesn’t work, and seems to be deprecated anyway, since veewee is no longer supposed to be used in that repository.

So, a base box being available in travis-boxes, I used the following to create a fully functional box for testing Rubies:

bundle exec thor travis:box:build -b precise32 ruby

Oddly, this didn’t produce a box travis-ruby, but it did produce travis-development, which I could then manipulate using vagrant.

Hunting down the bug

I ssh’d into my fresh travis box using vagrant ssh. After a couple of minutes getting to know rvm (I use rbenv myself), I was able to confirm the crash on JRuby. After some initial poking around trying to pin down the problem to one particular test case and failing, I decided to use git bisect. As my check I used the test:introspection task, which reliably crashed when the problem was present.

While it’s possible to automate git bisect, I like to use it manually, since a particular test used may fail for unrelated reasons. Also, since git bisect is a really fast process, there is a pleasent lack of tedium.

Anyway, after a couple of iterations, I was able to locate the problematic commit. By checking the different bits of the commit I then found the culprit: I accidentally broke the code that creates layout definitions, in particular the one used by GValue. Going back to master, I added a simple test and fix. I will have to revisit the code later to clean it up and make it more robust.

Posted in  | Tags , , ,  | 10 comments | no trackbacks

Comments

  1. %>

    ロレックスコピー said 04/03/2013 at 06h07 later:

    品質がよい、価格が低い、実物写真!当社の商品は絶対の自信が御座います。100%品質保証 !満足保障100%!

  2. %>

    beats pro said 15/03/2013 at 02h23 later:

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how can we communicate? beats pro http://pinterest.com/drebeatstore/cheap-beats-pro-headphones/

  3. %>

    beats solo hd said 15/03/2013 at 02h23 later:

    I will immediately grasp your rss feed as I can not to find your email subscription hyperlink or e-newsletter service. Do you’ve any? Kindly let me know so that I may subscribe. Thanks. beats solo hd http://pinterest.com/drebeatstore/cheap-beats-solo-hd-headphones/

  4. %>

    beats studio said 15/03/2013 at 02h24 later:

    Hi my loved one! I wish to say that this post is awesome, nice written and include approximately all vital infos. I would like to see extra posts like this . beats studio http://pinterest.com/drebeatstore/cheap-beats-studio-headphones/

  5. %>

    christianlouboutinfo said 15/03/2013 at 17h58 later:

    Freezing really enjoy all of the man shoes online malaysia minis, that i produce individuals every day…a possible problem i’ve becomes individuals in is often a amount difficult yet definitely worth the strman shoes online malaysiale then in this little base. christian louboutin for men http://www.cheapchristianlouboutinman.com/

  6. %>

    monster beats said 18/03/2013 at 06h58 later:

    Bose® QuietComfort® 3 Acoustic noise Cancelling® Headphones : Bose offers 2 widespread models. Therefore, it’s extremely tough to bench on that one is that the good. QuietComfort three comes with receptive noise cancellation. Inactive noise cancellation implies that you’ll blockade encompassing noise by capsule your ears utilizing headphones or in-earphones that stopple into your ear artificial water-way. The additionally boast of in operation noise cancellation. a tiny microphone is hamate up with the headphone that senses out of the house noise before it will penetrate your ear. The captured mark is inverted by the noise cancellation circuitry and feeds it no body you’ll be taking note of and so cancelling most of your outside noise. you’ll additionally use the headphones though sitting at legal settlement to act upon an accurate and clear musical expertise. Customers are seriously well contented with the wares and commend it a befitting degree. They believe that almost about each penny spent on it actually is well excellence the excellence. monster beats http://www.kemet.co.uk/CheapMonsterBeats.asp

  7. %>

    buy office 2010 said 19/03/2013 at 18h23 later:

    You made some nice points there. I looked on the internet for the subject and found most guys will agree with your site. buy office 2010 http://www.key4students.co.uk/microsoft-office-2010-c-2.html

  8. %>

    office 2013 said 19/03/2013 at 18h23 later:

    My wife and i ended up being satisfied Edward could do his preliminary research because of the precious recommendations he came across out of the blog. It is now and again perplexing to simply always be making a gift of information that many some others might have been selling. We really do understand we have the website owner to appreciate because of that. These illustrations you have made, the easy site menu, the friendships you will help to promote - it’s got mostly fantastic, and it’s really aiding our son in addition to us know that the article is brilliant, and that is unbelievably serious. Many thanks for everything! office 2013 http://www.discountsoftwareau.com/office-2013-download-c-10.html

  9. %>

    microsoftoffice2010 said 19/03/2013 at 18h23 later:

    Very nice article and right to the point. I am not sure if this is in fact the best place to ask but do you guys have any thoughts on where to employ some professional writers? Thanks in advance :) microsoft office 2010 http://www.discountsoftwareau.com/office-2010-download-c-2.html

  10. %>

    office 2013 said 19/03/2013 at 18h23 later:

    Hello there, I found your website via Google whilst searching for a comparable matter, your web site got here up, it appears good. I have bookmarked it in my google bookmarks. office 2013 http://www.mstorejapan.com/

No trackbacks

Comments are disabled

Toxic Elephant is Matijs van Zuijlen's weblog.

Powered

Categories