checksum_cache.rb crash on cookbook upload


#1

Trying with a new list and a better subject line

Here’s what I’m seeing:

[chef@chef-app01 chef-repo]$ knife cookbook upload syslog_and_roll
Uploading syslog_and_roll [0.0.1]
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/checksum_cache.rb:174:
[BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Aborted (core dumped)
[chef@chef-app01 chef-repo] knife cookbook upload syslog_and_roll Uploading syslog_and_roll [0.0.1] upload complete [chef@chef-app01 chef-repo]

Happens about 15% of the time.

The search history I’ve seen on this issue seems to indicate that
updating to a newer ruby, like patchlevel 352, will help and/or
resolve it. But I’m already there.

Any ideas? Things I can do? Ways I can run the command to get better
logging of the failures?

Thanks all,
-Jesse


#2

Relevant line in the code https://github.com/opscode/chef/blob/0.10.6/chef/lib/chef/checksum_cache.rb#L174

That io.read(n) loop should return <= n bytes at the EOF, then return nil. Definitely shouldn’t blow up. I’m betting it’s a off-by-one line number, and that something strange is happening in Digest::MD5#update.

Does your cookbook happen to include binary files? Any other common factors when this happens?

On 2012-04-25, at 20:35, Jesse Campbell wrote:

Trying with a new list and a better subject line

Here’s what I’m seeing:

[chef@chef-app01 chef-repo]$ knife cookbook upload syslog_and_roll
Uploading syslog_and_roll [0.0.1]
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/checksum_cache.rb:174:
[BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Aborted (core dumped)
[chef@chef-app01 chef-repo] knife cookbook upload syslog_and_roll Uploading syslog_and_roll [0.0.1] upload complete [chef@chef-app01 chef-repo]

Happens about 15% of the time.

The search history I’ve seen on this issue seems to indicate that
updating to a newer ruby, like patchlevel 352, will help and/or
resolve it. But I’m already there.

Any ideas? Things I can do? Ways I can run the command to get better
logging of the failures?

Thanks all,
-Jesse


#3

No binary files… I haven’t been pushing updates this week, so I
haven’t been able to start tracking it down any more. If I knew where
the core dump was, i’m thinking maybe it has some sort of stack trace
into what the io.read was doing when it threw up.

On Wed, Apr 25, 2012 at 17:19, Joseph Holsten joseph@josephholsten.com wrote:

Does your cookbook happen to include binary files? Any other common factors when this happens?