SlideShare a Scribd company logo
Submit Search
Upload
A toolbelt of seasoned bug hunter - Damir Zekic
Report
Share
Ruby Meditation
Ruby Meditation
Follow
•
0 likes
•
230 views
1
of
52
A toolbelt of seasoned bug hunter - Damir Zekic
•
0 likes
•
230 views
Report
Share
Download Now
Download to read offline
Technology
Video: https://youtu.be/So9ft63WVLY Ruby Meditation #19 November 25, 2017 Kyiv
Read more
Ruby Meditation
Ruby Meditation
Follow
Recommended
An Introduction to PHP Dependency Management With Composer by
An Introduction to PHP Dependency Management With Composer
Oomph, Inc.
3.6K views
•
29 slides
Introduction to ansible by
Introduction to ansible
Javier Arturo Rodríguez
199 views
•
46 slides
How about Gradle? by
How about Gradle?
Yasuharu Nakano
2.3K views
•
26 slides
Python Workshop by Tom Frantz by
Python Workshop by Tom Frantz
Prottay Karim
201 views
•
53 slides
DOD 2016 - Tomasz Torcz - The Song of JBoss and Chef by
DOD 2016 - Tomasz Torcz - The Song of JBoss and Chef
PROIDEA
115 views
•
37 slides
10 reasons to love CoffeeScript by
10 reasons to love CoffeeScript
Lukas Alexandre
829 views
•
14 slides
More Related Content
What's hot
Fizz and buzz of computer programs in python. by
Fizz and buzz of computer programs in python.
Esehara Shigeo
2.5K views
•
55 slides
Clojure入門 by
Clojure入門
Naoyuki Kakuda
5K views
•
52 slides
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015) by
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
Ozh
37.6K views
•
100 slides
Asynchronous PHP and Real-time Messaging by
Asynchronous PHP and Real-time Messaging
Steve Rhoades
19.2K views
•
45 slides
Introduction to Nim by
Introduction to Nim
Fred Heath
1.2K views
•
33 slides
t3chfest 2015 - Zoe in 30 minutes by
t3chfest 2015 - Zoe in 30 minutes
David Muñoz Díaz
1.5K views
•
23 slides
What's hot
(14)
Fizz and buzz of computer programs in python. by Esehara Shigeo
Fizz and buzz of computer programs in python.
Esehara Shigeo
•
2.5K views
Clojure入門 by Naoyuki Kakuda
Clojure入門
Naoyuki Kakuda
•
5K views
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015) by Ozh
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
Ozh
•
37.6K views
Asynchronous PHP and Real-time Messaging by Steve Rhoades
Asynchronous PHP and Real-time Messaging
Steve Rhoades
•
19.2K views
Introduction to Nim by Fred Heath
Introduction to Nim
Fred Heath
•
1.2K views
t3chfest 2015 - Zoe in 30 minutes by David Muñoz Díaz
t3chfest 2015 - Zoe in 30 minutes
David Muñoz Díaz
•
1.5K views
Troubleshooting Puppet by Thomas Howard Uphill
Troubleshooting Puppet
Thomas Howard Uphill
•
294 views
He 74 a-thltht-lãxuântâm-11tlt by laonap166
He 74 a-thltht-lãxuântâm-11tlt
laonap166
•
69 views
Vidoop CouchDB Talk by Chris Anderson
Vidoop CouchDB Talk
Chris Anderson
•
658 views
Hotspot tools by SEA Tecnologia
Hotspot tools
SEA Tecnologia
•
1.2K views
#safaDojo - Coding Dojo Go lang by Marcelo Andrade
#safaDojo - Coding Dojo Go lang
Marcelo Andrade
•
5.3K views
Rabia by university of Gujrat, pakistan
Rabia
university of Gujrat, pakistan
•
39 views
Top 28 programming language with hello world for artificial intelligence by AL- AMIN
Top 28 programming language with hello world for artificial intelligence
AL- AMIN
•
216 views
Sayoo odoo open_erp by AmineArrahmane Achargui
Sayoo odoo open_erp
AmineArrahmane Achargui
•
805 views
Similar to A toolbelt of seasoned bug hunter - Damir Zekic
Boxen: How to Manage an Army of Laptops and Live to Talk About It by
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Puppet
2.6K views
•
152 slides
Naughty And Nice Bash Features by
Naughty And Nice Bash Features
Nati Cohen
1.1K views
•
45 slides
Your Library Sucks, and why you should use it. by
Your Library Sucks, and why you should use it.
Peter Higgins
3.3K views
•
38 slides
Boxen: How to Manage an Army of Laptops by
Boxen: How to Manage an Army of Laptops
Puppet
19.1K views
•
166 slides
x86 & PE by
x86 & PE
Ange Albertini
7.3K views
•
75 slides
Bugs from Outer Space | while42 SF #6 by
Bugs from Outer Space | while42 SF #6
While42
1.1K views
•
41 slides
Similar to A toolbelt of seasoned bug hunter - Damir Zekic
(20)
Boxen: How to Manage an Army of Laptops and Live to Talk About It by Puppet
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Puppet
•
2.6K views
Naughty And Nice Bash Features by Nati Cohen
Naughty And Nice Bash Features
Nati Cohen
•
1.1K views
Your Library Sucks, and why you should use it. by Peter Higgins
Your Library Sucks, and why you should use it.
Peter Higgins
•
3.3K views
Boxen: How to Manage an Army of Laptops by Puppet
Boxen: How to Manage an Army of Laptops
Puppet
•
19.1K views
x86 & PE by Ange Albertini
x86 & PE
Ange Albertini
•
7.3K views
Bugs from Outer Space | while42 SF #6 by While42
Bugs from Outer Space | while42 SF #6
While42
•
1.1K views
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has... by Ange Albertini
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Ange Albertini
•
2.1K views
Hacking OOo 2.0 by Alexandro Colorado
Hacking OOo 2.0
Alexandro Colorado
•
845 views
Open shift by marcolof
Open shift
marcolof
•
1.7K views
ooc - A hybrid language experiment by Amos Wenger
ooc - A hybrid language experiment
Amos Wenger
•
1.2K views
ooc - A hybrid language experiment by Amos Wenger
ooc - A hybrid language experiment
Amos Wenger
•
234 views
Shifting gears with Composer by Javier López
Shifting gears with Composer
Javier López
•
1.1K views
The Fuzzing Project - 32C3 by hannob
The Fuzzing Project - 32C3
hannob
•
1.7K views
Raspberry Pi for IPRUG by Frank Carver
Raspberry Pi for IPRUG
Frank Carver
•
885 views
Monitoring MongoDB (MongoSV) by Boxed Ice
Monitoring MongoDB (MongoSV)
Boxed Ice
•
2K views
A Partial Multiverse Model of Time Travel for Debugging by awwaiid
A Partial Multiverse Model of Time Travel for Debugging
awwaiid
•
703 views
Killer Bugs From Outer Space by Jérôme Petazzoni
Killer Bugs From Outer Space
Jérôme Petazzoni
•
3.4K views
Exploring the Internet of Things Using Ruby by Mike Hagedorn
Exploring the Internet of Things Using Ruby
Mike Hagedorn
•
2.5K views
Assembler by Mario Granja Alvear
Assembler
Mario Granja Alvear
•
268 views
Biicode OpenExpoDay by fcofdezc
Biicode OpenExpoDay
fcofdezc
•
625 views
More from Ruby Meditation
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30 by
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Ruby Meditation
207 views
•
22 slides
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky... by
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Ruby Meditation
462 views
•
141 slides
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29 by
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Ruby Meditation
210 views
•
49 slides
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ... by
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Ruby Meditation
1.6K views
•
59 slides
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 by
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
Ruby Meditation
366 views
•
23 slides
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28 by
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
Ruby Meditation
459 views
•
20 slides
More from Ruby Meditation
(20)
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30 by Ruby Meditation
Is this Legacy or Revenant Code? - Sergey Sergyenko | Ruby Meditation 30
Ruby Meditation
•
207 views
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky... by Ruby Meditation
Life with GraphQL API: good practices and unresolved issues - Roman Dubrovsky...
Ruby Meditation
•
462 views
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29 by Ruby Meditation
Where is your license, dude? - Viacheslav Miroshnychenko | Ruby Meditation 29
Ruby Meditation
•
210 views
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ... by Ruby Meditation
Dry-validation update. Dry-validation vs Dry-schema 1.0 - Aleksandra Stolyar ...
Ruby Meditation
•
1.6K views
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28 by Ruby Meditation
How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28
Ruby Meditation
•
366 views
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28 by Ruby Meditation
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
Ruby Meditation
•
459 views
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh... by Ruby Meditation
Reinventing the wheel - why do it and how to feel good about it - Julik Tarkh...
Ruby Meditation
•
462 views
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby... by Ruby Meditation
Performance Optimization 101 for Ruby developers - Nihad Abbasov (ENG) | Ruby...
Ruby Meditation
•
475 views
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio... by Ruby Meditation
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Ruby Meditation
•
320 views
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or... by Ruby Meditation
The Trailblazer Ride from the If Jungle into a Civilised Railway Station - Or...
Ruby Meditation
•
285 views
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27 by Ruby Meditation
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
Ruby Meditation
•
1.1K views
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26 by Ruby Meditation
New features in Rails 6 - Nihad Abbasov (RUS) | Ruby Meditation 26
Ruby Meditation
•
577 views
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26 by Ruby Meditation
Security Scanning Overview - Tetiana Chupryna (RUS) | Ruby Meditation 26
Ruby Meditation
•
299 views
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (... by Ruby Meditation
Teach your application eloquence. Logs, metrics, traces - Dmytro Shapovalov (...
Ruby Meditation
•
455 views
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26 by Ruby Meditation
Best practices. Exploring - Ike Kurghinyan (RUS) | Ruby Meditation 26
Ruby Meditation
•
204 views
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25 by Ruby Meditation
Road to A/B testing - Alexey Vasiliev (ENG) | Ruby Meditation 25
Ruby Meditation
•
577 views
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita... by Ruby Meditation
Concurrency in production. Real life example - Dmytro Herasymuk | Ruby Medita...
Ruby Meditation
•
511 views
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me... by Ruby Meditation
Data encryption for Ruby web applications - Dmytro Shapovalov (RUS) | Ruby Me...
Ruby Meditation
•
299 views
Rails App performance at the limit - Bogdan Gusiev by Ruby Meditation
Rails App performance at the limit - Bogdan Gusiev
Ruby Meditation
•
418 views
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23 by Ruby Meditation
GDPR. Next Y2K in 2018? - Anton Tkachov | Ruby Meditation #23
Ruby Meditation
•
179 views
Recently uploaded
Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma
17 views
•
1 slide
Report 2030 Digital Decade by
Report 2030 Digital Decade
Massimo Talia
14 views
•
41 slides
20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf
Phactum Softwareentwicklung GmbH
28 views
•
73 slides
Roadmap to Become Experts.pptx by
Roadmap to Become Experts.pptx
dscwidyatamanew
11 views
•
45 slides
Combining Orchestration and Choreography for a Clean Architecture by
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs1
69 views
•
24 slides
Java Platform Approach 1.0 - Picnic Meetup by
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver
25 views
•
39 slides
Recently uploaded
(20)
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma
•
17 views
Report 2030 Digital Decade by Massimo Talia
Report 2030 Digital Decade
Massimo Talia
•
14 views
20231123_Camunda Meetup Vienna.pdf by Phactum Softwareentwicklung GmbH
20231123_Camunda Meetup Vienna.pdf
Phactum Softwareentwicklung GmbH
•
28 views
Roadmap to Become Experts.pptx by dscwidyatamanew
Roadmap to Become Experts.pptx
dscwidyatamanew
•
11 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs1
•
69 views
Java Platform Approach 1.0 - Picnic Meetup by Rick Ossendrijver
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver
•
25 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi
•
120 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdf
madhurjyapb
•
12 views
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... by NUS-ISS
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
NUS-ISS
•
34 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab
•
15 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course 2023
Ivory Egg
•
14 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS
•
28 views
How the World's Leading Independent Automotive Distributor is Reinventing Its... by NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS
•
15 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta
•
15 views
The Research Portal of Catalonia: Growing more (information) & more (services) by CSUC - Consorci de Serveis Universitaris de Catalunya
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya
•
73 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS
•
16 views
Future of Learning - Yap Aye Wee.pdf by NUS-ISS
Future of Learning - Yap Aye Wee.pdf
NUS-ISS
•
41 views
AI: mind, matter, meaning, metaphors, being, becoming, life values by Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life values
Twain Liu 刘秋艳
•
35 views
Throughput by Moisés Armani Ramírez
Throughput
Moisés Armani Ramírez
•
36 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst
•
470 views
A toolbelt of seasoned bug hunter - Damir Zekic
1.
A Toolbelt of a
Seasoned Bug Hunter Damir Zekić
3.
(["foo")
4.
Baaaad bugs Not
so bad bugs
5.
Silent bugs Loud
bugs
6.
2016: a debugging odyssey
8.
Step 1: Reproduce
9.
Step 1: Reproduce SUCCESS
10.
Step 2: What
introduced it?
11.
git bisect
12.
13 37 c0
ff ee c0 de a0
13.
13 37 c0
ff ee c0 de a0 bug is present here "bad"
14.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
15.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
16.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
17.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
18.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
19.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
20.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
21.
13 37 c0
ff ee c0 de a0 bug is present here "bad" no bug 7 commits ago "good"
22.
13 37 c0
ff ee c0 de a0 cli-ff-hanger
24.
Every commit must
be stable
25.
But, which commit was
"good"?!
26.
13 37 c0
ff ee c0 de a0 no bug 7 commits ago "good"
27.
$ ./find_slow.rb
29.
Step 2: What
introduced it? UNSURE
30.
Brainstorming: Is it a
memory leak?
31.
A Problem: Ruby doesn't
release memory back to OS
32.
Brainstorming: Is it a
memory leak?UNSURE
33.
Assume it is and
check heap dumps
35.
require 'objspace' ObjectSpace.trace_object_allocations_start class Foo def
bar puts "Hello, world!" end end foo = Foo.new foo.bar file = File.open("/tmp/heap.dump", 'w') ObjectSpace.dump_all(output: file) file.close
36.
$ wc -l
/tmp/heap.dump 33297 /tmp/heap.dump
37.
{"address":"0x7f9fa7076ea0", "type":"STRING", "class":"0x7f9fa70cfe10",
"embedded":true, "bytesize":13, "value":"Hello, world!", "encoding":"UTF-8", "file":"(irb)", "line":5, "method":"bar", "generation":13, "memsize":40, "flags": {"wb_protected":true}} {"address":"0x7f9fa7076ec8", "type":"IMEMO", "class":"0x7f9fa70dc2f0", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076ef0", "type":"IMEMO", "references":["0x7f9fa70dd4e8"], "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076f18", "type":"STRING", "class":"0x7f9fa70cfe10", "frozen":true, "embedded":true, "fstring":true, "bytesize":5, "value":"abort", "encoding":"US-ASCII", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076f40", "type":"STRING", "class":"0x7f9fa70cfe10", "frozen":true, "bytesize":59, "capacity":127, "value":"/Users/damir/.rbenv/versions/2.4.1/lib/ruby/x86_64-darwin16", "memsize":168, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076f68", "type":"IMEMO", "class":"0x7f9fa70dc2f0", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076f90", "type":"IMEMO", "references":["0x7f9fa70dd4e8"], "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076fb8", "type":"IMEMO", "class":"0x7f9fa70dc2f0", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7076fe0", "type":"IMEMO", "references":["0x7f9fa70dd4e8"], "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7077008", "type":"IMEMO", "class":"0x7f9fa70dc2f0", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7077030", "type":"IMEMO", "references":["0x7f9fa70dd4e8"], "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} {"address":"0x7f9fa7077058", "type":"STRING", "class":"0x7f9fa70cfe10", "frozen":true, "embedded":true, "fstring":true, "bytesize":5, "value":"spawn", "encoding":"US-ASCII", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}}
38.
{"address":"0x7f9fa7076ea0", "type":"STRING", "class":"0x7f9fa70cfe10", "embedded":true, "bytesize":13, "value":"Hello, world!", "encoding":"UTF-8", "file":"(irb)", "line":5, "method":"bar", "generation":13, "memsize":40, "flags":{"wb_protected":true}}
39.
$ gem install
heapy
40.
$ ./analyze_heapy_diffs.rb
41.
Class DSL objects survive
longest
42.
!
43.
Brainstorming: Let's trace a
call stack
44.
Flamegraphs
49.
Brainstorming: Let's trace a
call stackSUCCESS
50.
Internal framework creates
controllers Classes created by routing don't get destroyed Router removes methods from all controllers
51.
Now let's fix
it!