We use a shell script to test end-to-end Boundary availability.
The script works as following steps.
Login with password, connect to a target, test target connectivity, cancel the session, sign out.
Each step we invoke a boundary cli command.
The first 4 commands all work normally, but the last command, signing out, which we use “boundary logout”, occationally failed with the error “Error from controller when performing delete on token Error information: Kind: Internal Message: authtokens.(Service).deleteFromRepo: unable to delete user: authtoken.(Repository).DeleteAuthToken: at_XS04wn0yAl: db.DoTx: authtoken.(Repository).DeleteAuthToken: db.Delete: unknown, unknown: error #0: dbw.Delete: ERROR: deadlock detected (SQLSTATE 40P01) Status: 500 context: Error from controller when performing delete on token”.
The PostgreSQL log is like this.
2024-08-05 08:39:55.238 GMT [1750717] ERROR: deadlock detected
2024-08-05 08:39:55.238 GMT [1750717] DETAIL: Process 1750717 waits for ShareLock on transaction 16856236; blocked by process 1750714.
Process 1750714 waits for ShareLock on transaction 16856235; blocked by process 1750717.
Process 1750717: DELETE FROM “auth_token” WHERE “auth_token”.“public_id” = $1
Process 1750714: commit
2024-08-05 08:39:55.238 GMT [1750717] HINT: See server log for query details.
2024-08-05 08:39:55.238 GMT [1750717] CONTEXT: while locking tuple (30,1) in relation “session”
SQL statement “UPDATE ONLY “public”.“session” SET “auth_token_id” = NULL WHERE $1::pg_catalog.text OPERATOR(pg_catalog.=) “auth_token_id”::pg_catalog.text”
024-08-05 08:39:55.238 GMT [1750717] STATEMENT: DELETE FROM “auth_token” WHERE “auth_token”.“public_id” = $1
Boundary: v0.16.2
PostgreSQL: 16.3