SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Introduction
Detecting segfaults
      Devel::Trace
               gdb
          Devel::bt
          The End




   Hunting segfaults
           for beginners


            Uwe V¨lker
                 o

                XING AG


           August 2012




       Uwe V¨lker
            o         Hunting segfaults
Introduction
                     Detecting segfaults
                           Devel::Trace
                                    gdb
                               Devel::bt
                               The End




1   Introduction

2   Detecting segfaults

3   Devel::Trace

4   gdb

5   Devel::bt

6   The End


                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           What is a segfault?
                           Devel::Trace
                                           Examples - C
                                    gdb
                                           Examples - Perl
                               Devel::bt
                               The End



1   Introduction
       What is a segfault?
       Examples - C
       Examples - Perl

2   Detecting segfaults

3   Devel::Trace

4   gdb

5   Devel::bt

6   The End
                             Uwe V¨lker
                                  o        Hunting segfaults
Introduction
                    Detecting segfaults
                                          What is a segfault?
                          Devel::Trace
                                          Examples - C
                                   gdb
                                          Examples - Perl
                              Devel::bt
                              The End


What is a segfault?



      segfault = segmentation fault




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                    Detecting segfaults
                                          What is a segfault?
                          Devel::Trace
                                          Examples - C
                                   gdb
                                          Examples - Perl
                              Devel::bt
                              The End


What is a segfault?



      segfault = segmentation fault
      every process has memory pages
      these pages are mapped to physical memory




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           What is a segfault?
                           Devel::Trace
                                           Examples - C
                                    gdb
                                           Examples - Perl
                               Devel::bt
                               The End


What is a segfault?



      segfault = segmentation fault
      every process has memory pages
      these pages are mapped to physical memory
      if you try to access an invalid address
      (or write to a protected address)




                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           What is a segfault?
                           Devel::Trace
                                           Examples - C
                                    gdb
                                           Examples - Perl
                               Devel::bt
                               The End


What is a segfault?



      segfault = segmentation fault
      every process has memory pages
      these pages are mapped to physical memory
      if you try to access an invalid address
      (or write to a protected address)
      BOOOM!




                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           What is a segfault?
                           Devel::Trace
                                           Examples - C
                                    gdb
                                           Examples - Perl
                               Devel::bt
                               The End


Examples - C




     using uninitialized pointers
     dereferencing NULL pointers
     using ”freed” pointers




                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                      Detecting segfaults
                                            What is a segfault?
                            Devel::Trace
                                            Examples - C
                                     gdb
                                            Examples - Perl
                                Devel::bt
                                The End


Examples - Perl


      bug in a XS extension
      bug in Perl itself (rare)




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                      Detecting segfaults
                                            What is a segfault?
                            Devel::Trace
                                            Examples - C
                                     gdb
                                            Examples - Perl
                                Devel::bt
                                The End


Examples - Perl


      bug in a XS extension
      bug in Perl itself (rare)
      Perl 5.6.1:
      perl -e ’undef a’
      perl -e ’*::=%::=0’




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                      Detecting segfaults
                                            What is a segfault?
                            Devel::Trace
                                            Examples - C
                                     gdb
                                            Examples - Perl
                                Devel::bt
                                The End


Examples - Perl


      bug in a XS extension
      bug in Perl itself (rare)
      Perl 5.6.1:
      perl -e ’undef a’
      perl -e ’*::=%::=0’
      Perlmonks thread: (Golf) Segfault Perl
      http://perlmonks.org/?node_id=156461




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           On the shell
                           Devel::Trace
                                           Core dump file
                                    gdb
                                           CGI script
                               Devel::bt
                               The End



1   Introduction

2   Detecting segfaults
      On the shell
      Core dump file
      CGI script

3   Devel::Trace

4   gdb

5   Devel::bt

6   The End
                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                        Detecting segfaults
                                              On the shell
                              Devel::Trace
                                              Core dump file
                                       gdb
                                              CGI script
                                  Devel::bt
                                  The End


On the shell



  perl segfault . pl
  S e g m e n t a t i o n f a u l t ( c o r e dumped )




                               Uwe V¨lker
                                    o         Hunting segfaults
Introduction
                        Detecting segfaults
                                              On the shell
                              Devel::Trace
                                              Core dump file
                                       gdb
                                              CGI script
                                  Devel::bt
                                  The End


On the shell



  perl segfault . pl
  S e g m e n t a t i o n f a u l t ( c o r e dumped )

  #! / u s r / b i n / p e r l
  use Debug : : DumpCore ;
  Debug : : DumpCore : : s e g v ;




                               Uwe V¨lker
                                    o         Hunting segfaults
Introduction
                   Detecting segfaults
                                         On the shell
                         Devel::Trace
                                         Core dump file
                                  gdb
                                         CGI script
                             Devel::bt
                             The End


Core dump file




  $ u l i m i t −c u n l i m i t e d
  $ perl segfault . pl
  S e g m e n t a t i o n f a u l t ( c o r e dumped )
  $ l l core
  −rw−r−−−−− 1 uwe uwe 1695744 J u l 26 1 4 : 0 8 c o r e




                          Uwe V¨lker
                               o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           On the shell
                           Devel::Trace
                                           Core dump file
                                    gdb
                                           CGI script
                               Devel::bt
                               The End


CGI script




      personal story: CGI script in Apache
      no output, no entry in logfiles (access.log and error.log)




                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           On the shell
                           Devel::Trace
                                           Core dump file
                                    gdb
                                           CGI script
                               Devel::bt
                               The End


CGI script




      personal story: CGI script in Apache
      no output, no entry in logfiles (access.log and error.log)
      but when I wrote to some file, the content was there
      so the script was getting executed...




                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           Usage
                           Devel::Trace
                                           How do I spot a segfault?
                                    gdb
                                           Other uses for Devel::Trace
                               Devel::bt
                               The End



1   Introduction

2   Detecting segfaults

3   Devel::Trace
      Usage
      How do I spot a segfault?
      Other uses for Devel::Trace

4   gdb

5   Devel::bt

6   The End
                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                       Detecting segfaults
                                             Usage
                             Devel::Trace
                                             How do I spot a segfault?
                                      gdb
                                             Other uses for Devel::Trace
                                 Devel::bt
                                 The End


Usage


        ”Print out each line before it is executed (like sh -x)”




                              Uwe V¨lker
                                   o         Hunting segfaults
Introduction
                       Detecting segfaults
                                             Usage
                             Devel::Trace
                                             How do I spot a segfault?
                                      gdb
                                             Other uses for Devel::Trace
                                 Devel::bt
                                 The End


Usage


        ”Print out each line before it is executed (like sh -x)”
        perl -d:Trace program
        for CGI: put it in your shebang line




                              Uwe V¨lker
                                   o         Hunting segfaults
Introduction
                            Detecting segfaults
                                                  Usage
                                  Devel::Trace
                                                  How do I spot a segfault?
                                           gdb
                                                  Other uses for Devel::Trace
                                      Devel::bt
                                      The End


Usage


        ”Print out each line before it is executed (like sh -x)”
        perl -d:Trace program
        for CGI: put it in your shebang line

  >>     ./   test   :4:    p r i n t ” Statement 1                   a t l i n e 4 n” ;
  >>     ./   test   :5:    p r i n t ” Statement 2                   a t l i n e 5 n” ;
  >>     ./   test   :6:    p r i n t ” C a l l t o sub               x r e t u r n s ” , &x ( ) ,
  >>     ./   test   :12:         p r i n t ” I n sub x               a t l i n e 1 2 .  n” ;
  >>     ./   test   :13:         return 13;
  >>     ./   test   :8:    exit 0;


                                   Uwe V¨lker
                                        o         Hunting segfaults
Introduction
                      Detecting segfaults
                                            Usage
                            Devel::Trace
                                            How do I spot a segfault?
                                     gdb
                                            Other uses for Devel::Trace
                                Devel::bt
                                The End


How do I spot a segfault?



      look at the last few lines
      if it stops immediately, it might be a segfault




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                      Detecting segfaults
                                            Usage
                            Devel::Trace
                                            How do I spot a segfault?
                                     gdb
                                            Other uses for Devel::Trace
                                Devel::bt
                                The End


How do I spot a segfault?



      look at the last few lines
      if it stops immediately, it might be a segfault
      grep for your script name
      output can be very large, with long lines
      grep -v site perl




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                      Detecting segfaults
                                            Usage
                            Devel::Trace
                                            How do I spot a segfault?
                                     gdb
                                            Other uses for Devel::Trace
                                Devel::bt
                                The End


How do I spot a segfault?



      look at the last few lines
      if it stops immediately, it might be a segfault
      grep for your script name
      output can be very large, with long lines
      grep -v site perl
      in my case: buggy MSSQL driver (easysoft)




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                    Detecting segfaults
                                          Usage
                          Devel::Trace
                                          How do I spot a segfault?
                                   gdb
                                          Other uses for Devel::Trace
                              Devel::bt
                              The End


Other uses for Devel::Trace



      your program is behaving strange and you have no debugger
      at hand
      (use grep and grep -v to filter the output)




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                    Detecting segfaults
                                          Usage
                          Devel::Trace
                                          How do I spot a segfault?
                                   gdb
                                          Other uses for Devel::Trace
                              Devel::bt
                              The End


Other uses for Devel::Trace



      your program is behaving strange and you have no debugger
      at hand
      (use grep and grep -v to filter the output)
      Does this code get executed?
      Which part of the conditional was taken?




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           Introduction
                           Devel::Trace
                                           Usage
                                    gdb
                                           Core dump file - reloaded
                               Devel::bt
                               The End



1   Introduction

2   Detecting segfaults

3   Devel::Trace

4   gdb
      Introduction
      Usage
      Core dump file - reloaded

5   Devel::bt

6   The End
                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                     Detecting segfaults
                                           Introduction
                           Devel::Trace
                                           Usage
                                    gdb
                                           Core dump file - reloaded
                               Devel::bt
                               The End


Introduction




      GNU debugger
      command line debugger
      we use it to extract the stacktrace from the core dump file




                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                         Detecting segfaults
                                               Introduction
                               Devel::Trace
                                               Usage
                                        gdb
                                               Core dump file - reloaded
                                   Devel::bt
                                   The End


Usage



  $ gdb p e r l c o r e
  Core was g e n e r a t e d by ‘ p e r l p e r l / s e g f a u l t . p l ’ .
  Program t e r m i n a t e d w i t h s i g n a l 1 1 , S e g m e n t a t i o n f a u
  #0 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 5 4 i n c r a s h n o w f o r r e a l ( s u i c i d
  10         p r i n t f (”%d ” , ∗p ) ; /∗ c a u s e a s e g f a u l t ∗/
  ( gdb )




                                Uwe V¨lker
                                     o         Hunting segfaults
Introduction
                         Detecting segfaults
                                               Introduction
                               Devel::Trace
                                               Usage
                                        gdb
                                               Core dump file - reloaded
                                   Devel::bt
                                   The End


Usage
  $ gdb p e r l c o r e
  Core was g e n e r a t e d by ‘ p e r l p e r l / s e g f a u l t . p l ’ .
  Program t e r m i n a t e d w i t h s i g n a l 1 1 , S e g m e n t a t i o n f a u
  #0 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 5 4 i n c r a s h n o w f o r r e a l ( s u i c i d
  10         p r i n t f (”%d ” , ∗p ) ; /∗ c a u s e a s e g f a u l t ∗/
  ( gdb ) where
  #0 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 5 4 i n c r a s h n o w f o r r e a l ( s u i c i d
  #1 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 8 9 i n c r a s h n o w ( s u i c i d e m e s s a g e
  #2 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 8 2 0 i n XS Debug DumpCore segv (
  #3 0 x0000000000488db3 i n P e r l p p e n t e r s u b ( )
  #4 0 x0000000000480a7d i n P e r l r u n o p s s t a n d a r d ( )
  #5 0 x00000000004336b4 i n p e r l r u n ( )
  #6 0 x000000000041bddc i n main ( )
  ( gdb )
                                Uwe V¨lker
                                     o         Hunting segfaults
Introduction
                 Detecting segfaults
                                       Introduction
                       Devel::Trace
                                       Usage
                                gdb
                                       Core dump file - reloaded
                           Devel::bt
                           The End


Core dump file - reloaded



     ulimit -c unlimited




                        Uwe V¨lker
                             o         Hunting segfaults
Introduction
                    Detecting segfaults
                                          Introduction
                          Devel::Trace
                                          Usage
                                   gdb
                                          Core dump file - reloaded
                              Devel::bt
                              The End


Core dump file - reloaded



     ulimit -c unlimited
     current directory has to be writable
     (can be tricky with Apache)




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                    Detecting segfaults
                                          Introduction
                          Devel::Trace
                                          Usage
                                   gdb
                                          Core dump file - reloaded
                              Devel::bt
                              The End


Core dump file - reloaded



     ulimit -c unlimited
     current directory has to be writable
     (can be tricky with Apache)
     ps auxww|grep apache
     ls -l /proc/1234/cwd




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                     Detecting segfaults
                           Devel::Trace    Usage
                                    gdb    How does it work?
                               Devel::bt
                               The End




1   Introduction

2   Detecting segfaults

3   Devel::Trace

4   gdb

5   Devel::bt
      Usage
      How does it work?

6   The End
                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                      Detecting segfaults
                            Devel::Trace    Usage
                                     gdb    How does it work?
                                Devel::bt
                                The End


Usage




        ”Automatic gdb backtraces on errors”




                             Uwe V¨lker
                                  o         Hunting segfaults
Introduction
                       Detecting segfaults
                             Devel::Trace    Usage
                                      gdb    How does it work?
                                 Devel::bt
                                 The End


Usage




        ”Automatic gdb backtraces on errors”
        just use the module
        it registers signal handlers for SIGSEGV (and a few more)




                              Uwe V¨lker
                                   o         Hunting segfaults
Introduction
                    Detecting segfaults
                          Devel::Trace    Usage
                                   gdb    How does it work?
                              Devel::bt
                              The End


How does it work?




     the signal handler forks off a process which runs gdb
     gdb attaches to the parent and outputs the stacktrace




                           Uwe V¨lker
                                o         Hunting segfaults
Introduction
                     Detecting segfaults
                           Devel::Trace    Sources
                                    gdb    Questions?
                               Devel::bt
                               The End




1   Introduction

2   Detecting segfaults

3   Devel::Trace

4   gdb

5   Devel::bt

6   The End
      Sources
      Questions?
                            Uwe V¨lker
                                 o         Hunting segfaults
Introduction
                 Detecting segfaults
                       Devel::Trace    Sources
                                gdb    Questions?
                           Devel::bt
                           The End


Sources



     http://en.wikipedia.org/wiki/Segmentation_fault
     http://modperlbook.org/html/
     21-6-Analyzing-Dumped-core-Files.html
     http://www.linux-magazin.de/Heft-Abo/Ausgaben/
     2007/01/Getriebeschaden




                        Uwe V¨lker
                             o         Hunting segfaults
Introduction
             Detecting segfaults
                   Devel::Trace    Sources
                            gdb    Questions?
                       Devel::bt
                       The End


Questions?




                    Uwe V¨lker
                         o         Hunting segfaults

Contenu connexe

Dernier

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

En vedette

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

En vedette (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Hunting segfaults (for beginners)

  • 1. Introduction Detecting segfaults Devel::Trace gdb Devel::bt The End Hunting segfaults for beginners Uwe V¨lker o XING AG August 2012 Uwe V¨lker o Hunting segfaults
  • 2. Introduction Detecting segfaults Devel::Trace gdb Devel::bt The End 1 Introduction 2 Detecting segfaults 3 Devel::Trace 4 gdb 5 Devel::bt 6 The End Uwe V¨lker o Hunting segfaults
  • 3. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End 1 Introduction What is a segfault? Examples - C Examples - Perl 2 Detecting segfaults 3 Devel::Trace 4 gdb 5 Devel::bt 6 The End Uwe V¨lker o Hunting segfaults
  • 4. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End What is a segfault? segfault = segmentation fault Uwe V¨lker o Hunting segfaults
  • 5. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End What is a segfault? segfault = segmentation fault every process has memory pages these pages are mapped to physical memory Uwe V¨lker o Hunting segfaults
  • 6. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End What is a segfault? segfault = segmentation fault every process has memory pages these pages are mapped to physical memory if you try to access an invalid address (or write to a protected address) Uwe V¨lker o Hunting segfaults
  • 7. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End What is a segfault? segfault = segmentation fault every process has memory pages these pages are mapped to physical memory if you try to access an invalid address (or write to a protected address) BOOOM! Uwe V¨lker o Hunting segfaults
  • 8. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End Examples - C using uninitialized pointers dereferencing NULL pointers using ”freed” pointers Uwe V¨lker o Hunting segfaults
  • 9. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End Examples - Perl bug in a XS extension bug in Perl itself (rare) Uwe V¨lker o Hunting segfaults
  • 10. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End Examples - Perl bug in a XS extension bug in Perl itself (rare) Perl 5.6.1: perl -e ’undef a’ perl -e ’*::=%::=0’ Uwe V¨lker o Hunting segfaults
  • 11. Introduction Detecting segfaults What is a segfault? Devel::Trace Examples - C gdb Examples - Perl Devel::bt The End Examples - Perl bug in a XS extension bug in Perl itself (rare) Perl 5.6.1: perl -e ’undef a’ perl -e ’*::=%::=0’ Perlmonks thread: (Golf) Segfault Perl http://perlmonks.org/?node_id=156461 Uwe V¨lker o Hunting segfaults
  • 12. Introduction Detecting segfaults On the shell Devel::Trace Core dump file gdb CGI script Devel::bt The End 1 Introduction 2 Detecting segfaults On the shell Core dump file CGI script 3 Devel::Trace 4 gdb 5 Devel::bt 6 The End Uwe V¨lker o Hunting segfaults
  • 13. Introduction Detecting segfaults On the shell Devel::Trace Core dump file gdb CGI script Devel::bt The End On the shell perl segfault . pl S e g m e n t a t i o n f a u l t ( c o r e dumped ) Uwe V¨lker o Hunting segfaults
  • 14. Introduction Detecting segfaults On the shell Devel::Trace Core dump file gdb CGI script Devel::bt The End On the shell perl segfault . pl S e g m e n t a t i o n f a u l t ( c o r e dumped ) #! / u s r / b i n / p e r l use Debug : : DumpCore ; Debug : : DumpCore : : s e g v ; Uwe V¨lker o Hunting segfaults
  • 15. Introduction Detecting segfaults On the shell Devel::Trace Core dump file gdb CGI script Devel::bt The End Core dump file $ u l i m i t −c u n l i m i t e d $ perl segfault . pl S e g m e n t a t i o n f a u l t ( c o r e dumped ) $ l l core −rw−r−−−−− 1 uwe uwe 1695744 J u l 26 1 4 : 0 8 c o r e Uwe V¨lker o Hunting segfaults
  • 16. Introduction Detecting segfaults On the shell Devel::Trace Core dump file gdb CGI script Devel::bt The End CGI script personal story: CGI script in Apache no output, no entry in logfiles (access.log and error.log) Uwe V¨lker o Hunting segfaults
  • 17. Introduction Detecting segfaults On the shell Devel::Trace Core dump file gdb CGI script Devel::bt The End CGI script personal story: CGI script in Apache no output, no entry in logfiles (access.log and error.log) but when I wrote to some file, the content was there so the script was getting executed... Uwe V¨lker o Hunting segfaults
  • 18. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End 1 Introduction 2 Detecting segfaults 3 Devel::Trace Usage How do I spot a segfault? Other uses for Devel::Trace 4 gdb 5 Devel::bt 6 The End Uwe V¨lker o Hunting segfaults
  • 19. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End Usage ”Print out each line before it is executed (like sh -x)” Uwe V¨lker o Hunting segfaults
  • 20. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End Usage ”Print out each line before it is executed (like sh -x)” perl -d:Trace program for CGI: put it in your shebang line Uwe V¨lker o Hunting segfaults
  • 21. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End Usage ”Print out each line before it is executed (like sh -x)” perl -d:Trace program for CGI: put it in your shebang line >> ./ test :4: p r i n t ” Statement 1 a t l i n e 4 n” ; >> ./ test :5: p r i n t ” Statement 2 a t l i n e 5 n” ; >> ./ test :6: p r i n t ” C a l l t o sub x r e t u r n s ” , &x ( ) , >> ./ test :12: p r i n t ” I n sub x a t l i n e 1 2 . n” ; >> ./ test :13: return 13; >> ./ test :8: exit 0; Uwe V¨lker o Hunting segfaults
  • 22. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End How do I spot a segfault? look at the last few lines if it stops immediately, it might be a segfault Uwe V¨lker o Hunting segfaults
  • 23. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End How do I spot a segfault? look at the last few lines if it stops immediately, it might be a segfault grep for your script name output can be very large, with long lines grep -v site perl Uwe V¨lker o Hunting segfaults
  • 24. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End How do I spot a segfault? look at the last few lines if it stops immediately, it might be a segfault grep for your script name output can be very large, with long lines grep -v site perl in my case: buggy MSSQL driver (easysoft) Uwe V¨lker o Hunting segfaults
  • 25. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End Other uses for Devel::Trace your program is behaving strange and you have no debugger at hand (use grep and grep -v to filter the output) Uwe V¨lker o Hunting segfaults
  • 26. Introduction Detecting segfaults Usage Devel::Trace How do I spot a segfault? gdb Other uses for Devel::Trace Devel::bt The End Other uses for Devel::Trace your program is behaving strange and you have no debugger at hand (use grep and grep -v to filter the output) Does this code get executed? Which part of the conditional was taken? Uwe V¨lker o Hunting segfaults
  • 27. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End 1 Introduction 2 Detecting segfaults 3 Devel::Trace 4 gdb Introduction Usage Core dump file - reloaded 5 Devel::bt 6 The End Uwe V¨lker o Hunting segfaults
  • 28. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End Introduction GNU debugger command line debugger we use it to extract the stacktrace from the core dump file Uwe V¨lker o Hunting segfaults
  • 29. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End Usage $ gdb p e r l c o r e Core was g e n e r a t e d by ‘ p e r l p e r l / s e g f a u l t . p l ’ . Program t e r m i n a t e d w i t h s i g n a l 1 1 , S e g m e n t a t i o n f a u #0 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 5 4 i n c r a s h n o w f o r r e a l ( s u i c i d 10 p r i n t f (”%d ” , ∗p ) ; /∗ c a u s e a s e g f a u l t ∗/ ( gdb ) Uwe V¨lker o Hunting segfaults
  • 30. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End Usage $ gdb p e r l c o r e Core was g e n e r a t e d by ‘ p e r l p e r l / s e g f a u l t . p l ’ . Program t e r m i n a t e d w i t h s i g n a l 1 1 , S e g m e n t a t i o n f a u #0 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 5 4 i n c r a s h n o w f o r r e a l ( s u i c i d 10 p r i n t f (”%d ” , ∗p ) ; /∗ c a u s e a s e g f a u l t ∗/ ( gdb ) where #0 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 5 4 i n c r a s h n o w f o r r e a l ( s u i c i d #1 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 7 8 9 i n c r a s h n o w ( s u i c i d e m e s s a g e #2 0 x 0 0 0 0 7 f 2 f 5 d 0 8 6 8 2 0 i n XS Debug DumpCore segv ( #3 0 x0000000000488db3 i n P e r l p p e n t e r s u b ( ) #4 0 x0000000000480a7d i n P e r l r u n o p s s t a n d a r d ( ) #5 0 x00000000004336b4 i n p e r l r u n ( ) #6 0 x000000000041bddc i n main ( ) ( gdb ) Uwe V¨lker o Hunting segfaults
  • 31. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End Core dump file - reloaded ulimit -c unlimited Uwe V¨lker o Hunting segfaults
  • 32. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End Core dump file - reloaded ulimit -c unlimited current directory has to be writable (can be tricky with Apache) Uwe V¨lker o Hunting segfaults
  • 33. Introduction Detecting segfaults Introduction Devel::Trace Usage gdb Core dump file - reloaded Devel::bt The End Core dump file - reloaded ulimit -c unlimited current directory has to be writable (can be tricky with Apache) ps auxww|grep apache ls -l /proc/1234/cwd Uwe V¨lker o Hunting segfaults
  • 34. Introduction Detecting segfaults Devel::Trace Usage gdb How does it work? Devel::bt The End 1 Introduction 2 Detecting segfaults 3 Devel::Trace 4 gdb 5 Devel::bt Usage How does it work? 6 The End Uwe V¨lker o Hunting segfaults
  • 35. Introduction Detecting segfaults Devel::Trace Usage gdb How does it work? Devel::bt The End Usage ”Automatic gdb backtraces on errors” Uwe V¨lker o Hunting segfaults
  • 36. Introduction Detecting segfaults Devel::Trace Usage gdb How does it work? Devel::bt The End Usage ”Automatic gdb backtraces on errors” just use the module it registers signal handlers for SIGSEGV (and a few more) Uwe V¨lker o Hunting segfaults
  • 37. Introduction Detecting segfaults Devel::Trace Usage gdb How does it work? Devel::bt The End How does it work? the signal handler forks off a process which runs gdb gdb attaches to the parent and outputs the stacktrace Uwe V¨lker o Hunting segfaults
  • 38. Introduction Detecting segfaults Devel::Trace Sources gdb Questions? Devel::bt The End 1 Introduction 2 Detecting segfaults 3 Devel::Trace 4 gdb 5 Devel::bt 6 The End Sources Questions? Uwe V¨lker o Hunting segfaults
  • 39. Introduction Detecting segfaults Devel::Trace Sources gdb Questions? Devel::bt The End Sources http://en.wikipedia.org/wiki/Segmentation_fault http://modperlbook.org/html/ 21-6-Analyzing-Dumped-core-Files.html http://www.linux-magazin.de/Heft-Abo/Ausgaben/ 2007/01/Getriebeschaden Uwe V¨lker o Hunting segfaults
  • 40. Introduction Detecting segfaults Devel::Trace Sources gdb Questions? Devel::bt The End Questions? Uwe V¨lker o Hunting segfaults