Passenger 5.0.25 appears to Deadlock with threads using lib classes

6 views
Skip to first unread message

Jake LaCombe

unread,
Jul 4, 2017, 11:21:10 AM7/4/17
to Phusion Passenger Discussions
I have the following code in my rails application.

def fetch_data
  data = []
  threads = []

  threads << Thread.new do
    ::KcmoDatasets::Fake.new
  end

  threads.map(&:join)

  return data
end

module KcmoDatasets
  class Fake
    def initialize
    end
  end
end


The fake class is located in lib/kcmo_datasets/fake.rb, and the fetch_data method is inside a service object of app/services/data_fetcher.rb.

When I run the join command, the application appears to just hang. Anyone else have this issue?

Daniel Knoppel

unread,
Jul 6, 2017, 5:25:14 AM7/6/17
to Phusion Passenger Discussions
I don't really think this sort of thing is related to Passenger, but it might be able to help you see what exactly is hanging with the backtrace feature: get the PID of the hanging process and send it a SIGQUIT signal. Passenger will then dump a backtrace to its logs.

- Daniel
Reply all
Reply to author
Forward
0 new messages