Debian Codegraph @

doc/source/reference/commands/thread_dump.rst

raw
1 .. -*- rst -*-
2
3 .. groonga-command
4 .. database: commands_thread_dump
5
6 .. groonga-command
7 .. thread_dump
8
9 ``thread_dump``
10 ===============
11
12 Summary
13 -------
14
15 .. versionadded:: 11.1.1
16
17 .. note::
18
19 Currently, this command works only on Windows.
20
21 ``thread_dump`` has the following a features:
22
23 * ``thread_dump`` puts a backtrace of all threads into a log as logs of
24 NOTICE level at the time of running this command as below.
25
26 For example, ``thread_dump`` puts a backtrace in a log as below.
27
28 .. code-block::
29
30 2021-12-22 11:10:33.518000|n| -- Thread 00008052 --
31 2021-12-22 11:10:33.582000|n| (unknown):0:0: ZwGetContextThread(): <ntdll>: <C:\Windows\SYSTEM32\ntdll.dll>
32 2021-12-22 11:10:33.591000|n| (unknown):0:0: ??_C@_0BA@PIIKBMGH@grn_thread_dump@(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
33 2021-12-22 11:10:33.591000|n| (unknown):0:0: ??_C@_0CC@GMBIJECC@D?3?2a?2groonga?2groonga?2lib?2thread@(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
34 2021-12-22 11:10:33.591000|n| (unknown):0:0: (unknown)(): <(unknown)>: <(unknown)>
35 2021-12-22 11:10:33.591000|n| (unknown):0:0: (unknown)(): <(unknown)>: <(unknown)>
36 2021-12-22 11:10:33.591000|n| (unknown):0:0: (unknown)(): <(unknown)>: <(unknown)>
37 2021-12-22 11:10:33.591000|n| (unknown):0:0: ??_C@_0BG@NHAMHJPM@?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9@(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
38 2021-12-22 11:10:33.592000|n| D:\a\groonga\groonga\lib\thread.c:148:0: grn_thread_dump(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
39 2021-12-22 11:10:33.593000|n| D:\a\groonga\groonga\lib\proc\proc_thread.c:87:0: command_thread_dump(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
40 2021-12-22 11:10:33.593000|n| D:\a\groonga\groonga\lib\expr.c:1624:0: grn_proc_call(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
41 2021-12-22 11:10:33.594000|n| D:\a\groonga\groonga\lib\command.c:193:0: grn_command_run(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
42 2021-12-22 11:10:33.594000|n| D:\a\groonga\groonga\lib\expr.c:1660:0: grn_expr_exec(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
43 2021-12-22 11:10:33.594000|n| D:\a\groonga\groonga\lib\ctx.c:1716:0: grn_ctx_qe_exec(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
44 2021-12-22 11:10:33.597000|n| D:\a\groonga\groonga\lib\ctx.c:1828:0: grn_ctx_send(): <libgroonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\libgroonga.dll>
45 2021-12-22 11:10:33.597000|n| D:\a\groonga\groonga\src\groonga.c:574:0: do_alone(): <groonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\groonga.exe>
46 2021-12-22 11:10:33.597000|n| D:\a\groonga\groonga\src\groonga.c:4652:22: main(): <groonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\groonga.exe>
47 2021-12-22 11:10:33.601000|n| d:\a01\_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:34: __scrt_common_main_seh(): <groonga>: <C:\Users\aaa\groonga-11.1.1-8988854-x64-vs2019-with-vcruntime\bin\groonga.exe>
48 2021-12-22 11:10:33.601000|n| (unknown):0:0: BaseThreadInitThunk(): <KERNEL32>: <C:\Windows\System32\KERNEL32.DLL>
49 2021-12-22 11:10:33.601000|n| (unknown):0:0: RtlUserThreadStart(): <ntdll>: <C:\Windows\SYSTEM32\ntdll.dll>
50 2021-12-22 11:10:33.603000|n| ---------------------
51 2021-12-22 11:10:33.603000|n| -- Thread 00007860 --
52 2021-12-22 11:10:33.607000|n| (unknown):0:0: NtWaitForWorkViaWorkerFactory(): <ntdll>: <C:\Windows\SYSTEM32\ntdll.dll>
53 2021-12-22 11:10:33.610000|n| (unknown):0:0: TpReleaseCleanupGroupMembers(): <ntdll>: <C:\Windows\SYSTEM32\ntdll.dll>
54 2021-12-22 11:10:33.610000|n| (unknown):0:0: BaseThreadInitThunk(): <KERNEL32>: <C:\Windows\System32\KERNEL32.DLL>
55 2021-12-22 11:10:33.610000|n| (unknown):0:0: RtlUserThreadStart(): <ntdll>: <C:\Windows\SYSTEM32\ntdll.dll>
56 2021-12-22 11:10:33.611000|n| ---------------------
57
58 Syntax
59 ------
60
61 This command has not parameter::
62
63 thread_dump
64
65 Usage
66 -----
67
68 We can get a backtrace of all threads into a log as logs of
69 NOTICE level at the time of running this command.
70
71 .. groonga-command
72 .. include:: ../../example/reference/commands/thread_dump/usage.log
73 .. thread_dump
74
75 Parameters
76 ----------
77
78 This section describes all parameters.
79
80 Required parameters
81 ^^^^^^^^^^^^^^^^^^^
82
83 There is no required parameter.
84
85 Optional parameters
86 ^^^^^^^^^^^^^^^^^^^
87
88 There is no optional parameter.
89
90 Return value
91 ------------
92
93 The command returns `true` as body on success such as::
94
95 [HEADER, true]
96
97 If ``thread_dump`` fails, error details are in HEADER.
98
99 See :doc:`/reference/command/output_format` for ``HEADER``.