Philip Hutchins

Head in the cloud...

Tracking Down the Chef-Server Missing Dependency Bug

Bug Description

Currently there is a fairly agrivating bug in the free version of Opscode’s (now called Chef to make it even easier to find on google) chef-server. This bug is exposed when a dependency of one of your cookbooks depends on a cookbook who’s dependency is not met.


  • Chef-server starts consuming 100% CPU
  • Chef-server becomes unresponsive for periods of time or until erchef is restarted

What is causing this bug?

The way that I understand it is that the depsolver that existed in older versions of chef-server was removed and it was the piece that was keeping us from hanging upon unresolved dependencies.

Needs Clarification

  • Is the bug triggered for missign dependencies at any depth into the dependency chain, or only second level and below?
  • Is the bug triggered when the dependency cookbook exists on the server but the version constraing is not met, or only when the cookbook does not exist on the chef-server at all?

How to Track Down Missing Dependency

knife exec -E 'puts"/environments/_default/cookbook_versions", "run_list" => ["base", "chefdm-ssl"])'

What is the fix and when will it be pushed to a stable release?

The fix is to add the depsolver that was used in the old chef-server back with some tweaks and testing. This has been committed to master but has not been added to a stable release yet. As of the writing of this article, the fix has yet to be released. It will not be released in any of the 11.0.X releases but is planned to be added in 11.1.0. Huge thanks to Ho-Sheng for shedding some light on this topic!


You can build chef-server from the repo that contains the fix from here.

There is some more documentation on building nightlies here.


The main bug report and discussion thread are here.

The main piece of code is located here.

This is where it gets pulled into the erchef binary.