-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathdebug-setup-phpbnl17.xml
130 lines (113 loc) · 4.68 KB
/
debug-setup-phpbnl17.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="utf-8"?>
<presentation css="10gen-strict.css">
<topic>MongoDB</topic>
<title>Debugging Your Set-Up</title>
<event>PHP Benelux 2017</event>
<location>Edegem, Belgium</location>
<lat>51.15056</lat><lon>4.43284</lon>
<date>January 27th, 2017</date>
<speaker>Derick Rethans</speaker>
<email>[email protected]</email>
<twitter>derickr</twitter>
<joindin>https://joind.in/talk/df797</joindin>
<slide>slides/mongodb/title.xml</slide>
<slide>slides/mongodb/me.xml</slide>
In this session we will look at low-level (Linux) system debugging tools to
find out what is going on (or wrong!) with your PHP environment, although the
techniques are also valid for other programs besides PHP. We will cover
debugging crashes with gdb, checking out memory leaks with valgrind, and many
other tools to find out what is going wrong, and hopefully, figure out why.
This session teaches tools to help out with tracking down bugs, and provides
information on how to get better at debugging connection issues, crashes, files
not being written, etc. The session is also valuable for people who want to
help out with providing good bug reports for Open Source projects.
<slide>slides/debugging/storytime.xml</slide>
- don't jump to conclusions
- unless you know what you're doing ;-) https://jira.mongodb.org/browse/PHPC-894 / https://github.com/mongodb/mongo-php-driver/issues/514
<slide>slides/debugging/jump-conclusions.xml</slide>
<slide>slides/debugging/jump-memory-leak.xml</slide>
<slide>slides/debugging/toolbox.xml</slide>
<slide>slides/debugging/toolbox-items.xml</slide>
<slide>slides/debugging/section-strace.xml</slide>
<slide>slides/debugging/strace-systemcalls.xml</slide>
<slide>slides/debugging/strace-invocation.xml</slide>
<slide>slides/debugging/strace-invocation-phpini.xml</slide>
<slide>slides/debugging/strace-invocation-socket.xml</slide>
<slide>slides/debugging/demo.xml</slide>
- strace
- what is it?
- how does it work?
- php.ini loading
<slide>slides/debugging/jump-conclusions.xml</slide>
<slide>slides/debugging/section-lsof.xml</slide>
<slide>slides/debugging/lsof-files-unix.xml</slide>
<slide>slides/debugging/lsof-invocation.xml</slide>
<slide>slides/debugging/demo.xml</slide>
<slide>slides/debugging/lsof-invocation-cant-listen.xml</slide>
- lsof -i
- what is it?
- how does it work?
- socket with xdebug and fork
- set size: https://youtrack.jetbrains.com/issue/WI-31522, "PHP Scripts with Background Child Process" email
- setsize
- small test case
- https://github.com/sebastianbergmann/php-code-coverage/issues/488
<slide>slides/debugging/section-gdb.xml</slide>
<slide>slides/debugging/gdb-what-is-it.xml</slide>
<slide>slides/debugging/gdb-backtrace.xml</slide>
<slide>slides/debugging/gdb-symbols.xml</slide>
<slide>slides/debugging/demo.xml</slide>
<slide>slides/debugging/gdb-optimisation.xml</slide>
<slide>slides/debugging/gdb-optimisation-asm.xml</slide>
<slide>slides/debugging/gdb-optimisation-wrong.xml</slide>
<slide>slides/debugging/gdb-short-case.xml</slide>
<slide>slides/debugging/gdb-usage.xml</slide>
<slide>slides/debugging/gdb-debug-core.xml</slide>
<slide>slides/debugging/gdb-attach.xml</slide>
<slide>slides/debugging/demo.xml</slide>
<slide>slides/debugging/gdb-zbacktrace.xml</slide>
- gdb
- what is it?
- how does it work?
- talk about memory management in PHP
- crashes
- core files
-
- attach to running PID
- run from within
- httpd -X
- symbols included
- optimisation
- zbacktrace
<slide>slides/debugging/section-valgrind.xml</slide>
<slide>slides/debugging/valgrind-how.xml</slide>
<slide>slides/debugging/jump-memory-leak.xml</slide>
<slide>slides/debugging/valgrind-show-leak1.xml</slide>
<slide>slides/debugging/demo.xml</slide>
<slide>slides/debugging/valgrind-show-leak2.xml</slide>
<slide>slides/debugging/valgrind-show-leak3.xml</slide>
<slide>slides/debugging/valgrind-show-leak4.xml</slide>
<slide>slides/debugging/valgrind-show-leak5.xml</slide>
<slide>slides/debugging/valgrind-show-leak6.xml</slide>
<slide>slides/debugging/valgrind-wrap-up.xml</slide>
- valgrind
- what is it?
- how does it work?
- memory leaks
- get_properties/get_gc
- run from with in
- use with gdb
- USE_ZEND_ALLOC=0
- ZEND_DONT_UNLOAD_MODULES
** OPTIMISATION GONE WRONG **
- gcc -S
- what is it?
- how does it work?
- compiler bug with alloca: https://bugs.xdebug.org/view.php?id=1337 https://bugs.php.net/bug.php?id=73545,
- don't use xdebug (sigh)
- https://github.com/xdebug/xdebug/commit/c36ea38141cb9403ff4bf72602fcf4ae62e5ba1e
- https://bugs.php.net/bug.php?id=73545
<slide>slides/debugging/toolbox-items.xml</slide>
<slide>slides/mongodb/questions.xml</slide>
<slide>slides/mongodb/resources.xml</slide>
</presentation>