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)

PPT
Technical track-afterimaging Progress Database
PPTX
Pentest Apocalypse
PDF
Preventing and Resolving MySQL Downtime
PPTX
Pentest Apocalypse - SANSFIRE 2016 Edition
PPTX
Static Code Analysis PHP[tek] 2023
PPTX
Lab: JVM Production Debugging 101
PPTX
Kscope 2013 delphix
PDF
Into The Box 2020 Keynote Day 1
PPTX
Ohio 2012-help-sysad-out
PPTX
Taking Database Development to the 21st Century
PPTX
Case Study of the Unexplained
PDF
PAC 2019 virtual Christoph NEUMÜLLER
PDF
Releasing To Production Every Week India
PDF
MySQL Infrastructure Testing Automation at GitHub
PDF
Common Challenges in DevOps Change Management
PPTX
Continuous feature-development
PDF
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
PPTX
Scalability
PDF
Ask a Malware Archaeologist
PDF
Puppet Development Workflow
Technical track-afterimaging Progress Database
Pentest Apocalypse
Preventing and Resolving MySQL Downtime
Pentest Apocalypse - SANSFIRE 2016 Edition
Static Code Analysis PHP[tek] 2023
Lab: JVM Production Debugging 101
Kscope 2013 delphix
Into The Box 2020 Keynote Day 1
Ohio 2012-help-sysad-out
Taking Database Development to the 21st Century
Case Study of the Unexplained
PAC 2019 virtual Christoph NEUMÜLLER
Releasing To Production Every Week India
MySQL Infrastructure Testing Automation at GitHub
Common Challenges in DevOps Change Management
Continuous feature-development
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Scalability
Ask a Malware Archaeologist
Puppet Development Workflow
Ad

Recently uploaded (20)

PDF
sbt 2.0: go big (Scala Days 2025 edition)
DOCX
search engine optimization ppt fir known well about this
PPTX
Configure Apache Mutual Authentication
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Flame analysis and combustion estimation using large language and vision assi...
sbt 2.0: go big (Scala Days 2025 edition)
search engine optimization ppt fir known well about this
Configure Apache Mutual Authentication
Statistics on Ai - sourced from AIPRM.pdf
Rapid Prototyping: A lecture on prototyping techniques for interface design
Improvisation in detection of pomegranate leaf disease using transfer learni...
Data Virtualization in Action: Scaling APIs and Apps with FME
Training Program for knowledge in solar cell and solar industry
Co-training pseudo-labeling for text classification with support vector machi...
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Advancing precision in air quality forecasting through machine learning integ...
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
4 layer Arch & Reference Arch of IoT.pdf
Convolutional neural network based encoder-decoder for efficient real-time ob...
The influence of sentiment analysis in enhancing early warning system model f...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
sustainability-14-14877-v2.pddhzftheheeeee
Flame analysis and combustion estimation using large language and vision assi...

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