Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
0915f22
Initial commit
djs55 Oct 29, 2014
fe4bf52
Add initial version of the Backtrace module
Oct 29, 2014
d9d6a0a
Add opam package definition
Oct 29, 2014
2d150f6
Regenerate OASIS
Oct 29, 2014
cdcd23d
Merge pull request #1 from djs55/initial-version
djs55 Oct 29, 2014
e6d7b3b
Use thread-local backtrace tables
Oct 31, 2014
71b92f0
Allow with_backtraces to stack
Oct 31, 2014
1e6f546
Merge pull request #2 from djs55/thread-local-tables
djs55 Oct 31, 2014
74c293e
Add support for Interoperating with other languages
Oct 31, 2014
c6886e3
Merge pull request #3 from djs55/master
djs55 Oct 31, 2014
af74045
Store the backtrace as a series of records rather than strings
Nov 19, 2014
5a0e8a8
Add CHANGES
Nov 19, 2014
5c28d84
Merge pull request #4 from djs55/improve-api
djs55 Nov 20, 2014
a51d9dc
Correct backtrace ordering by indexing from 1
simonjbeaumont Jun 12, 2015
735b2d2
Merge pull request #5 from simonjbeaumont/correct-numbering
djs55 Jun 12, 2015
2b942bc
Enable Travis using ocaml-travisci-skeleton
simonjbeaumont Jun 16, 2015
d9f6493
Add missing dependency on rpc to OPAM file
simonjbeaumont Jun 16, 2015
a35f030
Enable docgen on Travis job
simonjbeaumont Jun 16, 2015
2f9ad92
Merge pull request #6 from simonjbeaumont/docgen
euanh Jun 16, 2015
d37373c
Add docs generation to _oasis
simonjbeaumont Jun 16, 2015
be04b59
Add README badges for build status and docs
simonjbeaumont Jun 16, 2015
e40ea6b
Prepare to release 0.3
djs55 Aug 21, 2015
6d31221
Regenerate OASIS
djs55 Aug 21, 2015
06b9fa1
Merge pull request #7 from djs55/release.0.3
djs55 Aug 21, 2015
0addfa8
update library to use latest rpclib and ppx
Nov 10, 2016
609773f
Add rpclib.json as dependancy to provide Jsonrpc
Nov 22, 2016
5a4d0a5
Merge pull request #8 from xapi-project/ppx-ely
lindig Mar 8, 2017
a463077
Fix travis build; update opam file
gaborigloi Jun 2, 2017
f9e3497
Merge pull request #9 from gaborigloi/fix_travis
mseri Jun 5, 2017
beeb7c2
Sync opam file with xs-opam
gaborigloi Jun 9, 2017
4ee3ad6
Merge pull request #10 from gaborigloi/sync_opam
mseri Jun 9, 2017
4d80eef
Travis: only upload doc once, not for both jobs
gaborigloi Jun 10, 2017
d46202e
Merge pull request #11 from gaborigloi/fix_travis_doc
mseri Jun 12, 2017
78b3b6a
port to jbuilder
Aug 3, 2017
ee858c4
backtrace: silence documentation warning
Aug 3, 2017
cdc5d39
Makefile: cleanup
Aug 3, 2017
d853dcc
travis: fix build
Aug 3, 2017
f22eed6
Merge pull request #12 from mseri/master
mseri Aug 3, 2017
09b193d
Prepare to release 0.5
Aug 4, 2017
e52130d
Merge pull request #13 from mseri/master
mseri Aug 4, 2017
77e3dd9
xapi-backtrace: add support for ppx_sexp_conv.v0.11.0
May 16, 2018
9aec3ef
Merge pull request #14 from mseri/master
mseri May 16, 2018
c42aa93
Update CHANGES
mseri May 16, 2018
bb94dd6
xapi-backtrace: update opam file
May 18, 2018
a65d509
.travis: update supported ocaml
May 18, 2018
4bf68e5
backtrace: use xs-opam as base repository
May 18, 2018
ad00c42
Merge pull request #15 from mseri/master
mseri May 18, 2018
bb75ea2
jbuild: remove ppx_deriving_rpc from libraries
mseri Aug 31, 2018
ff90244
Merge pull request #16 from xapi-project/jbuild-fix
gaborigloi Aug 31, 2018
92f97a5
Simplify jbuild, quiet warnings
lindig Sep 3, 2018
55d6977
Remove dependency on full sexplib
lindig Sep 4, 2018
9e5aa46
Merge pull request #17 from lindig/master
lindig Sep 4, 2018
40dc653
Move to dune and update opam dependencies
edwintorok Sep 18, 2018
d4d16a9
Merge pull request #18 from edwintorok/dune
edwintorok Sep 18, 2018
d59f270
Add global license matching the one in the ocaml modules
psafont Feb 17, 2022
96bd584
Merge pull request #19 from psafont/license
psafont Feb 18, 2022
f8e248d
git: add .git-blame-ignore-revs
psafont Feb 25, 2026
36417b2
makefile: add check and format actions
psafont Mar 4, 2026
0e80041
Use opam 2.0 metadata
psafont Feb 25, 2026
f7d4f42
test: create cram tests
psafont Mar 4, 2026
31ae899
lib: use Stdlib for splitting strings on characters
psafont Feb 26, 2026
af9ef45
lib: return a message when there are no frames
psafont Feb 26, 2026
07344a1
lib: use Fun.protect
psafont Feb 26, 2026
6ca1cde
lib: Provide new with_backtraces to avoid printing invalid backtraces
psafont Feb 25, 2026
b77aca2
lib: Fix V1.with_backtraces to return an empty backtrace
psafont Feb 26, 2026
a7ff4cd
backtrace: keep old backtraces on reraise
psafont Mar 4, 2026
fb2c249
test: test the pattern of printing an exception and raising it
psafont Mar 6, 2026
1fab274
CP-311489 rename in fe_stubs.c to use caml_*_runtime_system()
lindig Mar 3, 2026
273a68f
CP-311489: don't use Int_val calling open()
lindig Mar 5, 2026
44f73b4
CP-311489: blkgetsize_stubs.c remove unused OCaml includes
lindig Mar 5, 2026
92a3ecb
CP-311489: xenctrlext_stubs.c avoid *_val macros in argument position
lindig Mar 5, 2026
bdf2913
CP-311489: unixpwd_stubs.c add caml_release_runtime_system()
lindig Mar 5, 2026
b169a81
xenctrlext_stubs.c: reformat to resolve space/tabs/indentation
lindig Mar 10, 2026
ae09a69
CP-311489 xenctrlext_stubs.c use more caml_release/acquire_runtime_sy…
lindig Mar 10, 2026
ffb86fb
xapi-stdext: add try_map_collect to listext
psafont Feb 24, 2026
915f25b
xapi_ha: rework error path for attaching statefile VDIs
psafont Feb 24, 2026
9853582
static_vdis: print both reference and uuid when attaching a VDI
psafont Feb 25, 2026
16fcdac
xapi/helpers: log error message from launching scripts
psafont Mar 10, 2026
ab802e6
log/debug: use Ptime's rfc3339 formatting when logging to stdout
psafont Feb 25, 2026
4ce4f4d
debug: remove ad-hoc String.split_on_char
psafont Mar 6, 2026
53984a1
debug: reformat comment
psafont Mar 6, 2026
6ab77a6
Review C bindings for for OCaml 5 (#6939)
lindig Mar 12, 2026
481913f
Enhance error recovery when enabling HA (master) (#6945)
psafont Mar 12, 2026
d2d6280
meta: prepare for release 0.8
psafont Mar 13, 2026
bedc68d
Fix reraise, provide a better with_backtraces and fix the existing on…
psafont Mar 13, 2026
35b32d6
CA-424916 don't exit thread/loop on events error
lindig Mar 13, 2026
8929d6d
Revert "Rewrite update_vm_links"
changlei-li Mar 17, 2026
be04c2b
Revert "Update VDI snapshot and parent links after import"
changlei-li Mar 17, 2026
16f104b
CA-424916 don't exit thread/loop on events error (#6950)
edwintorok Mar 17, 2026
3fb926a
CP-311892: bench_backtrace: introduce a benchmark for Pervasiveext.fi…
edwintorok Mar 13, 2025
8eb1e3a
CP-311892: Pervasiveext.finally: avoid costly backtrace formatting wh…
edwintorok Mar 13, 2025
0fefce5
CP-311893: document --minimal in xe
edwintorok Mar 17, 2026
5357000
CP-311893: document --trace in xe's help message
edwintorok Mar 17, 2026
b22e637
CP-311892: optimize Pervasiveext.finally (#6954)
edwintorok Mar 18, 2026
ea2a845
CA-424844 Revert PR #6915 (#6952)
changlei-li Mar 18, 2026
7255c2f
Add 'ocaml/libs/backtrace/' from commit 'bedc68d478e75f46ca38c83404a7…
edwintorok Mar 18, 2026
9f83de3
CP-311893: Cross-host backtrace: Store and retrieve the backtrace of …
edwintorok Apr 24, 2025
de8aa09
CP-311893: Preserve backtraces from tasks
edwintorok Apr 24, 2025
f445a2c
CP-311893: Include hostname in backtraces
edwintorok Apr 24, 2025
9280de0
CA-423760: Retain host.last_update_hash on an ejected host
minglumlu Mar 16, 2026
0470797
CA-423760: Reset host.latest_synced_updates_applied
minglumlu Mar 16, 2026
9ef93b9
[maintenance]: drop obsolete files and remove public_name
edwintorok Mar 18, 2026
eab2217
[maintenance]: ocamlformat ocaml/libs/backtrace
edwintorok Mar 18, 2026
e4da294
[maintenance]: use internal backtrace library
edwintorok Mar 18, 2026
e5f453e
CP-311893: cross host backtraces for xe --trace (#6955)
edwintorok Mar 18, 2026
a2debf0
CA-423760: Retain host.last_update_hash on an ejected host (#6951)
minglumlu Mar 19, 2026
d7f97ac
Import xapi-backtrace into XAPI (#6957)
edwintorok Mar 19, 2026
bc04e70
CP-311150: add Client.call to xen-api-client
edwintorok Jan 13, 2026
2280d33
CP-48507: log traceparent Context when available
edwintorok Jan 18, 2026
6acc5ac
CP-311150: Introduce a new internal library for tracing quicktests
edwintorok Jan 18, 2026
c670452
CP-311150: introduce a Bounded container
edwintorok Jan 18, 2026
198e518
CP-311150: introduce a simple disk backend
edwintorok Jan 18, 2026
e2b382f
CP-311150: add span_status
edwintorok Jan 18, 2026
4414beb
CP-311150: add Scope wrapper
edwintorok Jan 18, 2026
cbbf5fb
CP-311150: introduce a Sampler
edwintorok Jan 18, 2026
3d75eeb
CP-311150: introduce a SpanProcessor
edwintorok Jan 18, 2026
1f3e34a
CP-311150: introduce a Trace module
edwintorok Jan 18, 2026
9401304
CP-311150: a backend that prints a simplified trace to the console
edwintorok Jan 18, 2026
617c135
CP-311150: add opentelemetry wrappers for XAPI client RPC calls
edwintorok Jan 22, 2026
48a8046
CP-311150: introduce functor to combine backends
edwintorok Jan 18, 2026
1316037
CP-311150: test code for new library
edwintorok Jan 18, 2026
28dcef7
CP-311150: introduce wait_for_all_with_progress
edwintorok Jan 19, 2026
8a808ec
CP-311150: forward Opentelemetry W3C TraceContext headers for RPC cal…
edwintorok Jan 18, 2026
97437db
CP-311150: wrappers for XAPI objects that print the object on failure
edwintorok Jan 18, 2026
9ab3949
CP-311148: quicktest helper functions for filling memory with VMs
edwintorok Jan 22, 2026
1c9681d
CP-311148: calibrate VM memory overhead measurements
edwintorok Jan 20, 2026
2efead5
quicktest: use a memtest ISO instead of CoreOS
edwintorok Jan 5, 2026
8b9fdc1
CP-311148: add VM memory quicktest using a memtest ISO
edwintorok Feb 10, 2026
5084357
CP-311148/CP-311150: add a quicktest for XAPI memory overhead calcula…
edwintorok Mar 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
fmt
logs
mtime
xapi-backtrace
(xapi-stdext-pervasives (= :version))))

(package
Expand Down Expand Up @@ -322,7 +321,6 @@
uuidm
uutf
x509
xapi-backtrace
xapi-log
xapi-types
xapi-stdext-pervasives
Expand Down Expand Up @@ -451,7 +449,6 @@
uutf
uuidm
x509
xapi-backtrace
(xapi-client
(= :version))
(xapi-cli-protocol
Expand Down Expand Up @@ -764,7 +761,6 @@
uri
(uuid
(= :version))
xapi-backtrace
(xapi-idl
(= :version))
(xapi-log
Expand Down Expand Up @@ -795,7 +791,6 @@
rpclib
(uuid
(= :version))
xapi-backtrace
(xapi-log
(= :version))
(xapi-stdext-pervasives
Expand Down Expand Up @@ -842,7 +837,7 @@
(>= 4.08))
logs
(odoc :with-doc)
xapi-backtrace))
))

(package
(name xapi-stdext-std)
Expand Down Expand Up @@ -902,7 +897,6 @@
(>= 0.21.2)
:with-test))
(odoc :with-doc)
xapi-backtrace
unix-errno
(xapi-stdext-pervasives
(= :version))
Expand Down
2 changes: 1 addition & 1 deletion ocaml/database/dune
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
httpsvr
unix
uuid
xapi-backtrace
backtrace
xapi-datamodel
xapi-log
(re_export xapi-schema)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/forkexecd/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
rpclib.xml
unix
uuid
xapi-backtrace
backtrace
xapi-log
xapi-stdext-pervasives
xapi-stdext-unix
Expand Down
10 changes: 6 additions & 4 deletions ocaml/forkexecd/lib/fe_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <limits.h>
#include <sys/wait.h>

#include <caml/mlvalues.h>
#include <caml/threads.h>
#include <caml/fail.h>
#include <caml/memory.h>
#include <caml/unixsupport.h>
Expand Down Expand Up @@ -213,15 +215,15 @@ caml_safe_exec_with_helper(value args, value environment)
}

// potentially slow section, release Ocaml engine
caml_enter_blocking_section();
caml_release_runtime_system();

safe_exec_result res;
int err = safe_exec_with_helper(&res, c_args, c_envs);

free(c_envs);
free(c_args);

caml_leave_blocking_section();
caml_acquire_runtime_system();

// error, notify with an exception
if (err != 0)
Expand Down Expand Up @@ -395,7 +397,7 @@ caml_pidwaiter_waitpid(value timeout_value, value pid_value)
double timeout = timeout_value == Val_none ? 0 : Double_val(Some_val(timeout_value));
pid_t pid = Int_val(pid_value);

caml_enter_blocking_section();
caml_release_runtime_system();

bool timed_out = false;
int err = 0;
Expand All @@ -407,7 +409,7 @@ caml_pidwaiter_waitpid(value timeout_value, value pid_value)
timed_out = true;
}

caml_leave_blocking_section();
caml_acquire_runtime_system();

if (err)
unix_error(err, "waitpid", Nothing);
Expand Down
2 changes: 1 addition & 1 deletion ocaml/gencert/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
rresult
unix
x509
xapi-backtrace
backtrace
xapi-consts
xapi-log
xapi-inventory
Expand Down
2 changes: 1 addition & 1 deletion ocaml/idl/datamodel_lifecycle.ml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ let prototyped_of_message = function
| "PCI", "disable_dom0_access" ->
Some "24.14.0"
| "message", "destroy_all" ->
Some "26.5.0-next"
Some "26.6.0"
| "message", "destroy_many" ->
Some "22.19.0"
| "VTPM", "set_contents" ->
Expand Down
2 changes: 1 addition & 1 deletion ocaml/idl/dune
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
sexplib0
sexpr
threads
xapi-backtrace
backtrace
xapi-consts
xapi-schema
clock
Expand Down
2 changes: 2 additions & 0 deletions ocaml/idl/ocaml_backend/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
(libraries
astring
cmdliner
fmt
ptime.clock
uuidm
xapi-consts
xapi-datamodel
Expand Down
6 changes: 6 additions & 0 deletions ocaml/idl/ocaml_backend/gen_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ let gen_module api : O.Module.t =
; " | Rpc.Enum ((Rpc.String code) :: args) -> return (server_failure \
code (List.map Rpc.string_of_rpc args))"
; " | rpc -> failwith (\"Client.rpc: \" ^ Rpc.to_string rpc)"
; "type client = {rpc: Rpc.call -> Rpc.response; session_id: ref_session}"
; "type 'a api = rpc:(Rpc.call -> Rpc.response) -> session_id:ref_session \
-> 'a"
; ""
; "let call {rpc; session_id} f = f ~rpc ~session_id"
; ""
]
in
let postamble =
Expand Down
11 changes: 7 additions & 4 deletions ocaml/idl/ocaml_backend/gen_rbac.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ let internal_role_local_root = "_local_root_"

(* the output of this function is used as input by the automatic tests *)
let writer_csv static_permissions_roles =
Printf.sprintf "%s,PERMISSION/ROLE,%s\n"
(let t = Debug.gettimestring () in
String.sub t 0 (String.length t - 1)
)
let now =
let now = Ptime_clock.now () in
let str = Fmt.str "%a" Ptime.(pp_rfc3339 ~frac_s:3 ~tz_offset_s:0 ()) now in
(* remove separators between Year, Month, and Day; to keep old logging format *)
Astring.String.filter (function '-' -> false | _ -> true) str
in
Printf.sprintf "%s,PERMISSION/ROLE,%s\n" now
(* role titles are ordered by roles in roles_all *)
(List.fold_left (fun rr r -> rr ^ r ^ ",") "" Datamodel_roles.roles_all)
^ List.fold_left
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions ocaml/libs/backtrace/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_build
*.install
.merlin
26 changes: 26 additions & 0 deletions ocaml/libs/backtrace/CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## v0.8 (13-Mar-2026)
* Set a license
* Provide a new with_backtraces that prevents printing invalid traces
* Fix losing backtraces when reraising
* Add regression tests

## v0.7 (18-Sep-2018)
* Remove dependency on full sexplib
* Simplify jbuild, quiet warnings, move to dune and update opam dependencies
* jbuild: remove ppx_deriving_rpc from libraries
* Move to dune and update opam dependencies

## v0.6 (16-May-2018)
* Add support for ppx_sexp_conv >= v0.11.0

## v0.5 (04-Aug-2017)
* port to jbuilder

## v0.3 (21-Aug-2015)
* correct ordering
* add rpc to opam
* add doc gen to _oasis

## v0.2 (20-Nov-2014)
* store backtraces as lists of records rather than strings
* change the API for "importing" backtraces from other languages
Loading
Loading