4 * Linux Trace Toolkit Control Library Error Header File
6 * The following values are all the possible errors the lttng command line
7 * client can quit with.
9 * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
11 * SPDX-License-Identifier: LGPL-2.1-only
22 #include <lttng/lttng-export.h>
33 Many functions, most of them dating from older liblttng-ctl versions,
34 return this type (or an \c int value which is equal to the negation of
35 one of those enumerators).
37 Not all error codes are relevant to a given function: this API
38 documentation makes an effort to document the most relevant status codes
39 for each function. This is not always possible, however, as LTTng is
40 made of multiple interacting components (tracers, consumer daemons,
41 session daemons, and the rest); those error codes can move from one to
42 another and the possible error codes of a given liblttng-ctl function
43 can change from version to version.
45 @sa lttng_strerror() --
46 Returns a human-readable message for a general error code, positive
49 enum lttng_error_code
{
51 /// @cond INTERNAL_ERR_CODES
52 LTTNG_ERR_SELECT_SESS
= 27, /* Must select a session */
53 LTTNG_ERR_NO_STREAM
= 52, /* Index without stream on relay. */
54 LTTNG_ERR_UST_CALIBRATE_FAIL
= 54, /* UST calibration failed */
55 LTTNG_ERR_UST_CHAN_ENABLE_FAIL
= 61, /* UST enable channel failed */
56 LTTNG_ERR_CHAN_EXIST
= 62, /* Channel already exists. */
57 LTTNG_ERR_UST_META_FAIL
= 65, /* UST open metadata failed */
58 LTTNG_ERR_UST_STREAM_FAIL
= 70, /* UST create stream failed */
59 LTTNG_ERR_SNAPSHOT_NODATA
= 71, /* No data in snapshot. */
60 LTTNG_ERR_MI_OUTPUT_TYPE
= 91, /* Invalid MI output format */
61 LTTNG_ERR_MI_IO_FAIL
= 92, /* IO error while writing machine interface output */
62 LTTNG_ERR_MI_NOT_IMPLEMENTED
= 93, /* Mi feature not implemented */
63 LTTNG_ERR_EVENT_EXIST_LOGLEVEL
= 100, /* Event enabled with different loglevel */
64 LTTNG_ERR_FILTER_EXIST
= 108, /* Filter already exist */
65 LTTNG_ERR_COMMAND_CANCELLED
= 128, /* Command cancelled. */
66 LTTNG_ERR_ROTATE_RENAME_FAIL_CONSUMER
= 142, /* Rotation rename failure on consumer */
67 LTTNG_ERR_ROTATION_PENDING_LOCAL_FAIL_CONSUMER
= 143, /* Rotation pending check (local)
68 failure on consumer */
69 LTTNG_ERR_ROTATION_PENDING_RELAY_FAIL_CONSUMER
= 144, /* Rotation pending check (relay)
70 failure on consumer */
71 LTTNG_ERR_MKDIR_FAIL_CONSUMER
= 145, /* mkdir failure on consumer */
72 LTTNG_ERR_TRACE_CHUNK_EXISTS_FAIL_CONSUMER
= 151, /* failed to query consumer for trace
82 /// Undefined command.
86 \lt_obj_c_session already
87 \link lttng_session::enabled started\endlink (active).
89 LTTNG_ERR_SESSION_STARTED
= 13,
91 /// Unknown \lt_obj_domain.
92 LTTNG_ERR_UNKNOWN_DOMAIN
= 14,
94 /// Unsupported operation.
95 LTTNG_ERR_NOT_SUPPORTED
= 15,
97 /// No \lt_obj_session found.
98 LTTNG_ERR_NO_SESSION
= 16,
100 /// Failed to create a directory.
101 LTTNG_ERR_CREATE_DIR_FAIL
= 17,
103 /// Failed to create a \lt_obj_session.
104 LTTNG_ERR_SESSION_FAIL
= 18,
108 \ref api-gen-sessiond-conn "session daemon to connect to".
110 LTTNG_ERR_NO_SESSIOND
= 19,
112 /// Failed to set an URL.
113 LTTNG_ERR_SET_URL
= 20,
115 /// URL already exists.
116 LTTNG_ERR_URL_EXIST
= 21,
118 /// Unsupported \ref api-channel-buf-scheme "buffering scheme".
119 LTTNG_ERR_BUFFER_NOT_SUPPORTED
= 22,
121 /// Nonexistent \lt_obj_session name.
122 LTTNG_ERR_SESS_NOT_FOUND
= 23,
125 A \lt_obj_channel within the given \lt_obj_domain already exists
126 and is configured with another
127 \ref api-channel-buf-scheme "buffering scheme".
129 LTTNG_ERR_BUFFER_TYPE_MISMATCH
= 24,
132 LTTNG_ERR_FATAL
= 25,
134 /// Failed to allocate memory.
135 LTTNG_ERR_NOMEM
= 26,
137 /// \lt_obj_c_session name already exists.
138 LTTNG_ERR_EXIST_SESS
= 28,
140 /// \lt_obj_c_rer not found.
141 LTTNG_ERR_NO_EVENT
= 29,
143 /// Failed to connect to Unix socket.
144 LTTNG_ERR_CONNECT_FAIL
= 30,
146 /// \ref api_session_snapshot "Snapshot" output already exists.
147 LTTNG_ERR_SNAPSHOT_OUTPUT_EXIST
= 31,
149 /// Permission denied.
150 LTTNG_ERR_EPERM
= 32,
152 /// Linux kernel tracer isn't available.
153 LTTNG_ERR_KERN_NA
= 33,
155 /// Incompatible Linux kernel tracer.
156 LTTNG_ERR_KERN_VERSION
= 34,
158 /// Linux kernel \lt_obj_rer already exists.
159 LTTNG_ERR_KERN_EVENT_EXIST
= 35,
161 /// Linux kernel tracer: failed to create a \lt_obj_session.
162 LTTNG_ERR_KERN_SESS_FAIL
= 36,
164 /// Linux kernel \lt_obj_channel already exists.
165 LTTNG_ERR_KERN_CHAN_EXIST
= 37,
167 /// Failed to create a Linux kernel \lt_obj_channel.
168 LTTNG_ERR_KERN_CHAN_FAIL
= 38,
170 /// Linux kernel \lt_obj_channel not found.
171 LTTNG_ERR_KERN_CHAN_NOT_FOUND
= 39,
173 /// Failed to disable a Linux kernel \lt_obj_channel.
174 LTTNG_ERR_KERN_CHAN_DISABLE_FAIL
= 40,
176 /// Failed to create/enable a Linux kernel \lt_obj_channel.
177 LTTNG_ERR_KERN_CHAN_ENABLE_FAIL
= 41,
180 Failed to add a context field to be recorded to the event
181 records of a Linux kernel \lt_obj_channel.
183 LTTNG_ERR_KERN_CONTEXT_FAIL
= 42,
185 /// Failed to create/enable a Linux kernel \lt_obj_rer.
186 LTTNG_ERR_KERN_ENABLE_FAIL
= 43,
188 /// Failed to disable a Linux kernel \lt_obj_rer.
189 LTTNG_ERR_KERN_DISABLE_FAIL
= 44,
191 /// Failed to open a Linux kernel trace metadata stream.
192 LTTNG_ERR_KERN_META_FAIL
= 45,
195 Linux kernel tracer: failed to
196 \link lttng_start_tracing() start tracing\endlink.
198 LTTNG_ERR_KERN_START_FAIL
= 46,
201 Linux kernel tracer: failed to
202 \link lttng_stop_tracing stop tracing\endlink.
204 LTTNG_ERR_KERN_STOP_FAIL
= 47,
206 /// Failed to start a Linux kernel consumer daemon.
207 LTTNG_ERR_KERN_CONSUMER_FAIL
= 48,
209 /// Failed to create a Linux kernel trace data stream.
210 LTTNG_ERR_KERN_STREAM_FAIL
= 49,
213 The \lt_obj_session never became
214 \link lttng_session::enabled active\endlink.
216 LTTNG_ERR_START_SESSION_ONCE
= 50,
219 Failed to take a recording session
220 \ref api_session_snapshot "snapshot".
222 LTTNG_ERR_SNAPSHOT_FAIL
= 51,
224 /// Failed to list Linux kernel \lt_obj_rers.
225 LTTNG_ERR_KERN_LIST_FAIL
= 53,
227 /// User space \lt_obj_rer already enabled.
228 LTTNG_ERR_UST_EVENT_ENABLED
= 55,
231 User space tracer: failed to
232 \link lttng_create_session_ext() create\endlink a
235 LTTNG_ERR_UST_SESS_FAIL
= 56,
237 /// User space \lt_obj_channel already exists.
238 LTTNG_ERR_UST_CHAN_EXIST
= 57,
242 \link lttng_enable_channel() create\endlink a user space
245 LTTNG_ERR_UST_CHAN_FAIL
= 58,
247 /// User space \lt_obj_channel not found.
248 LTTNG_ERR_UST_CHAN_NOT_FOUND
= 59,
251 Failed to \link lttng_disable_channel() disable\endlink
252 a user space \lt_obj_channel.
254 LTTNG_ERR_UST_CHAN_DISABLE_FAIL
= 60,
256 /// Failed to create/enable a user space \lt_obj_rer.
257 LTTNG_ERR_UST_ENABLE_FAIL
= 63,
259 /// Failed to disable a user space \lt_obj_rer.
260 LTTNG_ERR_UST_DISABLE_FAIL
= 64,
263 User space tracer: failed to
264 \link lttng_start_tracing() start tracing\endlink.
266 LTTNG_ERR_UST_START_FAIL
= 66,
269 User space tracer: failed to
270 \link lttng_stop_tracing() stop tracing\endlink.
272 LTTNG_ERR_UST_STOP_FAIL
= 67,
274 /// Failed to start a 64-bit user space consumer daemon.
275 LTTNG_ERR_UST_CONSUMER64_FAIL
= 68,
277 /// Failed to start a 32-bit user space consumer daemon.
278 LTTNG_ERR_UST_CONSUMER32_FAIL
= 69,
280 /// \lt_obj_c_session has no \lt_obj_channels.
281 LTTNG_ERR_NO_CHANNEL
= 72,
283 /// \lt_obj_c_session name contains an invalid character.
284 LTTNG_ERR_SESSION_INVALID_CHAR
= 73,
286 /// Failed to list user space \lt_obj_rers.
287 LTTNG_ERR_UST_LIST_FAIL
= 74,
289 /// User space \lt_obj_rer already exists.
290 LTTNG_ERR_UST_EVENT_EXIST
= 75,
292 /// User space \lt_obj_rer not found.
293 LTTNG_ERR_UST_EVENT_NOT_FOUND
= 76,
296 \link lttng_add_context() Context field\endlink to be recorded
297 to the event records of a user space
298 \lt_obj_channel already exists.
300 LTTNG_ERR_UST_CONTEXT_EXIST
= 77,
304 \link #lttng_event_context_type context field type\endlink.
306 LTTNG_ERR_UST_CONTEXT_INVAL
= 78,
309 A root session daemon is required, but isn't available.
311 See \ref api-gen-sessiond-conn "Session daemon connection".
313 LTTNG_ERR_NEED_ROOT_SESSIOND
= 79,
316 \lt_obj_c_session is already
317 \link lttng_session::enabled active\endlink (started).
319 LTTNG_ERR_TRACE_ALREADY_STARTED
= 80,
322 \lt_obj_c_session is already
323 \link lttng_session::enabled inactive\endlink (stopped).
325 LTTNG_ERR_TRACE_ALREADY_STOPPED
= 81,
327 /// Linux kernel instrumentation point type not supported.
328 LTTNG_ERR_KERN_EVENT_ENOSYS
= 82,
331 A \lt_obj_channel name is required because
332 a non-default channel exists within the selected
333 \lt_obj_session and \lt_obj_domain.
335 LTTNG_ERR_NEED_CHANNEL_NAME
= 83,
338 \lt_obj_c_channel name is required because a
339 non-default channel exists within the \lt_obj_session.
341 LTTNG_ERR_NO_UST
= 84,
344 \ref api_session_save_load "Recording session configuration file"
347 LTTNG_ERR_SAVE_FILE_EXIST
= 85,
350 I/O error while writing a
351 \ref api_session_save_load "recording session configuration file".
353 LTTNG_ERR_SAVE_IO_FAIL
= 86,
357 \ref api_session_save_load "recording session configuration file".
359 LTTNG_ERR_LOAD_INVALID_CONFIG
= 87,
362 I/O error while reading a
363 \ref api_session_save_load "recording session configuration file".
365 LTTNG_ERR_LOAD_IO_FAIL
= 88,
368 \ref api_session_save_load "Recording session configuration file"
371 LTTNG_ERR_LOAD_SESSION_NOENT
= 89,
374 Maximum total size of all the
375 \ref api_session_snapshot "snapshot" trace files is invalid.
377 LTTNG_ERR_MAX_SIZE_INVALID
= 90,
383 /// Invalid parameter (unsatisfied precondition).
384 LTTNG_ERR_INVALID
= 97,
386 /// No user space consumer daemon available.
387 LTTNG_ERR_NO_USTCONSUMERD
= 98,
389 /// No Linux kernel consumer daemon available.
390 LTTNG_ERR_NO_KERNCONSUMERD
= 99,
392 /// Missing network data \ref api-session-url "URL".
393 LTTNG_ERR_URL_DATA_MISS
= 101,
395 /// Missing network control \ref api-session-url "URL".
396 LTTNG_ERR_URL_CTRL_MISS
= 102,
398 /// Failed to communicate with a consumer daemon.
399 LTTNG_ERR_ENABLE_CONSUMER_FAIL
= 103,
402 Failed to connect to or communicate with a relay daemon
403 (see \lt_man{lttng-relayd,8}).
405 LTTNG_ERR_RELAYD_CONNECT_FAIL
= 104,
407 /// Incompatible relay daemon (see \lt_man{lttng-relayd,8}) version.
408 LTTNG_ERR_RELAYD_VERSION_FAIL
= 105,
411 Invalid \link lttng_enable_event_with_filter() context and event
412 payload filter expression\endlink.
414 LTTNG_ERR_FILTER_INVAL
= 106,
417 Failed to allocate memory for a context and event payload filter
420 LTTNG_ERR_FILTER_NOMEM
= 107,
422 /// No available consumer daemon.
423 LTTNG_ERR_NO_CONSUMER
= 109,
427 \link lttng_enable_event_with_exclusions() exclusion\endlink
430 LTTNG_ERR_EXCLUSION_INVAL
= 110,
432 /// Failed to allocate memory for an event name exclusion object.
433 LTTNG_ERR_EXCLUSION_NOMEM
= 111,
435 /// Invalid event name condition part of a \lt_obj_rer.
436 LTTNG_ERR_INVALID_EVENT_NAME
= 112,
438 /// Invalid \lt_obj_channel name.
439 LTTNG_ERR_INVALID_CHANNEL_NAME
= 113,
442 Process attribute is already part of an
443 \ref api_pais "inclusion set".
445 LTTNG_ERR_PROCESS_ATTR_EXISTS
= 114,
448 Process attribute isn't part of an
449 \ref api_pais "inclusion set".
451 LTTNG_ERR_PROCESS_ATTR_MISSING
= 115,
453 /// Invalid \lt_obj_domain for \lt_obj_channel.
454 LTTNG_ERR_INVALID_CHANNEL_DOMAIN
= 116,
457 LTTNG_ERR_OVERFLOW
= 117,
460 \lt_obj_c_session isn't
461 \link lttng_session::enabled active\endlink (started).
463 LTTNG_ERR_SESSION_NOT_STARTED
= 118,
466 Unsupported LTTng \ref api-session-live-mode "live" recording
469 LTTNG_ERR_LIVE_SESSION
= 119,
473 \ref api-channel-per-proc-buf "per-process buffering scheme".
475 LTTNG_ERR_PER_PID_SESSION
= 120,
478 \link #lttng_event_context_type Context field type\endlink
479 isn't available on the current Linux kernel.
481 LTTNG_ERR_KERN_CONTEXT_UNAVAILABLE
= 121,
484 Failed to \link lttng_regenerate_statedump() regenerate the
485 LTTng state dump event records\endlink.
487 LTTNG_ERR_REGEN_STATEDUMP_FAIL
= 122,
490 Failed to allocate memory to \link lttng_regenerate_statedump()
491 regenerate the LTTng state dump event records\endlink.
493 LTTNG_ERR_REGEN_STATEDUMP_NOMEM
= 123,
496 \lt_obj_c_session isn't in
497 \ref api-session-snapshot-mode "snapshot mode".
499 LTTNG_ERR_NOT_SNAPSHOT_SESSION
= 124,
501 /// Invalid \lt_obj_trigger.
502 LTTNG_ERR_INVALID_TRIGGER
= 125,
504 /// \lt_obj_c_trigger already exists (registered).
505 LTTNG_ERR_TRIGGER_EXISTS
= 126,
507 /// \lt_obj_c_trigger not found.
508 LTTNG_ERR_TRIGGER_NOT_FOUND
= 127,
511 \ref api_session_rotation "Recording session rotation" operation
514 LTTNG_ERR_ROTATION_PENDING
= 129,
517 \ref api_session_rotation "Recording session rotation" feature
518 isn't available for the \ref api-session-modes "mode" of the
519 given recording session.
521 LTTNG_ERR_ROTATION_NOT_AVAILABLE
= 130,
524 \ref api_session_rotation "Recording session rotation" schedule
527 LTTNG_ERR_ROTATION_SCHEDULE_SET
= 131,
530 \ref api_session_rotation "Recording session rotation" schedule
533 LTTNG_ERR_ROTATION_SCHEDULE_NOT_SET
= 132,
537 \ref api_session_rotation "archived the current trace chunk" of
538 the recording session since it became
539 \link lttng_session::enabled inactive\endlink (stopped).
541 LTTNG_ERR_ROTATION_MULTIPLE_AFTER_STOP
= 133,
544 Linux kernel tracer: unavailable
545 \ref api_session_rotation "recording session rotation" feature.
547 LTTNG_ERR_ROTATION_WRONG_VERSION
= 134,
549 /// \lt_obj_c_session has no configured output.
550 LTTNG_ERR_NO_SESSION_OUTPUT
= 135,
553 Relay daemon: unavailable
554 \ref api_session_rotation "recording session rotation" feature.
556 LTTNG_ERR_ROTATION_NOT_AVAILABLE_RELAY
= 136,
558 /// Unavailable logging instrumentation point feature.
559 LTTNG_ERR_AGENT_TRACING_DISABLED
= 137,
561 /// Invalid user space probe location.
562 LTTNG_ERR_PROBE_LOCATION_INVAL
= 138,
564 /// Failed to parse ELF file.
565 LTTNG_ERR_ELF_PARSING
= 139,
568 SystemTap User-level Statically Defined Tracing (USDT) probe
569 guarded by a semaphore.
571 LTTNG_ERR_SDT_PROBE_SEMAPHORE
= 140,
574 Consumer daemon failed to perform a
575 \ref api_session_rotation "recording session rotation"
578 LTTNG_ERR_ROTATION_FAIL_CONSUMER
= 141,
580 /// \lt_obj_c_channel not found.
581 LTTNG_ERR_CHAN_NOT_FOUND
= 146,
585 \ref api_session_snapshot "snapshot" with the current
586 recording session configuration.
588 LTTNG_ERR_SNAPSHOT_UNSUPPORTED
= 147,
590 /// Nonexistent \lt_obj_session.
591 LTTNG_ERR_SESSION_NOT_EXIST
= 148,
594 Consumer daemon failed to create a
595 \ref api_session_rotation "trace chunk archive".
597 LTTNG_ERR_CREATE_TRACE_CHUNK_FAIL_CONSUMER
= 149,
600 Consumer daemon failed to close a
601 \ref api_session_rotation "trace chunk archive".
603 LTTNG_ERR_CLOSE_TRACE_CHUNK_FAIL_CONSUMER
= 150,
605 /// Invalid protocol.
606 LTTNG_ERR_INVALID_PROTOCOL
= 152,
608 /// Failed to create a file.
609 LTTNG_ERR_FILE_CREATION_ERROR
= 153,
611 /// Failed to stop a timer.
612 LTTNG_ERR_TIMER_STOP_ERROR
= 154,
616 \ref api_session_rotation "recording session rotation" feature
619 LTTNG_ERR_ROTATION_NOT_AVAILABLE_KERNEL
= 155,
622 The relay daemon (see \lt_man{lttng-relayd,8}) doesn't allow
623 \ref api_session_clear "recording session clearing" operations.
625 LTTNG_ERR_CLEAR_RELAY_DISALLOWED
= 156,
628 The relay daemon (see \lt_man{lttng-relayd,8}) doesn't support
630 \ref api_session_clear "recording session clearing" operation.
632 LTTNG_ERR_CLEAR_NOT_AVAILABLE_RELAY
= 157,
635 Consumer daemon failed to
636 \ref api_session_clear "clear the recording session".
638 LTTNG_ERR_CLEAR_FAIL_CONSUMER
= 158,
642 \ref api_session_clear "cleared the recording session" since it
643 became \link lttng_session::enabled inactive\endlink (stopped).
645 LTTNG_ERR_ROTATION_AFTER_STOP_CLEAR
= 159,
647 /* Unix user not found. */
648 LTTNG_ERR_USER_NOT_FOUND
= 160,
650 /* Unix group not found. */
651 LTTNG_ERR_GROUP_NOT_FOUND
= 161,
653 /* Unsupported \lt_obj_domain. */
654 LTTNG_ERR_UNSUPPORTED_DOMAIN
= 162,
657 Invalid operation considering the policy of the
658 \ref api_pais "process attribute inclusion set".
660 LTTNG_ERR_PROCESS_ATTR_TRACKER_INVALID_TRACKING_POLICY
= 163,
663 Failed to initialize the file descriptor of the event notifier
666 LTTNG_ERR_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD
= 164,
668 /// Invalid event field capture expression.
669 LTTNG_ERR_INVALID_CAPTURE_EXPRESSION
= 165,
671 /// Failed to register the event notifier to the tracer.
672 LTTNG_ERR_EVENT_NOTIFIER_REGISTRATION
= 166,
674 /// Failed to initialize the event notifier error accounting.
675 LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING
= 167,
677 /// Event notifier error accouting is full.
678 LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING_FULL
= 168,
680 /// Invalid error query target.
681 LTTNG_ERR_INVALID_ERROR_QUERY_TARGET
= 169,
683 /// Failed to flush a buffer.
684 LTTNG_ERR_BUFFER_FLUSH_FAILED
= 170,
686 /* MUST be last element of the manually-assigned section of the enum */
687 /// @cond INTERNAL_ERR_CODES
691 /* Backward-compatibility assignments */
693 Process attribute is already part of an
694 \ref api_pais "inclusion set".
697 Use #LTTNG_ERR_PROCESS_ATTR_EXISTS.
699 LTTNG_ERR_PID_TRACKED
= LTTNG_ERR_PROCESS_ATTR_EXISTS
,
702 Process attribute isn't part of an
703 \ref api_pais "inclusion set".
706 Use #LTTNG_ERR_PROCESS_ATTR_MISSING.
708 LTTNG_ERR_PID_NOT_TRACKED
= LTTNG_ERR_PROCESS_ATTR_MISSING
,
713 Returns a human-readable message for the general error code
716 @param[in] error_code
717 Error code (one of the #lttng_error_code enumerators), positive or
718 negative, for which to get a corresponding human-readable message.
721 Human-readable message which corresponds to \lt_p{error_code}.
724 \lt_p{error_code} is a valid #lttng_error_code enumerator.
726 LTTNG_EXPORT
extern const char *lttng_strerror(int error_code
);
734 #endif /* LTTNG_ERROR_H */