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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chapter 3. Debugging Applications</title>
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
<link rel="up" href="index.html" title="Berkeley DB Installation and Build Guide" />
<link rel="prev" href="install_multiple.html" title="Building with multiple versions of Berkeley DB" />
<link rel="next" href="debug_compile.html" title="Compile-time configuration" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 3. Debugging Applications </th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="install_multiple.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="debug_compile.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="debug"></a>Chapter 3. Debugging Applications </h2>
</div>
</div>
</div>
<div class="toc">
<p>
<b>Table of Contents</b>
</p>
<dl>
<dt>
<span class="sect1">
<a href="debug.html#debug_intro">Introduction to debugging</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="debug_compile.html">Compile-time configuration</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="debug_runtime.html">Run-time error information</a>
</span>
</dt>
<dt>
<span class="sect1">
<a href="debug_printlog.html">Reviewing Berkeley DB log files</a>
</span>
</dt>
<dd>
<dl>
<dt>
<span class="sect2">
<a href="debug_printlog.html#idp164880">Augmenting the Log for Debugging</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="debug_printlog.html#idp136104">Extracting Committed Transactions and Transaction Status</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="debug_printlog.html#idp166064">Extracting Transaction Histories</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="debug_printlog.html#idp171384">Extracting File Histories</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="debug_printlog.html#idp183288">Extracting Page Histories</a>
</span>
</dt>
<dt>
<span class="sect2">
<a href="debug_printlog.html#idp184088">Other log processing tools</a>
</span>
</dt>
</dl>
</dd>
</dl>
</div>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="debug_intro"></a>Introduction to debugging</h2>
</div>
</div>
</div>
<p>
Because Berkeley DB is an embedded library, debugging
applications that use Berkeley DB is both harder and easier
than debugging a separate server. Debugging can be harder
because when a problem arises, it is not always readily
apparent whether the problem is in the application, is in the
database library, or is a result of an unexpected interaction
between the two. Debugging can be easier because it is easier
to track down a problem when you can review a stack trace
rather than deciphering interprocess communication messages.
This chapter is intended to assist you with debugging
applications and reporting bugs to us so that we can provide
you with the correct answer or fix as quickly as possible.
</p>
<p>
When you encounter a problem, there are a few general
actions you can take:
</p>
<div class="variablelist">
<dl>
<dt>
<span class="term">Review the Berkeley DB error output:</span>
</dt>
<dd>
<p>
If an error output mechanism has been
configured in the Berkeley DB environment,
additional run-time error messages are made
available to the applications. If you are not
using an environment, it is well worth modifying
your application to create one so that you can get
more detailed error messages. See <a class="xref" href="debug_runtime.html" title="Run-time error information">Run-time error information</a> for more
information on configuring Berkeley DB to output
these error messages.
</p>
</dd>
<dt>
<span class="term">Review the options available for the
<a href="../api_reference/C/envset_verbose.html" class="olink">DB_ENV->set_verbose()</a> method:</span>
</dt>
<dd>
<p>
Look to see if it offers any additional
informational and/or debugging messages that might
help you understand the problem.
</p>
</dd>
<dt>
<span class="term">Add run-time diagnostics:</span>
</dt>
<dd>
<p>
You can configure and build Berkeley DB to
perform run-time diagnostics. (By default, these
checks are not done because they can seriously
impact performance.) See <a class="xref" href="debug_compile.html" title="Compile-time configuration">Compile-time configuration</a> for more
information.
</p>
</dd>
<dt>
<span class="term">Apply all available patches:</span>
</dt>
<dd>
<p>
Before reporting a problem in Berkeley DB,
please upgrade to the latest Berkeley DB release,
if possible, or at least make sure you have
applied any updates available for your release
from the <a class="ulink" href="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html" target="_top">
Berkeley DB web site </a>.
</p>
</dd>
<dt>
<span class="term">Run the test suite:</span>
</dt>
<dd>
<p>
If you see repeated failures or failures of
simple test cases, run the Berkeley DB test suite
to determine whether the distribution of Berkeley
DB you are using was built and configured
correctly.
</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="install_multiple.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="debug_compile.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Building with multiple versions of Berkeley DB </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> Compile-time configuration</td>
</tr>
</table>
</div>
</body>
</html>
|