@olivierlambert thanks
Just to limit the amount of data here is the db init part from xensource.log
Jan 2 15:21:46 expo xapi: [debug||0 |Setup DB configuration D:888c979e4a5e|parse_db_conf]
Jan 2 15:21:46 expo xapi: [debug||0 |server_init D:02d6bb70f07f|startup] task [starting up database engine]
Jan 2 15:21:46 expo xapi: [debug||0 |server_init D:02d6bb70f07f|dummytaskhelper] task starting up database engine D:2a59ed50ccb5 created by task D:02d6bb70f07f
Jan 2 15:21:46 expo xapi: [debug||0 |starting up database engine D:2a59ed50ccb5|xapi] Attempting to populate database from one of these locations: [/var/lib/xcp/state.db]
Jan 2 15:21:46 expo xapi: [debug||0 |starting up database engine D:2a59ed50ccb5|xapi] Dbconf contains: /var/lib/xcp/state.db (generation 46799956)
Jan 2 15:21:46 expo xapi: [debug||0 |starting up database engine D:2a59ed50ccb5|xapi] Most recent db is /var/lib/xcp/state.db (generation 46799956)
Jan 2 15:21:46 expo xapi: [debug||0 |starting up database engine D:2a59ed50ccb5|sql] attempting to restore database from /var/lib/xcp/state.db
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] starting up database engine D:2a59ed50ccb5 failed with exception Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] Raised Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 1/15 xapi Raised at file src/xmlm.ml, line 330
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 2/15 xapi Called from file ocaml/database/db_xml.ml, line 201
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 3/15 xapi Called from file ocaml/database/db_xml.ml, line 233
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 4/15 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 5/15 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 6/15 xapi Called from file ocaml/database/backend_xml.ml, line 43
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 7/15 xapi Called from file ocaml/database/db_cache_impl.ml, line 415
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 8/15 xapi Called from file ocaml/database/db_cache_impl.ml, line 542
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 9/15 xapi Called from file ocaml/xapi/xapi.ml, line 85
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 10/15 xapi Called from file ocaml/xapi/xapi.ml, line 99
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 11/15 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 12/15 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 13/15 xapi Called from file ocaml/xapi/server_helpers.ml, line 75
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 14/15 xapi Called from file ocaml/xapi/server_helpers.ml, line 97
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace] 15/15 xapi Called from file ocaml/libs/log/debug.ml, line 250
Jan 2 15:21:46 expo xapi: [error||0 |server_init D:02d6bb70f07f|backtrace]
Jan 2 15:21:46 expo xapi: [ warn||0 |server_init D:02d6bb70f07f|startup] task [starting up database engine] exception: Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] server_init D:02d6bb70f07f failed with exception Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] Raised Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 1/14 xapi Raised at file ocaml/libs/log/debug.ml, line 271
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 2/14 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 3/14 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 4/14 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 5/14 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 6/14 xapi Called from file ocaml/xapi/startup.ml, line 95
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 7/14 xapi Called from file ocaml/xapi/startup.ml, line 103
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 8/14 xapi Called from file list.ml, line 110
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 9/14 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 10/14 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 11/14 xapi Called from file ocaml/xapi/xapi.ml, line 1071
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 12/14 xapi Called from file ocaml/xapi/server_helpers.ml, line 75
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 13/14 xapi Called from file ocaml/xapi/server_helpers.ml, line 97
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace] 14/14 xapi Called from file ocaml/libs/log/debug.ml, line 250
Jan 2 15:21:46 expo xapi: [error||0 |Xapi.watchdog|backtrace]
Jan 2 15:21:46 expo xapi: [debug||0 |Xapi.watchdog|xapi] xapi top-level caught exception: INTERNAL_ERROR: [ Xmlm.Error(2:317874, "malformed character stream") ]
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] Xapi.watchdog failed with exception Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] Raised Xmlm.Error(2:317874, "malformed character stream")
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 1/11 xapi Raised at file ocaml/libs/log/debug.ml, line 271
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 2/11 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 3/11 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 4/11 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 24
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 5/11 xapi Called from file ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml, line 39
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 6/11 xapi Called from file ocaml/xapi/xapi.ml, line 1070
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 7/11 xapi Called from file ocaml/xapi/xapi.ml, line 1526
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 8/11 xapi Called from file ocaml/xapi/xapi.ml, line 1534
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 9/11 xapi Called from file ocaml/xapi/xapi.ml, line 1540
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 10/11 xapi Called from file ocaml/xapi/xapi.ml, line 1545
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace] 11/11 xapi Called from file ocaml/libs/log/debug.ml, line 250
Jan 2 15:21:46 expo xapi: [error||0 ||backtrace]