procfs needed by process component as of Piwik 2.2 #5041
As of Piwik 2.2, the locking mechanics of the new process component uses "ps -e" to check for a given PID.
Therefore, the process environment needs a mounted proc file system, which is not present on all servers.
So we should check for the presence of procfs.
The text was updated successfully, but these errors were encountered:
I need to reopen this issue because this check is not sufficient and I think it is not requried.
The problem with the current solution is that it does not check if procfs is mounted. For example I have a shared hosting with no procfs:
A mounted /proc and not mounted /proc has both a "stream" resource type. So is_resource() is not sufficient enough to test if /proc is really mounted or not.
But there is an error anyway when ps is executed under such conditions
So the check returnsSuccessCode('ps') should already handle this situation. Or was there a case where this check was wrong?
What output do you get from these commands? maybe you know how we can patch the is_resource line?
Maybe it is possible to check if /proc/version or something like that exists and can be read? Would be interesting why the returnSuccessCode('ps') is true if /proc can not be accessed.
I think that line is the problem. Why haven't I seen this before?
the single & brings ps to the background which is successfull and returns always 0. But the return value of ps itself is 1 in my case. But that is not checked with this command. This line should do the trick:
For what it's worth, this continues to be a problem on FreeBSD.
RELEASE FreeBSD 8.2-RELEASE !#0
Sorry I don't have the technical chops to explain why. I have patched core/CliMulti/Process.php to always return false, and Piwik is working fine.
The error reported by Piwik whenever cron runs console core:archive:
ps: Process environment requires procfs(5)