Discussion:
[p4] Multiple p4d sub processes
Michael Mirman
2016-10-25 19:14:31 UTC
Permalink
unless you tell the server to block those old client versions
In our experience, this doesn’t help much. While it rejects the query, the process actually starts anyway and hangs around forever.
"p4 monitor" does not show those processes because they really never make to the list Perforce "accepts".
If we don’t reject old versions, then Perforce takes those processes out of the process table as soon as it logs the message "completed" in the log.
Either way, the process hangs around in the process table.

I actually wrote a script that compares the running processes (from ps -efww) with the processes logged on the server (either p4broker or p4d).
If the script finds a running process, which is not in "p4 monitor" and listed as "completed" in the log, it flags it as a "leaked process".
Then, it can also kill leaked processes by specified context. Something like
leaked_processes -kill fstat -kill dot-net-api -kill P4EXP
We ended up running a cron job like this a couple of times every day on all the servers (brokers, edge servers, and commit server).

Ironically, for the last couple of years, all the leaks have been coming from people who installed Perforce on their Windows machines a long time ago, but never use it (they are Unix users).
Then, starting File Browser in some C:\users directory, which has nothing to do with Perforce clients anyway, causes P4EXP send queries to the server.
So, these people don’t even realize what's going on. We had to find these users and either ask them to uninstall Perforce or push the new version to their machines.
--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555
-----Original Message-----
Behalf Of Sambwise
Sent: Tuesday, October 25, 2016 1:05 PM
Subject: Re: [p4] Multiple p4d sub processes
Posted on behalf of forum user 'Sambwise'.
[http://forums.perforce.com/index.php?app=forums&module=forums&sec
tion=findpost&pid=20602]
There are multiple p4d processes on Linux perforce server (recent and a
few days old) and /tmp has hundreds or thousands of temp files (not
deleted by itself).��I manually delete /tmp files and abort p4d sub-
processes. Sometimes it slows down some p4 commands.
What is causing these? Can perforce plugin (Windows explorer) be the
cause?
There was a version of P4EXP a year or two ago that had a problem like that;
at various times P4SCC and P4V have had similar issues. Those have all long
since been fixed but unless you tell the server to block those old client versions
there's nothing forcing your users to upgrade.��It's also
conceivable that it's something user-written (i.e. someone using an API to
open a connection and then not close it, which is essentially what the
released
P4 clients that cause this issue are doing).��
The simplest way to find the culprit is to enable monitoring of idle processes
(I think "p4 counter monitor 2" will do this) so you can "p4
monitor show" to see who and what is responsible for those processes.
--
http://forums.perforce.com/index.php?/topic/5013-multiple-p4d-sub-
processes
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforc
Continue reading on narkive:
Loading...