Chef-client segfaults on FreeBSD


#1

hi,

i’m investigating chef-client segfault on FreeBSD. it’s hard to reproduce
the issue but it happens often, saying “[BUG] Bus Error”. it usually happens
somewhere in lib/chef/mixin/command/unix.rb.

ruby -v: ruby 1.8.7 (2011-06-30 patchlevel 352) [amd64-freebsd8]
uname -smr: FreeBSD 8.2-RELEASE-p1 amd64

so i built ruby with WITH_DEBUG=y, CFLAGS=-O0 and no strip. after 24 hours,
no crash.

if you have similar issue, try disabling optimization. add the following to
/etc/make.conf and rebuild the port.

.if ${.CURDIR:M*/lang/ruby18}
CFLAGS= -O -pipe
.endif


Tomoyuki Sakurai


#2

On Tue, Jan 31, 2012 at 5:28 AM, Tomoyuki Sakurai <
tomoyukis@reallyenglish.com> wrote:

hi,

i’m investigating chef-client segfault on FreeBSD. it’s hard to reproduce
the issue but it happens often, saying “[BUG] Bus Error”. it usually
happens
somewhere in lib/chef/mixin/command/unix.rb.

Yeah, that sucks. I never really spent the time to figure out the root
cause.

Another fix if you can upgrade your system ruby, is to move to ruby 1.9.2
or 1.9.3 (1.8 is EOL anyway).
We have been running almost [*] all of our FreeBSD hosts on 1.9.3 and so
far it’s been smooth sailing.
Anecdotally, convergence speed on 1.9.3 is measurably higher, although not
dramatically so.

[*] the only exception are legacy servers running legacy Rails 2.3 apps.

Andrea