From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 9F9F21FF9C for ; Mon, 26 Oct 2020 23:31:52 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 912AE120A26; Tue, 27 Oct 2020 08:31:09 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 692FC120A21 for ; Tue, 27 Oct 2020 08:31:07 +0900 (JST) Received: by filterdrecv-p3mdw1-7975856966-cd9wt with SMTP id filterdrecv-p3mdw1-7975856966-cd9wt-20-5F975C60-2D 2020-10-26 23:31:44.450831543 +0000 UTC m=+451674.209036945 Received: from herokuapp.com (unknown) by ismtpd0134p1mdw1.sendgrid.net (SG) with ESMTP id r8OkQufrTxWRSv0G1w3rMA for ; Mon, 26 Oct 2020 23:31:44.318 +0000 (UTC) Date: Mon, 26 Oct 2020 23:31:44 +0000 (UTC) From: elkenny@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 76464 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17220 X-Redmine-Issue-Author: yahonda X-Redmine-Sender: eugeneius X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?Hy0PIUOGpjnR9pJ=2FjGssYQQFIMs2KDQwLEl+8COOs9xWLrN9RrHtsMsm6W1O4a?= =?us-ascii?Q?OyPbew4WWJH=2FwhJyThMr5yq5Bz3T=2FZyuwfKlbE0?= =?us-ascii?Q?sJ7NOXi8bZTB+un6exYQmQ0V6S13XLMVrCS5=2FGg?= =?us-ascii?Q?A0jBf0ifhtr=2F+SyJMN5dqQciyvL+P53XcyyfwOG?= =?us-ascii?Q?ixWtFF7BgKWoNhCZ9D6R1s=2F2bE0snZbmlrlmrdA?= =?us-ascii?Q?x26tcD1PwnugIfdzU=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 100592 Subject: [ruby-core:100592] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17220 has been updated by eugeneius (Eugene Kenny). I checked the glibc source, and it intentionally keeps the thread alive: ```c /* If the runlist is empty, then we sleep for a while, waiting for something to arrive in it. */ if (runp == NULL && optim.gai_idle_time >= 0) ``` ```c int gai_idle_time; /* Number of seconds before idle thread terminates. */ ``` `gai_idle_time` is hardcoded to 1 second, there's no way to configure it. When using glibc in a C program, you can call `getaddrinfo` instead of `getaddrinfo_a` if you know the program will fork soon. Ruby programs don't have that option, since `getaddrinfo` is no longer exposed when `getaddrinfo_a` is available. I still think this is a bug, although I'm not sure how to solve it without avoiding `getaddrinfo_a` and managing the thread directly. ---------------------------------------- Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed https://bugs.ruby-lang.org/issues/17220#change-88223 * Author: yahonda (Yasuo Honda) * Status: Third Party's Issue * Priority: Normal * ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- One of the Rails CI, Active Job integration test with sidekiq, against Ruby 3.0.0 has been failing since August 30, 2020. According to `git bisect` is is triggered by 2038cc6cab6ceeffef3ec3a765c70ae684f829ed . Somehow this issue only reproduces with Ruby on Docker like `rubylang/ruby:master-nightly-bionic` It does not reproduce if Ruby is installed locally using `rbenv install 3.0.0-dev` on Ubuntu 20.04 and macOS 11 beta. ### The first failed build job https://buildkite.com/rails/rails/builds/71321#84b29655-b3df-4b5c-8b20-cbf15ecd9653 ``` ruby Ruby 2.8.0p-1 (2020-08-29 revision d7492a0be885ea9f2b9f71e3e95582f9a859c439) [x86_64-linux] ``` ### The last successful build job https://buildkite.com/rails/rails/builds/71143#369217f7-95f6-4ab9-8ef5-7c6364bd803e ```ruby Ruby 2.8.0p-1 (2020-08-20 revision a74df67244199d1fd1f7a20b49dd5a096d2a13a2) [x86_64-linux] ``` ### `git bisect` result Performed `git bisect` ruby/ruby repository and it says `2038cc6cab6ceeffef3ec3a765c70ae684f829ed` triggers this build failure. ## Steps to reproduce 1. Install Docker 2. Install Ruby 2.7.1 (or whatever Ruby version to run rake) 3. Create Ruby docker image for 2038cc6cab6ceeffef3ec3a765c70ae684f829ed ``` git clone https://github.com/ruby/ruby-docker-images.git cd ruby-docker-images rake docker:build ruby_version=master:2038cc6cab6ceeffef3ec3a765c70ae684f829ed ``` 4. Run Rails CI using the Docker image created in step 3 ``` cd ~ git clone https://github.com/rails/rails.git cd rails git clone https://github.com/rails/buildkite-config .buildkite/ RUBY_IMAGE=rubylang/ruby:master-2038cc6cab6ceeffef3ec3a765c70ae684f829ed-bionic docker-compose -f .buildkite/docker-compose.yml build base && CI=1 docker-compose -f .buildkite/docker-compose.yml run default runner activejob 'AJ_ADAPTER=sidekiq AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb --seed 5170' ``` ## Actual result ``` Using sidekiq Run options: --seed 5170 # Running: .SSSF Failure: QueuingTest#test_should_run_job_enqueued_in_the_future_at_the_specified_time [/rails/activejob/test/integration/queuing_test.rb:76]: Expected false to be truthy. bin/test test/integration/queuing_test.rb:71 .F Failure: QueuingTest#test_should_run_jobs_enqueued_on_a_listening_queue [/rails/activejob/test/integration/queuing_test.rb:14]: Expected false to be truthy. bin/test test/integration/queuing_test.rb:11 .SS..F Failure: QueuingTest#test_current_locale_is_kept_while_running_perform_later [/rails/activejob/test/integration/queuing_test.rb:102]: Expected false to be truthy. bin/test test/integration/queuing_test.rb:93 F Failure: QueuingTest#test_current_timezone_is_kept_while_running_perform_later [/rails/activejob/test/integration/queuing_test.rb:119]: Expected false to be truthy. bin/test test/integration/queuing_test.rb:110 .. Finished in 34.153644s, 0.4392 runs/s, 0.3514 assertions/s. 15 runs, 12 assertions, 4 failures, 0 errors, 5 skips You have skipped tests. Run with --verbose for details. ``` ## Expected result It should success as the Ruby as of the previous commit `1035a3b202ee86bf2b0a1d00eefcfff0d7ab9f6b` does. ``` $ RUBY_IMAGE=rubylang/ruby:master-1035a3b202ee86bf2b0a1d00eefcfff0d7ab9f6b-bionic docker-compose -f .buildkite/docker-compose.yml build base && CI=1 docker-compose -f .buildkite/docker-compose.yml run default runner activejob 'AJ_ADAPTER=sidekiq AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb --seed 5170' ``` ``` +++ +++ activejob: AJ_ADAPTER=sidekiq AJ_INTEGRATION_TESTS=true bin/test test/integration/queuing_test.rb --seed 5170 Using sidekiq Run options: --seed 5170 # Running: .SSS....SS..... Finished in 13.647623s, 1.0991 runs/s, 1.0258 assertions/s. 15 runs, 14 assertions, 0 failures, 0 errors, 5 skips You have skipped tests. Run with --verbose for details. ``` -- https://bugs.ruby-lang.org/