Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: third_party/crashpad/crashpad/handler/crashpad_handler.md

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Crashpad Authors. All rights reserved.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 -->
16
17 # crashpad_handler(8)
18
19 ## Name
20
21 crashpad_handler—Crashpad’s exception handler server
22
23 ## Synopsis
24
25 **crashpad_handler** [_OPTION…_]
26
27 ## Description
28
29 This program is Crashpad’s main exception-handling server. It is responsible for
30 catching exceptions, writing crash reports, and uploading them to a crash report
31 collection server. Uploads are disabled by default, and can only be enabled by a
32 Crashpad client using the Crashpad client library, typically in response to a
33 user requesting this behavior.
34
35 On macOS, this server may be started by its initial client, in which case it
36 performs a handshake with this client via a pipe established by the client that
37 is inherited by the server, referenced by the **--handshake-fd** argument.
38 During the handshake, the server furnishes the client with a send right that the
39 client may use as an exception port. The server retains the corresponding
40 receive right, which it monitors for exception messages. When the receive right
41 loses all senders, the server exits after allowing any upload in progress to
42 complete.
43
44 Alternatively, on macOS, this server may be started from launchd(8), where it
45 receives the Mach service name in a **--mach-service** argument. It checks in
46 with the bootstrap server under this service name, and clients may look it up
47 with the bootstrap server under this service name. It monitors this service for
48 exception messages. Upon receipt of `SIGTERM`, the server exits after allowing
49 any upload in progress to complete. `SIGTERM` is normally sent by launchd(8)
50 when it determines that the server should exit.
51
52 On Windows, clients register with this server by communicating with it via the
53 named pipe identified by the **--pipe-name** argument. Alternatively, the server
54 can inherit an already-created pipe from a parent process by using the
55 **--initial-client-data** mechanism. That argument also takes all of the
56 arguments that would normally be passed in a registration message, and so
57 constitutes registration of the first client. Subsequent clients may then
58 register by communicating with the server via the pipe. During registration, a
59 client provides the server with an OS event object that it will signal should it
60 crash. The server obtains the client’s process handle and waits on the crash
61 event object for a crash, as well as the client’s process handle for the client
62 to exit cleanly without crashing. When a server started via the
63 **--initial-client-data** mechanism loses all of its clients, it exits after
64 allowing any upload in progress to complete.
65
66 On Windows, this executable is built by default as a Windows GUI app, so no
67 console will appear in normal usage. This is the version that will typically be
68 used. A second copy is also made with a `.com` extension, rather than `.exe`. In
69 this second copy, the PE header is modified to indicate that it’s a console app.
70 This is useful because the `.com` is found in the path before the `.exe`, so
71 when run normally from a shell using only the basename (without an explicit
72 `.com` or `.exe` extension), the `.com` console version will be chosen, and so
73 stdio will be hooked up as expected to the parent console so that logging output
74 will be visible.
75
76 It is not normally appropriate to invoke this program directly. Usually, it will
77 be invoked by a Crashpad client using the Crashpad client library, or started by
78 another system service. On macOS, arbitrary programs may be run with a Crashpad
79 handler by using [run_with_crashpad(1)](../tools/mac/run_with_crashpad.md) to
80 establish the Crashpad client environment before running a program.
81
82 ## Options
83
84 * **--annotation**=_KEY_=_VALUE_
85
86 Sets a process-level annotation mapping _KEY_ to _VALUE_ in each crash report
87 that is written. This option may appear zero, one, or multiple times.
88
89 Most annotations should be provided by the Crashpad client as module-level
90 annotations instead of process-level annotations. Module-level annotations
91 are more flexible in that they can be modified and cleared during the client
92 program’s lifetime. Module-level annotations can be set via the Crashpad
93 client library. Process-level annotations are useful for annotations that the
94 collection server requires be present, that have fixed values, and for cases
95 where a program that does not use the Crashpad client library is being
96 monitored.
97
98 Breakpad-type collection servers only require the `"prod"` and `"ver"`
99 annotations, which should be set to the product name or identifier and
100 product version, respectively. It is unusual to specify other annotations as
101 process-level annotations via this argument.
102
103 * **--database**=_PATH_
104
105 Use _PATH_ as the path to the Crashpad crash report database. This option is
106 required. Crash reports are written to this database, and if uploads are
107 enabled, uploaded from this database to a crash report collection server. If
108 the database does not exist, it will be created, provided that the parent
109 directory of _PATH_ exists.
110
111 * **--handshake-fd**=_FD_
112
113 Perform the handshake with the initial client on the file descriptor at _FD_.
114 Either this option or **--mach-service**, but not both, is required. This
115 option is only valid on macOS.
116
117 * **--initial-client-data**=*HANDLE_request_crash_dump*,*HANDLE_request_non_cra sh_dump*,*HANDLE_non_crash_dump_completed*,*HANDLE_first_pipe_instance*,*HANDLE_ client_process*,*Address_crash_exception_information*,*Address_non_crash_excepti on_information*,*Address_debug_critical_section*
118
119 Register the initial client using the inherited handles and data provided.
120 For more information on the argument’s format, see the implementations of
121 `CrashpadClient` and `ExceptionHandlerServer`. Either this option or
122 **--pipe-name**, but not both, is required. This option is only valid on
123 Windows.
124
125 When this option is present, the server creates a new named pipe at a random
126 name and informs its client of the name. The server waits for at least one
127 client to register, and exits when all clients have exited, after waiting for
128 any uploads in progress to complete.
129
130 * **--mach-service**=_SERVICE_
131
132 Check in with the bootstrap server under the name _SERVICE_. Either this
133 option or **--handshake-fd**, but not both, is required. This option is only
134 valid on macOS.
135
136 _SERVICE_ may already be reserved with the bootstrap server in cases where
137 this tool is started by launchd(8) as a result of a message being sent to a
138 service declared in a job’s `MachServices` dictionary (see launchd.plist(5)).
139 The service name may also be completely unknown to the system.
140
141 * **--no-rate-limit**
142
143 Do not rate limit the upload of crash reports. By default uploads are
144 throttled to one per hour. Using this option disables that behavior, and
145 Crashpad will attempt to upload all captured reports.
146
147 * **--pipe-name**=_PIPE_
148
149 Listen on the given pipe name for connections from clients. _PIPE_ must be of
150 the form `\\.\pipe\<somename>`. Either this option or
151 **--initial-client-data**, but not both, is required. This option is only
152 valid on Windows.
153
154 When this option is present, the server creates a named pipe at _PIPE_, a
155 name known to both the server and its clients. The server continues running
156 even after all clients have exited.
157
158 * **--reset-own-crash-exception-port-to-system-default**
159
160 Causes the exception handler server to set its own crash handler to the
161 system default before beginning operation. This is only expected to be useful
162 in cases where the server inherits an inappropriate crash handler from its
163 parent process. This option is only valid on macOS. Use of this option is
164 discouraged. It should not be used absent extraordinary circumstances.
165
166 * **--url**=_URL_
167
168 If uploads are enabled, sends crash reports to the Breakpad-type crash report
169 collection server at _URL_. Uploads are disabled by default, and can only be
170 enabled for a database by a Crashpad client using the Crashpad client
171 library, typically in response to a user requesting this behavior. If this
172 option is not specified, this program will behave as if uploads are disabled.
173
174 * **--help**
175
176 Display help and exit.
177
178 * **--version**
179
180 Output version information and exit.
181
182 ## Exit Status
183
184 * **0**
185
186 Success.
187
188 * **1**
189
190 Failure, with a message printed to the standard error stream.
191
192 ## See Also
193
194 [catch_exception_tool(1)](../tools/mac/catch_exception_tool.md),
195 [crashpad_database_util(1)](../tools/crashpad_database_util.md),
196 [generate_dump(1)](../tools/generate_dump.md),
197 [run_with_crashpad(1)](../tools/mac/run_with_crashpad.md)
198
199 ## Resources
200
201 Crashpad home page: https://crashpad.chromium.org/.
202
203 Report bugs at https://crashpad.chromium.org/bug/new.
204
205 ## Copyright
206
207 Copyright 2014 [The Crashpad
208 Authors](https://chromium.googlesource.com/crashpad/crashpad/+/master/AUTHORS).
209
210 ## License
211
212 Licensed under the Apache License, Version 2.0 (the “License”);
213 you may not use this file except in compliance with the License.
214 You may obtain a copy of the License at
215
216 http://www.apache.org/licenses/LICENSE-2.0
217
218 Unless required by applicable law or agreed to in writing, software
219 distributed under the License is distributed on an “AS IS” BASIS,
220 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
221 See the License for the specific language governing permissions and
222 limitations under the License.
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/handler/crashpad_handler.ad ('k') | third_party/crashpad/crashpad/handler/handler.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698