SDP-246

C. Thomas Tyler
Closed
Sourcing p4_vars hangs if live_checkpoint.sh is running.

Clearly the 'p4d -cshow' check is the culprit here.

There is a reasonable expectation when sourcing an environment file
that:
* it'll take about a millisecond, perhaps only a nanosecond, and
* it won't do anything 'active', only setup the environment.

With the recent fix to avoid calling 'p4d -cshow' if there are no
db.* files, we are no longer doing anything active.  Yay.

This was first experienced when doing a 'sudo su - perforce'
was done; it hanged when a live_checkpoint.sh was running,
as the ~perforce/.bashrc file contained a line to do
'source /p4/common/bin/p4_vars N', which is a common and
reasonable thing to do.

This may be related to SDP-245.
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
tom_tyler
Reported Date
Modified By
swarm-user
Modified Date
Owned By
tom_tyler
Dev Notes
2020/12/13 ttyler:
I had expected this P4D server job, released in P4D 2019.2 Patch 2,
would be the fix for this:

#1898491 (Job #93870) **
    'p4d -cset', 'p4d -cunset' and 'p4d -cshow' no longer take write
    locks on all tables; instead only the tables required are locked.
    'p4d -cshow' now only takes read locks.

That is good, however not sufficient.  With P4D 2020.2 For example, if
load_checkpoint.sh is running to reseed a replica, sourcing p4_vars
still hangs for that instance. An SDP fix is needed.
Component
core-unix
Type
Bug