SlideShare a Scribd company logo
Elite Bug Squashing
Elite Bug Squashing
Technical Director, Space 48
@Tonegolf71
@Space48ers
Tony Brown
Mage Titans UK – Developer Conference
10th November 2018
@MageTitans
Tony Brown
Cache corruption
Randomly occurring, site down
Random cache corruption
• A pre-launch Magento 2 site
• Would randomly end up with exceptions
• The site would be unavailable until…
• …a cache clear would resolve the issue
Random cache corruption
• A pre-launch Magento 2 site
• Would randomly end up with exceptions
• The site would be unavailable until…
• …a cache clear would resolve the issue
Where do you begin?
Level 1
Finding your debugging feet
Debugging starts on day 1
• Debugging is an integral part of coding
• I started with 20% coding, 80% debugging
• We should strive for the opposite!
Types of debugging
• Bugs during development
• Bugs that are “live”
– Feature broken
– Performance issues
– Site down
Impact of bugs
• The further along the development lifecycle that bugs appear, the
greater the impact.
Level 1 Tooling
• Echo / var_dump / print_r … die()
Level 1 Strategy: Research
• The majority of problems you will face have been solved already.
Level 1 Strategy: Research
• The majority of problems you will face have been solved already.
• Opensource community rocks!
– Stack exchange
– Forums
– Github
– Contribute if you can!
Level 1 Strategy: Ask your peers
• You shouldn’t be fearful of leaning on your team
Level 1 Strategy: Ask your peers
• You shouldn’t be fearful of leaning on your team
• Articulating a problem (even to someone non-technical) can result
in your brain sparking off new ideas
– They may have ideas or even the solution!
Random cache corruption
• Google revealed it to be a config cache issue
– But the recommended resolution didn’t apply
Random cache corruption
• Google revealed it to be a config cache issue
– But the recommended resolution didn’t apply
• No-one in the team had seen the issue before
Random cache corruption
• Google revealed it to be a config cache issue
– But the recommended resolution didn’t apply
• No-one in the team had seen the issue before
• Collaboration did happen, which accelerated progress
Level 2
Walking the debugging walk
Level 2 Tooling
• Logging
Level 2 Tooling
• Logging
Why is the hard drive nearly full?!
Level 2 Tooling
• Logging
• Advanced local environments
Level 2 Tooling
• Logging
• Advanced local environments
• Monitoring - New Relic
Level 2 Tooling
• Logging
• Advanced local environments
• Monitoring - New Relic
• Profiling – Blackfire
Level 2 Strategy
• Can I replicate the issue?
Level 2 Strategy
• Can I replicate the issue?
• What has changed?
Level 2 Strategy
• Can I replicate the issue?
• What has changed?
• Are there any errors?
Level 2 Strategy
• Can I replicate the issue?
• What has changed?
• Are there any errors?
• Eliminate as much as possible at each step
Level 2 Strategy
• Can I replicate the issue?
• What has changed?
• Are there any errors?
• Eliminate as much as possible at each step
• Protect through process:
– Code Reviews
– QA Function
– Automated tests where possible
Random cache corruption
• Couldn’t replicate it locally
Random cache corruption
• Couldn’t replicate it locally
• What had changed?
– Recently gone to multi-server setup
Single-server setup
Cluster
RedisDB
Servers
Pre-
prod
Load Balancer
Multi-server setup
Cluster
RedisDB
Servers
Web 1 Web 3Web 2 Admin
Load Balancer
Random cache corruption
• Couldn’t replicate it locally
• What had changed?
– Recently gone to multi-server setup
• Eliminate as much as possible
– When set to single server, the issue disappeared
Multi-server setup (restricted)
Cluster
RedisDB
Servers
Web 1 Web 3Web 2 Admin
Load Balancer
Random cache corruption
• Couldn’t replicate it locally
• What had changed?
– Recently gone to multi-server setup
• Eliminate as much as possible
– When set to single server, the issue disappeared
• Put logging in place to capture state
– Found that the config cache was getting zapped repeatedly
Level 3
Clear vision and prevention
Level 3 Tooling
• Xdebug
Level 3 Tooling
• Xdebug
• Static analysis for quality / best practice
– Mess Detector, Copy paste detector
Level 3 Strategy
• Defensive Programming
Level 3 Strategy
• Defensive Programming
• Conscious structure of code
– SOLID principles
Level 3 Strategy
• Defensive Programming
• Conscious structure of code
– SOLID principles
• Tight feedback loops
Level 3 Strategy: Culture of learning – Reduce FEAR!
• Mistakes and failures are learning opportunities
• Ensure people understand they will be supported
• Put in place processes to reduce risk and protect people
• Actively encourage people to seek improvements
Random cache corruption
• Used Xdebug to find it was a 3rd party module zapping the cache
Random cache corruption
• Used Xdebug to find it was a 3rd party module zapping the cache
• Used Redis Monitor to observe the config cache being written to
– This revealed that when it was written to with bad data, it always
came from the admin IP address
Random cache corruption
• Used Xdebug to find it was a 3rd party module zapping the cache
• Used Redis Monitor to observe the config cache being written to
– This revealed that when it was written to with bad data, it always
came from the admin IP address
The old pre-production environment still existed!
Multi-server setup
Cluster
RedisDB
Servers
Web 1 Web 3Web 2 Admin
Load Balancer
Multi-server setup (pre-prod!!)
Cluster
RedisDB
Servers
Web 1 Web 3Web 2 Admin
Load Balancer
Pre-prod
Bonus Level
Increasing efficiency
Bonus Level: The Pomodoro Technique
• 25 minute cycles
Bonus Level: The Pomodoro Technique
• 25 minute cycles
• At each break, question progress and approach
Bonus Level: The Pomodoro Technique
• 25 minute cycles
• At each break, question progress and approach
• Encourages focus and reduces chances of going “down the rabbit
hole”
Thank you!
• Any Questions?
Manchester
10th November 2018
@MageTitans
@tonegolf71

More Related Content

ODP
Give A Great Tech Talk 2013
PDF
Live Testing A Legacy App
PDF
“Sensu and Sensibility” - The Story of a Journey From #monitoringsucks to #mo...
PPTX
Outsmarting Merge Edge Cases in Component Based Design
PPTX
Code Yellow: Helping Operations Top-Heavy Teams the Smart Way
PPTX
Don't Mind the Gap by Galen Emery
PPTX
FUEL_USERS_GROUP
PPTX
Why Does (My) Monitoring Suck?
Give A Great Tech Talk 2013
Live Testing A Legacy App
“Sensu and Sensibility” - The Story of a Journey From #monitoringsucks to #mo...
Outsmarting Merge Edge Cases in Component Based Design
Code Yellow: Helping Operations Top-Heavy Teams the Smart Way
Don't Mind the Gap by Galen Emery
FUEL_USERS_GROUP
Why Does (My) Monitoring Suck?

What's hot (19)

PDF
Habits of a Responsible Programmer
PDF
Continuous Deployment: Beyond Continuous Delivery
PPTX
DevOps & Security: Here & Now
PPTX
Five Cliches of Online Game Development
PDF
Debugging distributed systems
PDF
The 5 Minute MySQL DBA
PDF
It Sounded Good on Paper - Lessons Learned with Puppet
PPTX
Oscp - Journey
PDF
Attack-driven defense
PPTX
The Hard Problems of Continuous Deployment
PPTX
Stop Feeding IBM i Performance Hogs - Robot
KEY
Continuous Integration, the minimum viable product
PPTX
Long Life Software
PPTX
Magento Live UK Nexcess Performance & Security Session
PPTX
Continuous Deployment
PDF
Effective approaches to web application security
PDF
Continuous Deployment: The Dirty Details
PDF
Scaling a Web Site - OSCON Tutorial
PPTX
Programs you need!
Habits of a Responsible Programmer
Continuous Deployment: Beyond Continuous Delivery
DevOps & Security: Here & Now
Five Cliches of Online Game Development
Debugging distributed systems
The 5 Minute MySQL DBA
It Sounded Good on Paper - Lessons Learned with Puppet
Oscp - Journey
Attack-driven defense
The Hard Problems of Continuous Deployment
Stop Feeding IBM i Performance Hogs - Robot
Continuous Integration, the minimum viable product
Long Life Software
Magento Live UK Nexcess Performance & Security Session
Continuous Deployment
Effective approaches to web application security
Continuous Deployment: The Dirty Details
Scaling a Web Site - OSCON Tutorial
Programs you need!
Ad

Similar to Elite Bug Squashing (20)

PPTX
Flight checks -QA for Releases that Prevent Disasters from Escaping into the ...
PDF
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
PDF
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
PDF
Become a Better Developer with Debugging Techniques for Drupal (and more!)
PPTX
Cleaning Code - Tools and Techniques for Large Legacy Projects
PDF
Working Effectively with Legacy Code
PDF
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
PDF
From NASA to Startups to Big Commerce
PPTX
Rational User Group - May 2014 Stockholm - DevOps from an EA perspective
PPTX
SOFTWARE MAINTENANCE -2
PPTX
Resolving problems & high availability
PDF
Masters Academy workshop QA best practices
PPT
All Apps, What About Suport
PPTX
PuppetConf2012GeneKim
PPTX
Debugging Effectively
PDF
Agile Technical Leadership
PDF
Top 7 problems working with corporations
PPTX
Automation and Technical Debt
PDF
Old Code, New Tricks
PPTX
Debugging Effectively - Frederick Web Tech 9/6/16
Flight checks -QA for Releases that Prevent Disasters from Escaping into the ...
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
Code Camp NYC 2017 - How to deal with everything... | Chris Ozog - Codesushi
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Cleaning Code - Tools and Techniques for Large Legacy Projects
Working Effectively with Legacy Code
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
From NASA to Startups to Big Commerce
Rational User Group - May 2014 Stockholm - DevOps from an EA perspective
SOFTWARE MAINTENANCE -2
Resolving problems & high availability
Masters Academy workshop QA best practices
All Apps, What About Suport
PuppetConf2012GeneKim
Debugging Effectively
Agile Technical Leadership
Top 7 problems working with corporations
Automation and Technical Debt
Old Code, New Tricks
Debugging Effectively - Frederick Web Tech 9/6/16
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Programs and apps: productivity, graphics, security and other tools
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
MYSQL Presentation for SQL database connectivity

Elite Bug Squashing

Editor's Notes

  • #6: Maybe add bug images?
  • #32: Need to split these when happy
  • #33: Need to split these when happy
  • #36: Need to split these when happy
  • #38: Need to split these when happy