2023-05-01 08:15:34 |
Andrius Merkys |
bug |
|
|
added bug |
2023-05-01 12:03:42 |
Andrius Merkys |
tags |
|
patch |
|
2023-05-02 12:24:18 |
Lucas Kanashiro |
ruby2.7 (Ubuntu): status |
New |
Triaged |
|
2023-05-02 12:24:28 |
Lucas Kanashiro |
nominated for series |
|
Ubuntu Focal |
|
2023-05-02 12:24:28 |
Lucas Kanashiro |
bug task added |
|
ruby2.7 (Ubuntu Focal) |
|
2023-05-02 12:24:33 |
Lucas Kanashiro |
ruby2.7 (Ubuntu Focal): status |
New |
Triaged |
|
2023-05-02 12:25:01 |
Lucas Kanashiro |
ruby2.7 (Ubuntu): status |
Triaged |
Invalid |
|
2023-05-02 12:25:10 |
Lucas Kanashiro |
ruby2.7 (Ubuntu Focal): importance |
Undecided |
Medium |
|
2023-05-02 12:25:22 |
Lucas Kanashiro |
bug |
|
|
added subscriber Ubuntu Server |
2023-05-02 12:25:33 |
Lucas Kanashiro |
tags |
patch |
patch server-todo |
|
2023-05-02 12:45:33 |
Andrius Merkys |
bug watch added |
|
https://bugs.ruby-lang.org/issues/16503 |
|
2023-05-03 07:28:16 |
Lucas Kanashiro |
ruby2.7 (Ubuntu Focal): assignee |
|
Lucas Kanashiro (lucaskanashiro) |
|
2023-05-03 08:44:06 |
Lucas Kanashiro |
description |
I am using system-provided sonic-pi on Ubuntu 20.04. When stopping a loop, a thread terminates with exception:
#<Thread:0x000055f182e5a758 /usr/lib/sonic-pi/server/sonicpi/lib/sonicpi/runtime.rb:778 run> terminated with exception (report_on_exception is true):
/usr/lib/ruby/2.7.0/set.rb:328:in `each_key': ret: 2, hash modified during iteration (RuntimeError)
from /usr/lib/ruby/2.7.0/set.rb:328:in `each'
from /usr/lib/sonic-pi/server/sonicpi/lib/sonicpi/runtime.rb:409:in `__join_subthreads'
from /usr/lib/sonic-pi/server/sonicpi/lib/sonicpi/runtime.rb:782:in `block in __spider_eval'
This failure seems similar to one described here [1], which has been confirmed as a bug in Ruby [2]. The issue has received a one-line patch, which has been incorporated in Ruby v2.7.1.
[1] https://github.com/kpumuk/meta-tags/issues/209
[2] https://bugs.ruby-lang.org/issues/16503 |
[Impact]
Ruby code cannot iterate over hashes while the garbage collector is started.
This was fixed upstream here:
https://bugs.ruby-lang.org/issues/16503
https://github.com/ruby/ruby/commit/8e8841f6bf58031a1fe5b0dbacb5a1fb442102df
[Test Plan]
$ lxc launch ubuntu-daily:focal ruby27-hash-iteration
$ lxc shell ruby27-hash-iteration
# apt update && apt upgrade -y && apt install -y ruby
# cat <<EOF >bug.rb
h = {a:1, b:2, c:3, d:4, e:5, f:6, g:7, h:8}
h.each{|k,v| GC.start; h.delete(k)}
EOF
# ruby bug.rb
Traceback (most recent call last):
1: from bug.rb:2:in `<main>'
bug.rb:2:in `each': ret: 2, hash modified during iteration (RuntimeError)
The error above should not happen.
[Where problems could occur]
This is a one line fix which should be straightforward, but if something happens it would be related to the .each method since the modification is there. Any unexpected behavior in .each might be related to this change.
[Original description]
I am using system-provided sonic-pi on Ubuntu 20.04. When stopping a loop, a thread terminates with exception:
#<Thread:0x000055f182e5a758 /usr/lib/sonic-pi/server/sonicpi/lib/sonicpi/runtime.rb:778 run> terminated with exception (report_on_exception is true):
/usr/lib/ruby/2.7.0/set.rb:328:in `each_key': ret: 2, hash modified during iteration (RuntimeError)
from /usr/lib/ruby/2.7.0/set.rb:328:in `each'
from /usr/lib/sonic-pi/server/sonicpi/lib/sonicpi/runtime.rb:409:in `__join_subthreads'
from /usr/lib/sonic-pi/server/sonicpi/lib/sonicpi/runtime.rb:782:in `block in __spider_eval'
This failure seems similar to one described here [1], which has been confirmed as a bug in Ruby [2]. The issue has received a one-line patch, which has been incorporated in Ruby v2.7.1.
[1] https://github.com/kpumuk/meta-tags/issues/209
[2] https://bugs.ruby-lang.org/issues/16503 |
|
2023-05-04 12:13:49 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~lucaskanashiro/ubuntu/+source/ruby2.7/+git/ruby2.7/+merge/442366 |
|
2023-05-17 19:25:32 |
Lucas Kanashiro |
bug watch added |
|
https://bugs.ruby-lang.org/issues/16676 |
|
2023-05-17 19:53:21 |
Robie Basak |
ruby2.7 (Ubuntu Focal): status |
Triaged |
Fix Committed |
|
2023-05-17 19:53:21 |
Robie Basak |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-05-17 19:53:23 |
Robie Basak |
bug |
|
|
added subscriber SRU Verification |
2023-05-17 19:53:25 |
Robie Basak |
tags |
patch server-todo |
patch server-todo verification-needed verification-needed-focal |
|
2023-05-18 06:46:55 |
Andrius Merkys |
tags |
patch server-todo verification-needed verification-needed-focal |
patch server-todo verification-done-focal verification-needed |
|
2023-05-18 12:24:45 |
Lucas Kanashiro |
tags |
patch server-todo verification-done-focal verification-needed |
patch server-todo verification-done verification-done-focal |
|
2023-05-25 19:16:31 |
Launchpad Janitor |
ruby2.7 (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2023-05-25 19:16:35 |
Andreas Hasenack |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|