Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Fix Ruby Malloc Error on macOS Sierra

After upgrading my iMac to Macos Sierra I have experienced a few issues that I thought I’d document here, both for myself and to help others.

Problem

The latest issue I found when trying to run a rails console command for a client application. The result was a hung terminal session and this message:

ruby(50426,0x7fff96cd43c0) malloc: *** malloc_zone_unregister() failed for 0x7fff96cca000

I’ve never seen this one before and with the terminal session hung, I had no real way to debug. Thanks to Stackoverflow, the solution was pretty simple.

Solution

What I found pointed to the Skylight Gem version (0.8.1) I was using. Changing the version 0.10.6, bundling and running the console again fixed the issue.

I wondered about the root cause the issue though and did a bit of research to see if I could figure out why this one gem caused such a failure. Knowing what I know about the Skylight gem and being developed at least partially using Rust, I started there.  Looking at the Skylight gem source, there is indeed references to using Rust.

A bit of spelunking Rust issues revealed there were some issues with earlier macOS Sierra betas. I was using 0.8.1 of the Skylight gem, built before Rust was fixed. One in particular looked very suspect.

Everything is working great now. I hope this helps someone with this really odd error.

The post Fix Ruby Malloc Error on macOS Sierra appeared first on Accidental Technologist.



This post first appeared on Accidental Technologist - Musings About Entreprene, please read the originial post: here

Share the post

Fix Ruby Malloc Error on macOS Sierra

×

Subscribe to Accidental Technologist - Musings About Entreprene

Get updates delivered right to your inbox!

Thank you for your subscription

×