Skip to content

CA-423574: avoid losing stacktraces in Xenopsd#6891

Merged
edwintorok merged 2 commits intoxapi-project:masterfrom
edwintorok:private/edvint/stacktrace
Feb 5, 2026
Merged

CA-423574: avoid losing stacktraces in Xenopsd#6891
edwintorok merged 2 commits intoxapi-project:masterfrom
edwintorok:private/edvint/stacktrace

Conversation

@edwintorok
Copy link
Member

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

Signed-off-by: Edwin Török <edwin.torok@citrix.com>
Signed-off-by: Edwin Török <edwin.torok@citrix.com>
@edwintorok edwintorok force-pushed the private/edvint/stacktrace branch from 38cadcd to 3401127 Compare February 4, 2026 17:42
@edwintorok edwintorok added this pull request to the merge queue Feb 5, 2026
Merged via the queue into xapi-project:master with commit 20e5cf3 Feb 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants