2024-01-12 12:28:06 |
Toni |
bug |
|
|
added bug |
2024-01-12 12:45:27 |
Toni |
description |
After looking through the source it seems there is a bug in all current ruby3.X packages affecting at least versions >22.04 that causes segfault relatively rarely. Even though rare with repetitions running small wrappers it will be seen quite a bit, up to dozens of times in a day.
There exists a patch upstream, could that be picked to Ubuntu repo(s)?
The fix and other resources:
https://github.com/ruby/ruby/pull/7663
https://bugs.ruby-lang.org/issues/19580
https://gitlab.com/gitlab-org/omnibus-gitlab/-/commit/bd949e2b40cc434a1e4d72be2bff6523e8a91904 |
After looking through the source it seems there is a bug in all current ruby3.X packages affecting at least versions >=22.04 that causes segfault relatively rarely. Even though rare with repetitions running small wrappers it will be seen quite a bit, up to dozens of times in a day.
There exists a patch upstream, could that be picked to Ubuntu repo(s)?
The fix and other resources:
https://github.com/ruby/ruby/pull/7663
https://bugs.ruby-lang.org/issues/19580
https://gitlab.com/gitlab-org/omnibus-gitlab/-/commit/bd949e2b40cc434a1e4d72be2bff6523e8a91904 |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
nominated for series |
|
Ubuntu Mantic |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
bug task added |
|
ruby3.0 (Ubuntu Mantic) |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
nominated for series |
|
Ubuntu Lunar |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
bug task added |
|
ruby3.0 (Ubuntu Lunar) |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
nominated for series |
|
Ubuntu Jammy |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
bug task added |
|
ruby3.0 (Ubuntu Jammy) |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
nominated for series |
|
Ubuntu Noble |
|
2024-01-15 14:47:58 |
Athos Ribeiro |
bug task added |
|
ruby3.0 (Ubuntu Noble) |
|
2024-01-15 14:48:07 |
Athos Ribeiro |
ruby3.0 (Ubuntu Noble): status |
New |
Triaged |
|
2024-01-15 14:48:09 |
Athos Ribeiro |
ruby3.0 (Ubuntu Mantic): status |
New |
Triaged |
|
2024-01-15 14:48:14 |
Athos Ribeiro |
ruby3.0 (Ubuntu Lunar): status |
New |
Triaged |
|
2024-01-15 14:48:17 |
Athos Ribeiro |
ruby3.0 (Ubuntu Jammy): status |
New |
Triaged |
|
2024-01-15 14:48:31 |
Athos Ribeiro |
bug |
|
|
added subscriber Ubuntu Server |
2024-03-19 19:15:22 |
Lucas Kanashiro |
ruby3.0 (Ubuntu Lunar): status |
Triaged |
Won't Fix |
|
2024-03-19 19:16:14 |
Lucas Kanashiro |
bug task added |
|
ruby3.1 (Ubuntu) |
|
2024-03-19 19:16:25 |
Lucas Kanashiro |
ruby3.1 (Ubuntu Jammy): status |
New |
Invalid |
|
2024-03-19 19:16:45 |
Lucas Kanashiro |
ruby3.0 (Ubuntu Mantic): status |
Triaged |
Invalid |
|
2024-03-19 19:16:54 |
Lucas Kanashiro |
ruby3.0 (Ubuntu Noble): status |
Triaged |
Invalid |
|
2024-03-19 19:17:03 |
Lucas Kanashiro |
ruby3.1 (Ubuntu Lunar): status |
New |
Invalid |
|
2024-03-19 19:17:12 |
Lucas Kanashiro |
ruby3.1 (Ubuntu Noble): status |
New |
Invalid |
|
2024-03-19 19:17:24 |
Lucas Kanashiro |
bug task added |
|
ruby3.2 (Ubuntu) |
|
2024-03-19 19:17:33 |
Lucas Kanashiro |
ruby3.2 (Ubuntu Jammy): status |
New |
Invalid |
|
2024-03-19 19:17:44 |
Lucas Kanashiro |
ruby3.2 (Ubuntu Lunar): status |
New |
Invalid |
|
2024-03-19 19:17:52 |
Lucas Kanashiro |
ruby3.2 (Ubuntu Mantic): status |
New |
Invalid |
|
2024-03-19 19:17:59 |
Lucas Kanashiro |
ruby3.2 (Ubuntu Noble): status |
New |
Triaged |
|
2024-03-19 19:18:07 |
Lucas Kanashiro |
ruby3.1 (Ubuntu Mantic): status |
New |
Triaged |
|
2024-03-19 19:18:17 |
Lucas Kanashiro |
ruby3.0 (Ubuntu Jammy): assignee |
|
Lucas Kanashiro (lucaskanashiro) |
|
2024-03-19 19:18:32 |
Lucas Kanashiro |
ruby3.1 (Ubuntu Mantic): assignee |
|
Lucas Kanashiro (lucaskanashiro) |
|
2024-03-19 19:18:41 |
Lucas Kanashiro |
ruby3.2 (Ubuntu Noble): assignee |
|
Lucas Kanashiro (lucaskanashiro) |
|
2024-03-19 19:18:50 |
Lucas Kanashiro |
tags |
|
server-todo |
|
2024-03-20 20:30:02 |
Lucas Kanashiro |
ruby3.2 (Ubuntu Noble): status |
Triaged |
Fix Released |
|
2024-03-21 21:10:38 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~lucaskanashiro/ubuntu/+source/ruby3.0/+git/ruby3.0/+merge/462902 |
|
2024-03-21 21:11:39 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~lucaskanashiro/ubuntu/+source/ruby3.1/+git/ruby3.1/+merge/462903 |
|
2024-03-21 21:27:03 |
Lucas Kanashiro |
description |
After looking through the source it seems there is a bug in all current ruby3.X packages affecting at least versions >=22.04 that causes segfault relatively rarely. Even though rare with repetitions running small wrappers it will be seen quite a bit, up to dozens of times in a day.
There exists a patch upstream, could that be picked to Ubuntu repo(s)?
The fix and other resources:
https://github.com/ruby/ruby/pull/7663
https://bugs.ruby-lang.org/issues/19580
https://gitlab.com/gitlab-org/omnibus-gitlab/-/commit/bd949e2b40cc434a1e4d72be2bff6523e8a91904 |
[Impact]
Users might face a segfault when using ruby_free.
[Test Plan]
# apt update && apt install -y ruby ruby-nokogiri
# cat > reproducer.rb <<EOF
require 'nokogiri'
# must have an error in it to cause pthread_setspecific to be called
html = "<div foo='asdf>asdf</div>"
Thread.new { Nokogiri::HTML4::Document.parse(html) }
sleep 3 # THREAD_CACHE_TIME
exit 0
EOF
# while true; do ruby reproducer.rb; done
After a while (this may take several minutes to manifest) I got the reported error:
[BUG] Segmentation fault at 0x0000000000000440[BUG] Segmentation fault at 0x0000000000000440
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
-- Machine register context ------------------------------------------------
RIP: 0x00007c8ec2ac2fcb RBP: 0x000059ae2e596d20 RSP: 0x00007c8ebc5fed70
RAX: 0x0000000000000000 RBX: 0x00007c8ebc5ff640 RCX: 0x0000000000000006
RDX: 0x0000000000000002[BUG] [BUG] Segmentation fault at 0x0000000000000440
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
-- Machine register context ------------------------------------------------
RIP: 0x000075c4b4ec2fcb RBP: 0x000062693580e190 RSP: 0x000075c4ae9fed70
RAX: 0x0000000000000000 RBX: 0x000075c4ae9ff640 RCX: 0x0000000000000006
RDX: 0x0000000000000002 RDI: 0x000062693580e190 RSI: 0x0000000000000000
R8: 0x000075c4ae9fede4 R9: 0x00000000000000ca R10: 0x0000000000000000
R11: 0x0000000000000246 R12: 0x000075c4b5170b40
R13: 0x000075c4ae9fedc0
The fixed package should not segfault under this condition.
[Where Problems could occur]
The upstream patch to fix this tries to address a timing issue, where depending on the order of things might cause a segfault. The assumption might not be true and users could still get a segfault under some very specific scenario that was not initially considered.
[Original Description]
After looking through the source it seems there is a bug in all current ruby3.X packages affecting at least versions >=22.04 that causes segfault relatively rarely. Even though rare with repetitions running small wrappers it will be seen quite a bit, up to dozens of times in a day.
There exists a patch upstream, could that be picked to Ubuntu repo(s)?
The fix and other resources:
https://github.com/ruby/ruby/pull/7663
https://bugs.ruby-lang.org/issues/19580
https://gitlab.com/gitlab-org/omnibus-gitlab/-/commit/bd949e2b40cc434a1e4d72be2bff6523e8a91904 |
|
2024-04-12 13:07:51 |
Timo Aaltonen |
ruby3.1 (Ubuntu Mantic): status |
Triaged |
Fix Committed |
|
2024-04-12 13:07:53 |
Timo Aaltonen |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2024-04-12 13:07:55 |
Timo Aaltonen |
bug |
|
|
added subscriber SRU Verification |
2024-04-12 13:07:56 |
Timo Aaltonen |
tags |
server-todo |
server-todo verification-needed verification-needed-mantic |
|
2024-04-12 13:20:51 |
Timo Aaltonen |
ruby3.0 (Ubuntu Jammy): status |
Triaged |
Fix Committed |
|
2024-04-12 13:20:56 |
Timo Aaltonen |
tags |
server-todo verification-needed verification-needed-mantic |
server-todo verification-needed verification-needed-jammy verification-needed-mantic |
|
2024-04-24 23:09:42 |
Lucas Kanashiro |
tags |
server-todo verification-needed verification-needed-jammy verification-needed-mantic |
server-todo verification-done verification-done-jammy verification-done-mantic |
|
2024-04-25 17:29:25 |
Launchpad Janitor |
ruby3.1 (Ubuntu Mantic): status |
Fix Committed |
Fix Released |
|
2024-04-25 17:29:29 |
Andreas Hasenack |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2024-04-25 17:31:48 |
Launchpad Janitor |
ruby3.0 (Ubuntu Jammy): status |
Fix Committed |
Fix Released |
|