Commit 20e5cf3
authored
CA-423574: avoid losing stacktraces in Xenopsd (#6891)
Was trying to debug a Xenctrl exception in xenopsd, but all I was seeing
was the exception, not the location it was raised.
With these 2 changes I was able to see the full stacktrace.
Here is how a working stacktrace looks like:
```
Raised Server_error(INTERNAL_ERROR, [ xenopsd internal error: Domain.Domain_build_pre_failed("Calling 'NUMA placement' failed: Xenctrlext.Unix_error(12, \\"Error when trying to claim memory pages\\")")
1/60 xenopsd-xc Raised at file ocaml/xenopsd/xc/domain.ml, line 1159
2/60 xenopsd-xc Called from file ocaml/xenopsd/xc/domain.ml, line 1210
3/60 xenopsd-xc Called from file ocaml/xenopsd/xc/domain.ml, line 1441
4/60 xenopsd-xc Called from file ocaml/xenopsd/xc/xenops_server_xen.ml, line 2589
5/60 xenopsd-xc Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
6/60 xenopsd-xc Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
7/60 xenopsd-xc Called from file ocaml/xenopsd/xc/xenops_server_xen.ml, line 2622
8/60 xenopsd-xc Called from file ocaml/xenopsd/xc/xenops_server_xen.ml, line 2653
9/60 xenopsd-xc Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
10/60 xenopsd-xc Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
11/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 103
12/60 xenopsd-xc Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
13/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 103
14/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 112
15/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 2575
16/60 xenopsd-xc Called from file list.ml, line 121
17/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 2568
18/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 2727
19/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 103
20/60 xenopsd-xc Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
21/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 103
22/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 112
23/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 2575
24/60 xenopsd-xc Called from file list.ml, line 121
25/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 2568
26/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 2727
27/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 103
28/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_task.ml, line 112
29/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 3428
30/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 3438
31/60 xenopsd-xc Called from file ocaml/xenopsd/lib/xenops_server.ml, line 3459
32/60 xenopsd-xc Called from file ocaml/xapi-idl/lib/task_server.ml, line 192
33/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3522
34/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
35/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3921
36/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3531
37/60 xapi Called from file lib/backtrace.ml, line 210
38/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3537
39/60 xapi Called from file ocaml/xapi/context.ml, line 565
40/60 xapi Called from file ocaml/xapi/context.ml, line 572
41/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3928
42/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3531
43/60 xapi Called from file ocaml/xapi/xapi_xenops.ml, line 3640
44/60 xapi Called from file ocaml/xapi/context.ml, line 565
45/60 xapi Called from file ocaml/xapi/context.ml, line 572
46/60 xapi Called from file ocaml/xapi/xapi_vm.ml, line 347
47/60 xapi Called from file ocaml/xapi/message_forwarding.ml, line 141
48/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
49/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
50/60 xapi Called from file ocaml/xapi/message_forwarding.ml, line 1990
51/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
52/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
53/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
54/60 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
55/60 xapi Called from file ocaml/xapi/message_forwarding.ml, line 1974
56/60 xapi Called from file ocaml/xapi/rbac.ml, line 228
57/60 xapi Called from file ocaml/xapi/rbac.ml, line 238
58/60 xapi Called from file ocaml/xapi/server_helpers.ml, line 78
59/60 xapi Called from file ocaml/xapi/server_helpers.ml, line 97
60/60 xapi Called from file ocaml/libs/log/debug.ml, line 270
```2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
662 | 666 | | |
663 | 667 | | |
664 | 668 | | |
| |||
0 commit comments