"make check" fails over NFS or tmpfs

From: SODA Noriyuki <soda(at)sra(dot)co(dot)jp>
To: pgsql-general(at)postgresql(dot)org
Cc: takuya(at)soum(dot)co(dot)jp, soda(at)sra(dot)co(dot)jp
Subject: "make check" fails over NFS or tmpfs
Date: 2006-05-22 04:15:46
Message-ID: 17521.15090.901883.16485@srapc2586.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

We've encountered failures of "make check", when we put PostgreSQL
data directory on a NFS filesystem or a tmpfs filesystem.
It doesn't always fail, but fails occasionally.

Is this expected behavior of PostgreSQL?

If it's expected, what is the reason of this symptom?
I grep'ed the source code of PostgreSQL, but it seems it doesn't
use problematic operations (for NFS) like flock(2) or F_SETLK/F_SETLKW
of fcntl(2)... So, I guess (theoretically) it should work fine over
NFS or tmpfs. Only idea which strucks me is there is some nasty
bug in Linux. ;-)

Of course, we are using single instance of PostgreSQL on single
machine. i.e. We are NOT accessing the data directory from
either multiple machines or multiple PostgreSQL instances.

To give an actual example,
when we invoked the following shell script:
$ cat ~/regress-loop.sh
#!/bin/sh
loop=1
make clean
while true; do
echo "############### loop = $loop ##################"
make check
ret=$?
if [ $ret -ne 0 ]; then
echo "error @ loop = $loop (return value = $ret)"
exit $ret
fi
loop=`expr $loop + 1`
done
Errors like the following happen, sometimes:
$ sh ~/regress-loop.sh
:
:
make: *** [check] Error 2
error @ loop = 26 (return value = 2)

We observed this symptom under the following conditions:

1. putting PGDATA on NFS-async
filesystem:
NFS (async)
NFS client:
PostgreSQL version: 8.1.3
OS version: Fedora Core 3 Linux
NFS server:
OS version: Fedora Core 3 Linux
"async" is specified in /etc/exports, thus the server violates
the NFS protocol, and replys to requests before it stores
changes to its disk.
How many loops until it fails:
3000 loops or more

2. putting PGDATA on NFS
filesystem:
NFS
NFS client:
PostgreSQL version: 8.1.3
OS version: Fedora Core 4 Linux
NFS server:
OS version: Fedora Core 5 Linux
How many loops until it fails:
approximately 300 loops

3. putting PGDATA on tmpfs
filesystem:
tmpfs
PostgreSQL version: 8.1.3
OS version: Fedora Core 5 Linux
How many loops until it fails:
approximately 100 loops

This symptom never happens over ext3fs, as far as we see.
I attached the diff between expected results and actual results in
this mail.

Any ideas appreciated, except using local filesystem. ;-)
--
SODA Noriyuki

Attachment Content-Type Size
unknown_filename text/plain 372 bytes
unknown_filename text/plain 372 bytes
unknown_filename text/plain 844 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-05-22 05:05:38 Re: "make check" fails over NFS or tmpfs
Previous Message Bruno Wolff III 2006-05-22 03:40:03 Re: SQL & Binary Data Questions