Ruby Rails/Nokogiri引起的随机分段故障(不完全响应)

Ruby Rails/Nokogiri引起的随机分段故障(不完全响应),ruby,ruby-on-rails-4,segmentation-fault,nokogiri,Ruby,Ruby On Rails 4,Segmentation Fault,Nokogiri,我最近将我的Rails应用程序从Rails3更新为Rails4,并将Ruby从1.9更新为2.3。(我后来尝试了2.2和2.1,结果相同) 我正在使用乘客和NGINX。应用程序在大多数情况下运行正常,但每10个左右的请求就会随机将此消息返回到浏览器: Incomplete response received from application NGINX日志显示了以下内容: [Client 2-623] Sending 502 response: application did not send

我最近将我的Rails应用程序从Rails3更新为Rails4,并将Ruby从1.9更新为2.3。(我后来尝试了2.2和2.1,结果相同)

我正在使用乘客和NGINX。应用程序在大多数情况下运行正常,但每10个左右的请求就会随机将此消息返回到浏览器:

Incomplete response received from application
NGINX日志显示了以下内容:

[Client 2-623] Sending 502 response: application did not send a complete response
28741/7f94e2312700 age/Cor/CoreMain.cpp:819 ]: Checking whether to disconnect long-running connections for process 2521, application /home/admin/apps/<myapp>/current/public
App 2059 stderr: request_handler/thread_handler.rb:226 ]: *** Passenger RequestHandler warning: someone tried to connect with an invalid connect password.
stderr: /home/admin/apps/<myapp>/shared/bundle/ruby/2.2.0/gems/builder-3.2.2/lib/builder/xchar.rb:146:
stderr: [BUG]
stderr: Segmentation fault at 0x00000000000000

我的直觉是,你已经做了适当的审查,将其写入错误报告。零错误,好吧,那是我的错。Seg故障?这损害了Ruby的安全性,应该是一个bug。如果在升级Ruby时,将gem绑定到其库的驱动程序没有更新,则可能会出现分段错误
gem pristine--all
可以重建所有gem并修复问题。乘客可能会很挑剔,因此重建它并让它重新安装NGINX可以解决该层的问题。gem pristite——所有这些都不能解决问题。到目前为止,我已经在两台不同的服务器上重新编译了ruby、nginx、passenger和nokogiri的所有可能组合,一台完全从头开始,结果相同。请提交一份错误报告。
RuntimeError: rehash occurred during iteration
<my controller>#index
[GEM_ROOT]/gems/nokogiri-1.6.0/lib/nokogiri/xml/document.rb, line 210

NoMethodError: undefined method `empty?' for false:FalseClass
<my controller>#index
[GEM_ROOT]/gems/haml-4.0.7/lib/haml/compiler.rb, line 193