ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
@ 2020-10-07 13:26 yasuo.honda
  2020-10-15 23:57 ` [ruby-core:100410] " elkenny
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: yasuo.honda @ 2020-10-07 13:26 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been reported by yahonda (Yasuo Honda).

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220

* Author: yahonda (Yasuo Honda)
* Status: Open
* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:100410] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
@ 2020-10-15 23:57 ` elkenny
  2020-10-16 10:49 ` [ruby-core:100419] " nobu
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: elkenny @ 2020-10-15 23:57 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by eugeneius (Eugene Kenny).


Here's a small script that reproduces the problem:

```ruby
require "socket"

Socket.getaddrinfo("localhost", nil)

pid = fork do
  Socket.getaddrinfo("localhost", nil)
end

Process.wait pid
```

In Rails' test suite, the `fork` happens [[here]](https://github.com/rails/rails/blob/64b1c815323c17d3259e823c53d6a547152e61e3/activejob/test/support/integration/adapters/sidekiq.rb#L27), and the calls to `getaddrinfo` happen in [[redis-rb]](https://github.com/redis/redis-rb/blob/087a11b585978cd3970d22d066b7d8ccd89a40f6/lib/redis/connection/ruby.rb#L193).

It seems like a lock from the first `getaddrinfo` is still in place in the forked process; adding `sleep 1` before forking prevents the hang.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88025

* Author: yahonda (Yasuo Honda)
* Status: Open
* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:100419] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
  2020-10-15 23:57 ` [ruby-core:100410] " elkenny
@ 2020-10-16 10:49 ` nobu
  2020-10-26 23:31 ` [ruby-core:100592] " elkenny
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: nobu @ 2020-10-16 10:49 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Third Party's Issue

`getaddrinfo_a` seems to create a thread, and it will be lost by `fork`.
I'm not sure if this is a glibc's spec or bug.

This code demonstrates the behavior without Ruby.

```C
#define _GNU_SOURCE
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>

int
test_gai(const char *where, const char *name)
{
    printf("in %s: ", where);
    fflush(stdout);
    struct gaicb req = {.ar_name = name};
    struct gaicb *reqs[1] = {&req};
    int ret = getaddrinfo_a(GAI_NOWAIT, reqs, 1, NULL);
    if (ret) goto error;
    ret = gai_suspend((const struct gaicb **)reqs, 1, NULL);
    if (ret) goto error;
    ret = gai_error(reqs[0]);
    if (ret) goto error;
    struct addrinfo *ai = reqs[0]->ar_result;
    if (ai) {
        printf("%s\n", ai->ai_canonname ? ai->ai_canonname : "noname");
    }
    return 0;
  error:
    fprintf(stderr, "failed: %s\n", gai_strerror(ret));
    return ret;
}

int
main(int argc, char **argv)
{
    test_gai("parent", "localhost");
    if (argc > 1) {
        printf("sleeping...");
        fflush(stdout);
        usleep((useconds_t)(atof(argv[1])*1e6));
        printf("\n");
    }
    pid_t pid = fork();
    if (pid == 0) {
        test_gai("child", "localhost");
        return 0;
    }
    int status;
    waitpid(pid, &status, 0);
    return status;
}
```

```sh
$ gcc -o gaitest gaitest.c -lanl

$ ./gaitest 1
in parent: noname
sleeping...
in child: noname

$ ./gaitest 0.9
in parent: noname
sleeping...
in child: ^C
```

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88034

* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:100592] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
  2020-10-15 23:57 ` [ruby-core:100410] " elkenny
  2020-10-16 10:49 ` [ruby-core:100419] " nobu
@ 2020-10-26 23:31 ` elkenny
  2020-10-27  7:28 ` [ruby-core:100596] " nobu
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: elkenny @ 2020-10-26 23:31 UTC (permalink / raw)
  To: 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:100596] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (2 preceding siblings ...)
  2020-10-26 23:31 ` [ruby-core:100592] " elkenny
@ 2020-10-27  7:28 ` nobu
  2020-11-24  6:27 ` [ruby-core:101036] " yasuo.honda
                   ` (22 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: nobu @ 2020-10-27  7:28 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by nobu (Nobuyoshi Nakada).


As `getaddrinfo` and `getaddrinfo_a` are not in the async-signal-safe function list in POSIX.1-2001, it can't work in both way.
So the "POSIXLY-correct" answer is "you must not use that method in forked process".


----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88227

* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101036] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (3 preceding siblings ...)
  2020-10-27  7:28 ` [ruby-core:100596] " nobu
@ 2020-11-24  6:27 ` yasuo.honda
  2020-11-24  7:07 ` [ruby-core:101037] " sawadatsuyoshi
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: yasuo.honda @ 2020-11-24  6:27 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by yahonda (Yasuo Honda).


I also would like to request to reconsider this change. Ruby programmers have no control to use C level `getaddrinfo` or `getaddrinfo_a` to avoid deadlocks. 

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88707

* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101037] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (4 preceding siblings ...)
  2020-11-24  6:27 ` [ruby-core:101036] " yasuo.honda
@ 2020-11-24  7:07 ` sawadatsuyoshi
  2020-11-24  7:32 ` [ruby-core:101038] " mame
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: sawadatsuyoshi @ 2020-11-24  7:07 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by sawa (Tsuyoshi Sawada).


I see that you have been posting a couple of Rails CI failures as "Ruby bugs" on this site.

I think you are completely mistaken. As far as I know, this website is Ruby's issue tracker, not Rails'.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88708

* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101038] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (5 preceding siblings ...)
  2020-11-24  7:07 ` [ruby-core:101037] " sawadatsuyoshi
@ 2020-11-24  7:32 ` mame
  2020-11-24  7:47 ` [ruby-core:101040] " naruse
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mame @ 2020-11-24  7:32 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by mame (Yusuke Endoh).


sawa (Tsuyoshi Sawada) wrote in #note-6:
> I see that you have been posting a couple of Rails CI failures as "Ruby bugs" on this site.
> 
> I think you are completely mistaken. As far as I know, this website is Ruby's issue tracker, not Rails'.

No!! @yahonda's report is super vaulable for us. I really appreciate it. Please, please continue.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88709

* 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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101040] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (6 preceding siblings ...)
  2020-11-24  7:32 ` [ruby-core:101038] " mame
@ 2020-11-24  7:47 ` naruse
  2020-11-24  8:28 ` [ruby-core:101041] " naruse
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: naruse @ 2020-11-24  7:47 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by naruse (Yui NARUSE).

Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
Target version set to 3.0
Assignee set to Glass_saga (Masaki Matsushita)
Status changed from Third Party's Issue to Assigned

Thank you for pointing out and sorry that we didn't treat this issue as not so important.
This issue is considered as blocking issue for Ruby 3.0.

Thank you for reporting and also appreciate about ping us.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88711

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101041] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (7 preceding siblings ...)
  2020-11-24  7:47 ` [ruby-core:101040] " naruse
@ 2020-11-24  8:28 ` naruse
  2020-11-24  8:40 ` [ruby-core:101042] " sawadatsuyoshi
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: naruse @ 2020-11-24  8:28 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by naruse (Yui NARUSE).


> As getaddrinfo and getaddrinfo_a are not in the async-signal-safe function list in POSIX.1-2001, it can't work in both way.
> So the "POSIXLY-correct" answer is "you must not use that method in forked process".

I think nobu wrote this sentence as "you" means "Ruby users".
But it's not reasonable because it's too hard for  Ruby users to ensure running `getaddrinfo_a` is finished before forking.
`Socket.getaddrinfo` should ensure finish or kill all their threads and re-run threads if needed in atfork and afterfork.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88712

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101042] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (8 preceding siblings ...)
  2020-11-24  8:28 ` [ruby-core:101041] " naruse
@ 2020-11-24  8:40 ` sawadatsuyoshi
  2020-11-24  9:05 ` [ruby-core:101043] " naruse
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: sawadatsuyoshi @ 2020-11-24  8:40 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by sawa (Tsuyoshi Sawada).


mame (Yusuke Endoh) wrote in #note-7:
> sawa (Tsuyoshi Sawada) wrote in #note-6:
> > I see that you have been posting a couple of Rails CI failures as "Ruby bugs" on this site.
> > 
> > I think you are completely mistaken. As far as I know, this website is Ruby's issue tracker, not Rails'.
> 
> No!! @yahonda's report is super vaulable for us. I really appreciate it. Please, please continue.

I don't get it. If this is a Ruby's bug, then why does this issue only/mainly describe a Rails' error? Even the issue title is about Rails. If a Ruby's bug was found while checking Rails CI, then the latter could be mentioned as a side note, but still, the bug itself could be narrowed down and extracted without mentioning Rails.

If it is a feature request, then it should have been tagged as a feature, not a bug. Then, showing a Rails error may help illustrating a use case.

It is ironical that mame-san has made such a comment because I had thought that, if this "bug report" was made intentionally, just posting a Rails CI error as if it were a Ruby's bug, I think it is very rude of the poster against Ruby developers (although I am just a bystander and cannot really say for sure).

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88713

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101043] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (9 preceding siblings ...)
  2020-11-24  8:40 ` [ruby-core:101042] " sawadatsuyoshi
@ 2020-11-24  9:05 ` naruse
  2020-11-24  9:39 ` [ruby-core:101045] " sawadatsuyoshi
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: naruse @ 2020-11-24  9:05 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by naruse (Yui NARUSE).


sawa (Tsuyoshi Sawada) wrote in #note-10:
> I don't get it. If this is a Ruby's bug, then why does this issue only/mainly describe a Rails' error? Even the issue title is about Rails. If a Ruby's bug was found while checking Rails CI, then the latter could be mentioned as a side note, but still, the bug itself could be narrowed down and extracted without mentioning Rails.

> I don't get it. If this is a Ruby's bug, then why does this issue only/mainly describe a Rails' error? Even the issue title is about Rails. If a Ruby's bug was found while checking Rails CI, then the latter could be mentioned as a side note, but still, the bug itself could be narrowed down and extracted without mentioning Rails.

We are practical.
In this case yahonda report this ticket, and eugeneius identify the small reproducible code.
Now it's clear that Ruby has an issue.
What is a problem?

You dogmatic attitude doesn't contribute anything.
Contribution is welcome.
What is a contribution is decided by whether it contributes something or not.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88714

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101045] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (10 preceding siblings ...)
  2020-11-24  9:05 ` [ruby-core:101043] " naruse
@ 2020-11-24  9:39 ` sawadatsuyoshi
  2020-11-24  9:47 ` [ruby-core:101046] " naruse
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: sawadatsuyoshi @ 2020-11-24  9:39 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by sawa (Tsuyoshi Sawada).


naruse (Yui NARUSE) wrote in #note-11:
> In this case yahonda report this ticket, and eugeneius identify the small reproducible code.

That discussion should have been done in Rails' issue tracker.

> Now it's clear that Ruby has an issue.

Only after this point would it make sense to report it as a Ruby bug, mentioning eugeneius' small reproducible code.

> You dogmatic attitude doesn't contribute anything.
> Contribution is welcome.
> What is a contribution is decided by whether it contributes something or not.

According to naruse-san's comment, the original post did not make any contribution to Ruby. The contribution was made by eugeneius.

You may say that the post triggered a conversation that led another person to find a Ruby's bug. That is indirect still. If that was the intention of the post, the description could have at least been something like "I could not narrow down the issue, but I can tell from observing Rails CI that there must be something wrong with Ruby. Blah blah ..." Just posting a Rails error as a Ruby bug does not make sense unless you have a dogma that any change in Ruby's behavior that makes Rails go wrong is a Ruby's bug.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88716

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101046] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (11 preceding siblings ...)
  2020-11-24  9:39 ` [ruby-core:101045] " sawadatsuyoshi
@ 2020-11-24  9:47 ` naruse
  2020-11-24 11:00 ` [ruby-core:101047] " mame
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: naruse @ 2020-11-24  9:47 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by naruse (Yui NARUSE).


sawa (Tsuyoshi Sawada) wrote in #note-12:
> naruse (Yui NARUSE) wrote in #note-11:
> > In this case yahonda report this ticket, and eugeneius identify the small reproducible code.
> 
> That discussion should have been done in Rails' issue tracker.

I need this issue as Release manager of Ruby 3.0.

I don't need further your comment.
If you continue this in this thread, I'll block you.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88717

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101047] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (12 preceding siblings ...)
  2020-11-24  9:47 ` [ruby-core:101046] " naruse
@ 2020-11-24 11:00 ` mame
  2020-11-25  0:53 ` [ruby-core:101063] " shyouhei
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: mame @ 2020-11-24 11:00 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by mame (Yusuke Endoh).


"A new version of Ruby breaks an existing application" is one of the most valuable reports.
Especially if the application is popular and practical like Rails.

If the breakage is unintentional, it is a regression bug that we need to fix at the best effort.
@yahonda has reported regression bugs of Ruby, so his reports are relatively trustable and he is an important contributor for us.

Even if the breakage is caused by an intentional change, it is still informative to estimate the impact of the incompatibility.
We may eventually reject such reports, but we would really appreciate them.

Small reproducible code is helpful for us, but not mandatory for bug reports.
It is the worst possible thing that people hasitate to report a regression bug in a real-world application just because they have no time to create small reproducible code.
Other people may be able to create such code (like @eugeneius in this ticket).
We cannot promise but we may identify and fix an issue without code.
Even if we couldn't determine if it is a regression or not, it may be useful in future to keep a record.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88718

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101063] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (13 preceding siblings ...)
  2020-11-24 11:00 ` [ruby-core:101047] " mame
@ 2020-11-25  0:53 ` shyouhei
  2020-11-25  8:04 ` [ruby-core:101067] " glass.saga
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: shyouhei @ 2020-11-25  0:53 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by shyouhei (Shyouhei Urabe).


Thanks @yahonda for reporting this!

@glass_saga Any idea how to fix this? Or revert?

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88737

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101067] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (14 preceding siblings ...)
  2020-11-25  0:53 ` [ruby-core:101063] " shyouhei
@ 2020-11-25  8:04 ` glass.saga
  2020-11-25  9:05 ` [ruby-core:101068] " naruse
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-11-25  8:04 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).


Thank you for reporting this behavior. @yahonda
I'd like to implement a hook before `fork()` to cancel all outstanding requests of `getaddrinfo_a()` and wait for ongoing requests to be finished.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88741

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101068] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (15 preceding siblings ...)
  2020-11-25  8:04 ` [ruby-core:101067] " glass.saga
@ 2020-11-25  9:05 ` naruse
  2020-11-27  9:22 ` [ruby-core:101119] " glass.saga
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: naruse @ 2020-11-25  9:05 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by naruse (Yui NARUSE).


As glass_saga says,
* Before fork, all pthreads need to be stopped (this is considered Unix's practical restriction as far as I understand)
* getaddrinfo_a uses their own pthread to provide async feature. It has a queue and pthreads (up to 20 threads) to handle DNS requests. getaddrinfo_a with NOWAIT posts a task to the queue.
* With gai_cancel(3), it can remove queuing task. But it doesn't remove/stop already running task.
* With gai_error(3), it can get the status of the task.
* To stop those pthreads, it needs to stop posting new task, remove all queuing tasks, and then stop/wait running tasks. After that worker threads will finish after 1 second sleep. To skip that sleep, we need to call an internal glibc API __gai_new_request_notification().
* To stop posting new task, just getting GVL.
* To remove all queuing tasks, we can use gai_cancel. Though the manpage says gai_cancel(NULL), it actually pass all arguments one by one.
* There's no way to stop running tasks with glibc's getaddrinfo_a. To stop them, we need to re-implement getaddrinfo_a. With our own impl, we can use pthread_cancel(3) to stop getaddrinfo(3) in the threads. It seems that some issues are seen but actually we can do that. (ref. https://bugzilla.redhat.com/show_bug.cgi?id=1209433)
* In Ruby 3.0 we'll ensure to stop pthreads before fork. In the future, we'll provide further enchancements.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88742

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101119] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (16 preceding siblings ...)
  2020-11-25  9:05 ` [ruby-core:101068] " naruse
@ 2020-11-27  9:22 ` glass.saga
  2020-11-27 11:20 ` [ruby-core:101126] " glass.saga
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-11-27  9:22 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).

File fix_bug17220.patch added

I wrote a patch to fix this bug.
Before fork(), it cancels requests and waits for worker threads of getaddrinfo_a(3) to be finished.
@naruse -san, could you review this?

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88799

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.21 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101126] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (17 preceding siblings ...)
  2020-11-27  9:22 ` [ruby-core:101119] " glass.saga
@ 2020-11-27 11:20 ` glass.saga
  2020-11-27 12:34 ` [ruby-core:101127] " nobu
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-11-27 11:20 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).

File fix_bug17220.patch added

patch updated

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88807

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101127] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (18 preceding siblings ...)
  2020-11-27 11:20 ` [ruby-core:101126] " glass.saga
@ 2020-11-27 12:34 ` nobu
  2020-11-27 15:14 ` [ruby-core:101133] " glass.saga
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: nobu @ 2020-11-27 12:34 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by nobu (Nobuyoshi Nakada).


`rb_rescue(call_getaddrinfo_a_before_exec, Qnil, NULL, Qnil)` should be `rb_protect`?

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88808

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101133] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (19 preceding siblings ...)
  2020-11-27 12:34 ` [ruby-core:101127] " nobu
@ 2020-11-27 15:14 ` glass.saga
  2020-12-02 15:20 ` [ruby-core:101205] " glass.saga
                   ` (5 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-11-27 15:14 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).

File fix_bug17220_2.patch added

patch updated:
* call `rb_getaddrinfo_a_before_exec()` before `rb_thread_stop_timer_thread()`
* use `rb_protect()` instead of `rb_rescue`

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88814

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101205] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (20 preceding siblings ...)
  2020-11-27 15:14 ` [ruby-core:101133] " glass.saga
@ 2020-12-02 15:20 ` glass.saga
  2020-12-03  9:41 ` [ruby-core:101213] " nobu
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-12-02 15:20 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).

File fix_bug17220_3.patch added

patch updated:
- to stop posting new task, we need keep holding GVL.
- use function pointer instead of `rb_funcall` (this may release GVL)
- use `sleep()` instead of `rb_thread_sleep()` (ditto)

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88888

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)
fix_bug17220_3.patch (7.11 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101213] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (21 preceding siblings ...)
  2020-12-02 15:20 ` [ruby-core:101205] " glass.saga
@ 2020-12-03  9:41 ` nobu
  2020-12-04  3:55 ` [ruby-core:101237] " glass.saga
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: nobu @ 2020-12-03  9:41 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by nobu (Nobuyoshi Nakada).


About `__getaddrinfo_a_before_exec_func`:
* the name starting with `__` is reserved by C standard
* the name seems too specific and can be more generic w/o `getaddrinfo_a`
* it should not be exposed in public headers

About the test:
* maybe should be under test/socket

Misc:
* 2nd and 4th hunks of ext/socket/raddrinfo.c, and 2nd of process.c seem useless

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88898

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)
fix_bug17220_3.patch (7.11 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101237] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (22 preceding siblings ...)
  2020-12-03  9:41 ` [ruby-core:101213] " nobu
@ 2020-12-04  3:55 ` glass.saga
  2020-12-04  4:05 ` [ruby-core:101238] " glass.saga
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-12-04  3:55 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).

File fix_bug17220_4.patch added

patch updated:
- use more generic name `rb_socket_before_exec_func`
- move test to test/socket
- remove useless lines

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88917

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)
fix_bug17220_3.patch (7.11 KB)
fix_bug17220_4.patch (6.64 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101238] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (23 preceding siblings ...)
  2020-12-04  3:55 ` [ruby-core:101237] " glass.saga
@ 2020-12-04  4:05 ` glass.saga
  2020-12-04  4:53 ` [ruby-core:101239] " nobu
  2020-12-06 14:33 ` [ruby-core:101261] " yasuo.honda
  26 siblings, 0 replies; 28+ messages in thread
From: glass.saga @ 2020-12-04  4:05 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by Glass_saga (Masaki Matsushita).

File fix_bug17220_cond.patch added

another patch that uses `pthread_cond_signal(&__gai_new_request_notification)`, but it doesn't work.

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88918

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)
fix_bug17220_3.patch (7.11 KB)
fix_bug17220_4.patch (6.64 KB)
fix_bug17220_cond.patch (7.35 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101239] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (24 preceding siblings ...)
  2020-12-04  4:05 ` [ruby-core:101238] " glass.saga
@ 2020-12-04  4:53 ` nobu
  2020-12-06 14:33 ` [ruby-core:101261] " yasuo.honda
  26 siblings, 0 replies; 28+ messages in thread
From: nobu @ 2020-12-04  4:53 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by nobu (Nobuyoshi Nakada).


Glass_saga (Masaki Matsushita) wrote in #note-25:
> patch updated:
> - use more generic name `rb_socket_before_exec_func`

I think that ruby core should just provide the hook always.
It is the responsibility of ext/socket to register the hook or not.


----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88919

* Author: yahonda (Yasuo Honda)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)
fix_bug17220_3.patch (7.11 KB)
fix_bug17220_4.patch (6.64 KB)
fix_bug17220_cond.patch (7.35 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [ruby-core:101261] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
  2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
                   ` (25 preceding siblings ...)
  2020-12-04  4:53 ` [ruby-core:101239] " nobu
@ 2020-12-06 14:33 ` yasuo.honda
  26 siblings, 0 replies; 28+ messages in thread
From: yasuo.honda @ 2020-12-06 14:33 UTC (permalink / raw)
  To: ruby-core

Issue #17220 has been updated by yahonda (Yasuo Honda).


Thanks for providing the fix. I have opened a pull request to revert 'sleep 1' workarounds https://github.com/rails/rails/pull/40754 .

----------------------------------------
Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed
https://bugs.ruby-lang.org/issues/17220#change-88939

* Author: yahonda (Yasuo Honda)
* Status: Closed
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 3.0
* ruby -v: ruby 2.8.0dev (2020-08-27T07:39:13Z v3_0_0_preview1~397 2038cc6cab) [x86_64-linux]
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED
----------------------------------------
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.
```


---Files--------------------------------
fix_bug17220.patch (7.32 KB)
fix_bug17220_2.patch (7.53 KB)
fix_bug17220_3.patch (7.11 KB)
fix_bug17220_4.patch (6.64 KB)
fix_bug17220_cond.patch (7.35 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2020-12-06 14:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 13:26 [ruby-core:100329] [Ruby master Bug#17220] Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed yasuo.honda
2020-10-15 23:57 ` [ruby-core:100410] " elkenny
2020-10-16 10:49 ` [ruby-core:100419] " nobu
2020-10-26 23:31 ` [ruby-core:100592] " elkenny
2020-10-27  7:28 ` [ruby-core:100596] " nobu
2020-11-24  6:27 ` [ruby-core:101036] " yasuo.honda
2020-11-24  7:07 ` [ruby-core:101037] " sawadatsuyoshi
2020-11-24  7:32 ` [ruby-core:101038] " mame
2020-11-24  7:47 ` [ruby-core:101040] " naruse
2020-11-24  8:28 ` [ruby-core:101041] " naruse
2020-11-24  8:40 ` [ruby-core:101042] " sawadatsuyoshi
2020-11-24  9:05 ` [ruby-core:101043] " naruse
2020-11-24  9:39 ` [ruby-core:101045] " sawadatsuyoshi
2020-11-24  9:47 ` [ruby-core:101046] " naruse
2020-11-24 11:00 ` [ruby-core:101047] " mame
2020-11-25  0:53 ` [ruby-core:101063] " shyouhei
2020-11-25  8:04 ` [ruby-core:101067] " glass.saga
2020-11-25  9:05 ` [ruby-core:101068] " naruse
2020-11-27  9:22 ` [ruby-core:101119] " glass.saga
2020-11-27 11:20 ` [ruby-core:101126] " glass.saga
2020-11-27 12:34 ` [ruby-core:101127] " nobu
2020-11-27 15:14 ` [ruby-core:101133] " glass.saga
2020-12-02 15:20 ` [ruby-core:101205] " glass.saga
2020-12-03  9:41 ` [ruby-core:101213] " nobu
2020-12-04  3:55 ` [ruby-core:101237] " glass.saga
2020-12-04  4:05 ` [ruby-core:101238] " glass.saga
2020-12-04  4:53 ` [ruby-core:101239] " nobu
2020-12-06 14:33 ` [ruby-core:101261] " yasuo.honda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).