SlideShare a Scribd company logo
2019-04-19
All bug-fixes are incompatibilities
nagachika @ RubyKaigi 2019
Important Notification about RubyGems.org
The attackers try to hijack your
account with compromised
password list.
Example: bootstrap-sass was
compromised by this attack. It was
injected the vulnerable RCE code.
We should prepare the multi-factor
authentication on RubyGems.org
for protecting from them.
✤ @nagachika
✤ CRuby committer
✤ CRuby stable branch maintainer (2.5 → 2.6)
✤ ruby trunk changes
✤ Fukuoka.rb/TFUG Fukuoka
WHO AM I
✤ @nagachika
✤ CRuby committer
✤ CRuby stable branch maintainer (2.5 → 2.6)
✤ ruby trunk changes
✤ Fukuoka.rb/TFUG Fukuoka
WHO AM I
“What’s the Ruby’s

stable branch maintenance?”
✤ We backport fixes into stable branches from trunk
Ruby’s stable branch model
EoL
ruby_2_2
ruby_2_5
ruby_2_6
backport
trunk
bugfix
✤ We backport fixes into stable branches from trunk
Ruby’s stable branch model
nurse
unak
Release

Manager
Stable

Branch

Maintainer
EoL
ruby_2_2
ruby_2_5
ruby_2_6
backport
trunk
bugfix
nagachika
✤ Backport bug-fixes from trunk into stable branches
✤ Release stable packages.
✤ Handle security issues in concert with
stakeholders.
Stable Branch Maintainer
✤ Backport bug-fixes from trunk into stable branches
✤ Release stable packages
✤ Handle security issues in concert with
stakeholders
Stable Branch Maintainer
✤ Watch commits on trunk.
✤ Backport bug-fixes.
Stable Branch Maintainer’s daily work
✤ Watch commits on trunk

→ Watch backport requests on Redmine.
✤ Backport bug-fixes.
Stable Branch Maintainer’s daily work
✤ Redmine: bugs.ruby-lang.org
Ruby’s stable maintenance policy
✤ File tickets with rubyʼs version information
Ruby’s stable maintenance policy
✤ You can maintain only one stable branch at once.
Ruby’s stable branch model
nurse
nagachika
unak
Release

Manager
Stable

Branch

Maintainer
EoL
ruby_2_2
ruby_2_5
ruby_2_6
backport
trunk
bugfix
“How can I become a Ruby stable
maintainer?”
Requirements for Stable Branch Maintainers
✤ Wide understandings for the Ruby implementation
✤ Sustainability to some extent
✤ Understanding maintenance policy
Requirements for Stable Branch Maintainers
✤ Backport bug-fixes
✤ Donʼt backport new features/spec changes
Ruby’s maintenance policy
stable
trunk
bug-fix
new feature
IO.read could execute a command
IO.read(“|cmd…”) executes the command
(same as Kernel#open)
IO.read and File.read
IO.read and File.read
% ruby -ve 'puts File.read("|echo foo")'
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
foo
% ruby -ve 'puts File.read("|echo foo")'
ruby 2.5.4p155 (2019-03-13 revision 67245) [x86_64-darwin15]
-e:1: warning: IO.read called on File to invoke external command
foo
% ruby -ve 'puts File.read("|echo foo")'
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin15]
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `read': No such file or directory @ rb_sysopen - |echo foo (Errno::ENOENT)
IO.read and File.read
✤ 2.0.0: 469
✤ 2.1: 250
✤ 2.2: 205
✤ 2.3: 217
✤ 2.4: 190
✤ 2.5: 101
Backport commits by nagachika
✤ 2.0.0: 469
✤ 2.1: 250
✤ 2.2: 205
✤ 2.3: 217
✤ 2.4: 190
✤ 2.5: 101
Backport commits by nagachika
include
Documentation,
performance improvement,
memory usage improvement…
Lessons learned from

failures
Backport performance improvements
All bugfixes are incompatibilities
✤ The change broke CI on mswin
Backport performance improvements
✤ The lesson learned
✤ Donʼt backport performance improvements
Backport performance improvements
Backport introduced memory violation
Backport introduced memory violation
Backport introduced memory violation
✤ The lesson learned
✤ Bug-fixes for Method/Constants search in edge
cases sometimes introduce another memory
violation.
✤ Fixing a minor bug can introduce severe bugs
Backport introduced memory violation
Refinements
Refinements
✤ The lesson learned
✤ “Refinements” is not a matured feature and
continue expanding its scope of adaptation.
✤ Deal it carefully.
Refinements
Fixing SyntaxError caused another SyntaxError
Fixing SyntaxError caused another SyntaxError
Fixing SyntaxError caused another SyntaxError
cond ? expr1 :expr2
Fixing SyntaxError caused another SyntaxError
{ key:(expr rescue nil) }
{ key:<<EOF }
EOF
✤ The lesson learned
✤ parse.y is “魔境” (mass of legendary complexity)
✤ SyntaxError is the one of the most severe issues
✤ Monkey patching cannot get rid of SyntaxError
Fixing SyntaxError caused another SyntaxError
Fixing SyntaxError caused another SyntaxError(2)
Fixing SyntaxError caused another SyntaxError(2)
Fixing SyntaxError caused another SyntaxError(2)
def foo key1:
…
end
Fixing SyntaxError caused another SyntaxError(2)
{ key:if foo then 1 else 0 }
✤ The lesson learned(?)
✤ Fixing the SyntaxError introduced another
SyntaxError in the more rare case
✤ But the prior SyntaxError was in the new syntax

(Mandatory keyword arguments)
✤ There was maybe no real application affected
by the prior SyntaxError.
Fixing SyntaxError caused another SyntaxError(2)
Fixing SyntaxError caused another SyntaxError(3)
Fixing SyntaxError caused another SyntaxError(3)
Fixing SyntaxError caused another SyntaxError(3)
✤ The lesson learned
✤ parse.y is “魔境”
✤ Long-standing bugs have less priority

→ “Long-standing” means thereʼs no real
application affected
✤ “Known bug” can be better than “Regression”
Fixing SyntaxError caused another SyntaxError(3)
Load FIFO
✤ Release GVL during open fd for `load`
Load FIFO
✤ Performance degradation of YAML.parse on

multi-threads environments
Load FIFO
✤ The lesson learned
✤ Donʼt backport bug-fixes for imaginary use case.

No one wanted to load from FIFO!
Load FIFO
✤ Donʼt backport performance improvements
✤ Donʼt backport fix for the long-standing bugs
✤ Donʼt jump at the fix in parse.y, constants/
methods search and refinements
✤ Donʼt backport fixes on one wanted to backport
The Lessons Learned from failures
✤ Be-Practical!
The Lessons Learned from failures

More Related Content

PPT
Stackless Python In Eve
KEY
Don’t block the event loop!
PDF
L'odyssée de la log
PDF
Event loop
PDF
From Zero To Production (NixOS, Erlang) @ Erlang Factory SF 2016
KEY
Ruby 1.9 And Rails 3.0
KEY
Lock? We don't need no stinkin' locks!
PDF
Vert.x clustering on Docker, CoreOS and ETCD
Stackless Python In Eve
Don’t block the event loop!
L'odyssée de la log
Event loop
From Zero To Production (NixOS, Erlang) @ Erlang Factory SF 2016
Ruby 1.9 And Rails 3.0
Lock? We don't need no stinkin' locks!
Vert.x clustering on Docker, CoreOS and ETCD

What's hot (20)

PDF
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
PDF
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
PDF
Profiling and optimizing go programs
KEY
PDF
Make container without_docker_6-overlay-network_1
PDF
Building an inflight entertainment system controller in twisted
PDF
Node.js Event Loop & EventEmitter
PDF
nouka inventry manager
PDF
Hands-on ethernet driver
PPTX
Laravel Day / Deploy
PDF
Connecting to the network
ODP
Os Cook
PDF
Fluentd v0.12 master guide
PDF
Akmal Khaleeq Waheed - Challenge 3 p2
PDF
One Click Ownage
PDF
Perl6 web-app
PPTX
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
PPTX
Reactive Java (GeeCON 2014)
PPTX
Introduction to Reactive Java
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
Profiling and optimizing go programs
Make container without_docker_6-overlay-network_1
Building an inflight entertainment system controller in twisted
Node.js Event Loop & EventEmitter
nouka inventry manager
Hands-on ethernet driver
Laravel Day / Deploy
Connecting to the network
Os Cook
Fluentd v0.12 master guide
Akmal Khaleeq Waheed - Challenge 3 p2
One Click Ownage
Perl6 web-app
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
Reactive Java (GeeCON 2014)
Introduction to Reactive Java
Ad

Similar to All bugfixes are incompatibilities (20)

PDF
Low Level Exploits
PDF
New features in Ruby 2.5
PPTX
Road to sbt 1.0 paved with server
PDF
Infrastructureascode slideshare-160331143725
PPTX
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
PDF
Infrastructureascode slideshare-160331143725
PDF
Symfony 2 (PHP day 2009)
PDF
Symfony 2.0
PDF
(1) cpp introducing the_cpp_programming_language
PDF
55j7
PPTX
Making Exceptions on Exception Handling (WEH 2012 Keynote Speech)
PDF
Design Summit - Migrating to Ruby 2 - Joe Rafaniello
ODP
Fabric Fast & Furious edition
PDF
The why and how of moving to php 7
PDF
Release responsibly (Maintaining Backwards Compatibility)
KEY
Concurrency in ruby
ODP
TDC2016POA | Trilha Ruby - Stack Level too Deep e Tail Call Optimization: É u...
PDF
Parallel Ruby: Managing the Memory Monster
PDF
Fisl - Deployment
PDF
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Low Level Exploits
New features in Ruby 2.5
Road to sbt 1.0 paved with server
Infrastructureascode slideshare-160331143725
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructureascode slideshare-160331143725
Symfony 2 (PHP day 2009)
Symfony 2.0
(1) cpp introducing the_cpp_programming_language
55j7
Making Exceptions on Exception Handling (WEH 2012 Keynote Speech)
Design Summit - Migrating to Ruby 2 - Joe Rafaniello
Fabric Fast & Furious edition
The why and how of moving to php 7
Release responsibly (Maintaining Backwards Compatibility)
Concurrency in ruby
TDC2016POA | Trilha Ruby - Stack Level too Deep e Tail Call Optimization: É u...
Parallel Ruby: Managing the Memory Monster
Fisl - Deployment
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Ad

More from nagachika t (14)

PDF
Make Ruby Differentiable
PDF
Inspection of CloudML Hyper Parameter Tuning
PDF
Functional Music Composition
PDF
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
PDF
Magellan on Google Cloud Platform
PDF
CRuby Committers Who's Who in 2013
PDF
CRuby_Committers_Whos_Who_in_2014
PDF
怠惰なRubyistへの道 fukuoka rubykaigi01
PPTX
Ruby on azure で game server service
PDF
怠惰なRubyistへの道
PDF
Ruby Kaja のご提案
PDF
Ruby trunk changes 統計版
PDF
Pd Kai#3 Startup Process
PDF
Pd Kai#2 Object Model
Make Ruby Differentiable
Inspection of CloudML Hyper Parameter Tuning
Functional Music Composition
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
Magellan on Google Cloud Platform
CRuby Committers Who's Who in 2013
CRuby_Committers_Whos_Who_in_2014
怠惰なRubyistへの道 fukuoka rubykaigi01
Ruby on azure で game server service
怠惰なRubyistへの道
Ruby Kaja のご提案
Ruby trunk changes 統計版
Pd Kai#3 Startup Process
Pd Kai#2 Object Model

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
sap open course for s4hana steps from ECC to s4
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
Assigned Numbers - 2025 - Bluetooth® Document
sap open course for s4hana steps from ECC to s4
NewMind AI Weekly Chronicles - August'25-Week II
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
gpt5_lecture_notes_comprehensive_20250812015547.pdf
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
A comparative analysis of optical character recognition models for extracting...
Diabetes mellitus diagnosis method based random forest with bat algorithm
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Network Security Unit 5.pdf for BCA BBA.

All bugfixes are incompatibilities

  • 1. 2019-04-19 All bug-fixes are incompatibilities nagachika @ RubyKaigi 2019
  • 2. Important Notification about RubyGems.org The attackers try to hijack your account with compromised password list. Example: bootstrap-sass was compromised by this attack. It was injected the vulnerable RCE code. We should prepare the multi-factor authentication on RubyGems.org for protecting from them.
  • 3. ✤ @nagachika ✤ CRuby committer ✤ CRuby stable branch maintainer (2.5 → 2.6) ✤ ruby trunk changes ✤ Fukuoka.rb/TFUG Fukuoka WHO AM I
  • 4. ✤ @nagachika ✤ CRuby committer ✤ CRuby stable branch maintainer (2.5 → 2.6) ✤ ruby trunk changes ✤ Fukuoka.rb/TFUG Fukuoka WHO AM I
  • 5. “What’s the Ruby’s
 stable branch maintenance?”
  • 6. ✤ We backport fixes into stable branches from trunk Ruby’s stable branch model EoL ruby_2_2 ruby_2_5 ruby_2_6 backport trunk bugfix
  • 7. ✤ We backport fixes into stable branches from trunk Ruby’s stable branch model nurse unak Release
 Manager Stable
 Branch
 Maintainer EoL ruby_2_2 ruby_2_5 ruby_2_6 backport trunk bugfix nagachika
  • 8. ✤ Backport bug-fixes from trunk into stable branches ✤ Release stable packages. ✤ Handle security issues in concert with stakeholders. Stable Branch Maintainer
  • 9. ✤ Backport bug-fixes from trunk into stable branches ✤ Release stable packages ✤ Handle security issues in concert with stakeholders Stable Branch Maintainer
  • 10. ✤ Watch commits on trunk. ✤ Backport bug-fixes. Stable Branch Maintainer’s daily work
  • 11. ✤ Watch commits on trunk
 → Watch backport requests on Redmine. ✤ Backport bug-fixes. Stable Branch Maintainer’s daily work
  • 12. ✤ Redmine: bugs.ruby-lang.org Ruby’s stable maintenance policy
  • 13. ✤ File tickets with rubyʼs version information Ruby’s stable maintenance policy
  • 14. ✤ You can maintain only one stable branch at once. Ruby’s stable branch model nurse nagachika unak Release
 Manager Stable
 Branch
 Maintainer EoL ruby_2_2 ruby_2_5 ruby_2_6 backport trunk bugfix
  • 15. “How can I become a Ruby stable maintainer?”
  • 16. Requirements for Stable Branch Maintainers
  • 17. ✤ Wide understandings for the Ruby implementation ✤ Sustainability to some extent ✤ Understanding maintenance policy Requirements for Stable Branch Maintainers
  • 18. ✤ Backport bug-fixes ✤ Donʼt backport new features/spec changes Ruby’s maintenance policy stable trunk bug-fix new feature
  • 19. IO.read could execute a command IO.read(“|cmd…”) executes the command (same as Kernel#open)
  • 22. % ruby -ve 'puts File.read("|echo foo")' ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15] foo % ruby -ve 'puts File.read("|echo foo")' ruby 2.5.4p155 (2019-03-13 revision 67245) [x86_64-darwin15] -e:1: warning: IO.read called on File to invoke external command foo % ruby -ve 'puts File.read("|echo foo")' ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin15] Traceback (most recent call last): 1: from -e:1:in `<main>' -e:1:in `read': No such file or directory @ rb_sysopen - |echo foo (Errno::ENOENT) IO.read and File.read
  • 23. ✤ 2.0.0: 469 ✤ 2.1: 250 ✤ 2.2: 205 ✤ 2.3: 217 ✤ 2.4: 190 ✤ 2.5: 101 Backport commits by nagachika
  • 24. ✤ 2.0.0: 469 ✤ 2.1: 250 ✤ 2.2: 205 ✤ 2.3: 217 ✤ 2.4: 190 ✤ 2.5: 101 Backport commits by nagachika include Documentation, performance improvement, memory usage improvement…
  • 28. ✤ The change broke CI on mswin Backport performance improvements
  • 29. ✤ The lesson learned ✤ Donʼt backport performance improvements Backport performance improvements
  • 33. ✤ The lesson learned ✤ Bug-fixes for Method/Constants search in edge cases sometimes introduce another memory violation. ✤ Fixing a minor bug can introduce severe bugs Backport introduced memory violation
  • 36. ✤ The lesson learned ✤ “Refinements” is not a matured feature and continue expanding its scope of adaptation. ✤ Deal it carefully. Refinements
  • 37. Fixing SyntaxError caused another SyntaxError
  • 38. Fixing SyntaxError caused another SyntaxError
  • 39. Fixing SyntaxError caused another SyntaxError
  • 40. cond ? expr1 :expr2 Fixing SyntaxError caused another SyntaxError { key:(expr rescue nil) } { key:<<EOF } EOF
  • 41. ✤ The lesson learned ✤ parse.y is “魔境” (mass of legendary complexity) ✤ SyntaxError is the one of the most severe issues ✤ Monkey patching cannot get rid of SyntaxError Fixing SyntaxError caused another SyntaxError
  • 42. Fixing SyntaxError caused another SyntaxError(2)
  • 43. Fixing SyntaxError caused another SyntaxError(2)
  • 44. Fixing SyntaxError caused another SyntaxError(2)
  • 45. def foo key1: … end Fixing SyntaxError caused another SyntaxError(2) { key:if foo then 1 else 0 }
  • 46. ✤ The lesson learned(?) ✤ Fixing the SyntaxError introduced another SyntaxError in the more rare case ✤ But the prior SyntaxError was in the new syntax
 (Mandatory keyword arguments) ✤ There was maybe no real application affected by the prior SyntaxError. Fixing SyntaxError caused another SyntaxError(2)
  • 47. Fixing SyntaxError caused another SyntaxError(3)
  • 48. Fixing SyntaxError caused another SyntaxError(3)
  • 49. Fixing SyntaxError caused another SyntaxError(3)
  • 50. ✤ The lesson learned ✤ parse.y is “魔境” ✤ Long-standing bugs have less priority
 → “Long-standing” means thereʼs no real application affected ✤ “Known bug” can be better than “Regression” Fixing SyntaxError caused another SyntaxError(3)
  • 52. ✤ Release GVL during open fd for `load` Load FIFO
  • 53. ✤ Performance degradation of YAML.parse on
 multi-threads environments Load FIFO
  • 54. ✤ The lesson learned ✤ Donʼt backport bug-fixes for imaginary use case.
 No one wanted to load from FIFO! Load FIFO
  • 55. ✤ Donʼt backport performance improvements ✤ Donʼt backport fix for the long-standing bugs ✤ Donʼt jump at the fix in parse.y, constants/ methods search and refinements ✤ Donʼt backport fixes on one wanted to backport The Lessons Learned from failures
  • 56. ✤ Be-Practical! The Lessons Learned from failures