xc_fcntl_lock failed errno:9

450 views
Skip to first unread message

Joyce Babu

unread,
Sep 4, 2013, 2:14:34 AM9/4/13
to xca...@googlegroups.com
From PHP , when I try to do 

exec("php -f /path/to/file.php", $output, $rval);

it fails with the error message 

 <b>Fatal error</b>:  xc_fcntl_lock failed errno:9 in <b>/path/to/file.php</b> on line <b>4</b><br />

If I change xcache.mmap_path to an existing file or directory, the error goes away. If xcache.mmap_path is set to /dev/zero or a non existent file, the error re-appears. Also, I am unable to replicate the error when running the command (php -f /path/to/file.php) directly via SSH.

Apache is running as user nobody. I tried XCache versions 3.0.1, 3.0.2, 3.0.3.

xcache

unread,
Sep 4, 2013, 2:17:51 AM9/4/13
to xca...@googlegroups.com
"nobody" has no permission access to /dev/zero or your "/non-existing-file"
try chpst -u nobody touch /dev/zero, or setuidgid -u nobody touch
/dev/zero you'll get error IMHO
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "XCache" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to xcache+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

Joyce Babu

unread,
Sep 4, 2013, 3:30:02 AM9/4/13
to xca...@googlegroups.com
It did not give any error

root@venus [/package/admin/runit-2.1.1]# chpst -u nobody touch /dev/zero
root@venus [/package/admin/runit-2.1.1]# echo $?
0

While going through the error log, I found that the apache has the environment variable TMP set to /root/tmp. Xcache is not having permission to write to this directory. I am trying to configure EasyApache to remove this variable. Could this be connected to the issue?

xcache

unread,
Sep 4, 2013, 3:44:35 AM9/4/13
to xca...@googlegroups.com
sorry. the fcntl uses $TMP regardless of mmap_path. and this is the
problem. please fix TMP variable

On 9/4/13, Joyce Babu <jo...@joycebabu.com> wrote:
Reply all
Reply to author
Forward
0 new messages