I'm getting this error on a pretty regular basis: ThreadError: deadlock; recursive locking. I read that if using Unicorn (which I am) that Rack::Lock is not needed. I can remove it by adding config.middleware.delete "Rack::Lock" to application.rb.
Does anyone have opinions on if it is safe to remove Rack::Lock from my production app?
For reference, the common trace:
…dor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:14:in `lock'
…dor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:14:in `call'
…bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/deflater.rb:13:in `call'
…/bundle/ruby/2.0.0/gems/rack-ssl-1.3.3/lib/rack/ssl.rb:27:in `call'
…by/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
…by/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
…by/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
…by/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
…by/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
…by/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552:in `process_client'
…icorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:51:in `process_client'
…icorn-worker-killer-0.4.2/lib/unicorn/worker_killer.rb:124:in `process_client'
…by/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632:in `worker_loop'
…by/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500:in `spawn_missing_workers'
…by/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142:in `start'
Ok, I removed config.middleware.delete "Rack::Lock" about a week ago and all seems to be working ok. The error is gone and removing Rack::Lock has caused no issues.
Related
I have a self hosted gitlab CE server ,running fine for a year now.
Just a few days ago this error keep poping up
Please help me fix this. I don’t know why the gitaly socket just keep delete and create every time
Gitlab Version: 12.0.12 (ce125b970e4)
OS: Centos 7 3.10.0-1160.11.1.el7.x86_64
Gitlab::Git::CommandError (14:all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial unix /tmp/gitaly-ruby289404666/socket.1: connect: no such file or directory"):
lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
lib/gitlab/git/blob.rb:83:in `batch_lfs_pointers'
lib/extracts_path.rb:149:in `lfs_blob_ids'
app/controllers/projects/application_controller.rb:98:in `block in allow_gitaly_ref_name_caching'
lib/gitlab/gitaly_client.rb:309:in `allow_ref_name_caching'
app/controllers/projects/application_controller.rb:97:in `allow_gitaly_ref_name_caching'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:445:in `set_session_storage'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:439:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/correlation_id.rb:16:in `block in call'
lib/gitlab/middleware/correlation_id.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:26:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'
After an unsuccessful upgrade, some of the repositories broke, when trying to delete the repository as standard way, it shows Error 500 ("500 Whoops, something went wrong on our end.
Try refreshing the page, or going back and attempting the action again. Please contact your GitLab administrator if this problem persists. Go back"). How I can delete the repository on the ubuntu server?
In production.log I found such entries about my attempt to delete the repository:
Started DELETE "/student100675/anagrams" for 217.MY.IP.HERE at 2021-11-09 11:30:30 +0200
Processing by ProjectsController#destroy as HTML
Parameters: {"authenticity_token"=>"[FILTERED]", "namespace_id"=>"student100675", "id"=>"anagrams"}
Completed 500 Internal Server Error in 60ms (ActiveRecord: 3.5ms | Elasticsearch: 0.0ms | Allocations: 9529)
OpenSSL::Cipher::CipherError ():
lib/gitlab/crypto_helper.rb:28:in aes256_gcm_decrypt' app/models/concerns/token_authenticatable_strategies/encryption_helper.rb:18:in decrypt_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in get_token' app/models/concerns/token_authenticatable_strategies/base.rb:32:in ensure_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:32:in ensure_token' app/models/concerns/token_authenticatable.rb:43:in block in add_authentication_token_field'
app/services/projects/destroy_service.rb:10:in async_execute' app/controllers/projects_controller.rb:162:in destroy'
app/controllers/application_controller.rb:485:in set_current_admin' lib/gitlab/session.rb:11:in with_session'
app/controllers/application_controller.rb:476:in set_session_storage' lib/gitlab/i18n.rb:105:in with_locale'
lib/gitlab/i18n.rb:111:in with_user_locale' app/controllers/application_controller.rb:470:in set_locale'
app/controllers/application_controller.rb:464:in set_current_context' lib/gitlab/middleware/speedscope.rb:13:in call'
lib/gitlab/request_profiler/middleware.rb:17:in call' lib/gitlab/jira/middleware.rb:19:in call'
lib/gitlab/middleware/go.rb:20:in call' lib/gitlab/etag_caching/middleware.rb:21:in call'
lib/gitlab/middleware/multipart.rb:172:in call' lib/gitlab/middleware/read_only/controller.rb:50:in call'
lib/gitlab/middleware/read_only.rb:18:in call' lib/gitlab/middleware/same_site_cookies.rb:27:in call'
lib/gitlab/middleware/handle_malformed_strings.rb:21:in call' lib/gitlab/middleware/basic_health_check.rb:25:in call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in call' lib/gitlab/middleware/request_context.rb:21:in call'
config/initializers/fix_local_cache_middleware.rb:11:in call' lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in call'
lib/gitlab/middleware/sidekiq_web_static.rb:20:in call' lib/gitlab/metrics/requests_rack_middleware.rb:74:in call'
lib/gitlab/middleware/release_env.rb:12:in `call'
I'm my case was fixed after restoring the /etc/gitlab/gitlab-secrets.json
More refs:
https://forum.gitlab.com/t/after-updating-from-version-gitlab-11-8-10-breaks-runners-ci/30037
It was the problem with hashed and legacy repositories, I solved it with this tip:
gitlab-rails console
projects = Project.where(repository_read_only: true)
projects.each do |p|
p.update!(repository_read_only:nil)
end
gitlab-rake gitlab:storage:migrate_to_hashed
gitlab-ctl reconfigure
I tried all two versions of what’s written here and they didn’t help me
The only thing that helped me is a complete reinstallation of gitlab
before deleting everything I copied all the repositories to my local disk and all users
after installation created new repositories and push an existing Git repository
Another way if you have a "read-only" legacy repositories:
Reset runner registration tokens
https://docs.gitlab.com/ee/raketasks/backup_restore.html#when-the-secrets-file-is-lost
sudo gitlab-rails console
Project.all.find_each { |project| project.update!(repository_read_only: false) }
In your blog post: http://pakyow.com/blog/2015/03/24/ui-intro
I was following along and received an error when configuring the default route for the view partial :form with an empty binding set.
view.partial(:form).scope[:message].bind({})
When refreshing the browser, it gave me an error below.
Not sure how to resolve this or what dependencies I need to check.
Server Error:
The error originated on line 104 of 'C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-presenter-0.9.1/pakyow-presenter/lib/presenter/view.rb' and generated the following stack trace:
wrong number of arguments (0 for 1)
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-presenter-0.9.1/pakyow-presenter/lib/presenter/view.rb:104:in `scope'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-presenter-0.9.1/pakyow-presenter/lib/presenter/view_context.rb:44:in `method_missing'
C:/Users/Anna/Documents/wallyou/app/lib/routes.rb:7:in `block (2 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `instance_exec'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `block in call_fns'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `call_fns'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:140:in `block in trampoline'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:139:in `catch'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:139:in `trampoline'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:46:in `perform'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:245:in `block in process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:242:in `catch'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:242:in `process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:223:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/reloader.rb:10:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/logger.rb:118:in `block in call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/logger.rb:129:in `time'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/logger.rb:116:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/static.rb:20:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.6.1/lib/rack/methodoverride.rb:22:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:153:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/server.rb:507:in `handle_request'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/server.rb:375:in `process_client'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/server.rb:262:in `block in run'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/thread_pool.rb:104:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/thread_pool.rb:104:in `block in spawn_thread'
scope should be a function call, like this:
view.partial(:form).scope(:message).bind({})
The way you have it, message is wrapped in square brackets.
In rubymine 4.5.3, I try to run a scenario:
Scenario: I want to buy icecream, then watch a movie
Given I am at a mall
When I buy icecream
Then I should be allowed to watch a movie
The scenario contains a comma, so when I right-click and hit play, the Element Name Filter looks like this:
I want to buy icecream\, then watch a movie
But then I get this stack trace:
too short escape sequence (ArgumentError)
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/options.rb:194:in `block (2 levels) in parse!'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1360:in `call'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1360:in `block in parse_in_order'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1347:in `catch'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1347:in `parse_in_order'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1341:in `order!'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1432:in `permute!'
C:/ruby193/lib/ruby/1.9.1/optparse.rb:1453:in `parse!'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/options.rb:119:in `parse!'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/configuration.rb:25:in `parse!'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:55:in `configuration'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:63:in `run_drb_client'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:34:in `execute!'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/lib/cucumber/cli/main.rb:20:in `execute'
C:/ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.2.1/bin/cucumber:14:in `<top (required)>'
C:/ruby193/bin/cucumber:23:in `load'
C:/ruby193/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
To fix the issue I change the Element Name Filter, and remove the backslash:
I want to buy icecream, then watch a movie
Now the scenario runs correctly.
Am I doing something wrong?
EDIT: Just confirmed that the same issue occurs with double-quotes
EDIT: Confirmed the issue still exists in RubyMine 4.5.4
I am getting this error message while running my watir-webdriver tests on Firefox 6 for the first time on Windows XP.
1) Error:
testAttributeGadget010_workflow_shown(AttributeGadgetTest):
Errno::EADDRINUSE: Only one usage of each socket address (protocol/network address/port) is normally permitted. - connect(2)
C:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `initialize'
C:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `open'
C:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `connect'
C:/Ruby187/lib/ruby/1.8/timeout.rb:53:in `timeout'
C:/Ruby187/lib/ruby/1.8/timeout.rb:101:in `timeout'
C:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `connect'
C:/Ruby187/lib/ruby/1.8/net/http.rb:553:in `do_start'
C:/Ruby187/lib/ruby/1.8/net/http.rb:542:in `start'
C:/Ruby187/lib/ruby/1.8/net/http.rb:1035:in `request'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/remote/http/default.rb:73:in `response_for'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/remote/http/default.rb:41:in `request'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/remote/http/common.rb:34:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/remote/bridge.rb:410:in `raw_execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/remote/bridge.rb:388:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/remote/bridge.rb:356:in `find_element_by'
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.4.0/lib/selenium/webdriver/common/search_context.rb:41:in `find_element'
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.2/lib/watir-webdriver/locators/element_locator.rb:86:in `find_first_by_multiple'
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.2/lib/watir-webdriver/locators/element_locator.rb:33:in `locate'
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.2/lib/watir-webdriver/elements/element.rb:263:in `locate'
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.2/lib/watir-webdriver/elements/element.rb:245:in `assert_exists'
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.2/lib/watir-webdriver/elements/checkbox.rb:19:in `set'
./library/attribOptions.rb:22:in `attribOptions'
./library/attribOptions.rb:20:in `each_index'
./library/attribOptions.rb:20:in `attribOptions'
./007_wb_attribute.rb:365:in `testAttributeGadget010_workflow_shown'
./007_wb_attribute.rb:345:in `each'
./007_wb_attribute.rb:345:in `testAttributeGadget010_workflow_shown'
Seems to have happen 20 times out of my 100+ Test/Unit test cases.
Has anyone any idea what is going wrong?
Almost sounds like you're running out of ephemeral ports, which shouldn't really happen with just one Firefox instance. But who knows with Windows. Try increasing the MaxUserPort setting as described here.