This issue affects all released versions of YugabyteDB.
Database upgrade is stuck with the following error message reported in the tserver logs:
The yb-tserver logs are at /home/yugabyte/tserver/logs/
2022-01-25 17:56:49.017 UTC  FATAL: pre-existing shared memory block (key 5433001, ID 0) is still in use
2022-01-25 17:56:49.017 UTC  HINT: Terminate any old server processes associated with data directory "/data/pg_data".
This issue can be resolved by restarting or rebooting the physical node (i.e. instance from a cloud provider or any infrastructure)
This issue occurs if the upgrading of the database fails while restart ingthe tserver. This is a known issue It is being tracked here