Package: quota
Version: 3.13-10
We encountered the following strange behavior of new quota utils from
Debian testing repository:
# quota -v
quota: error while getting quota from /dev/vzfs for 0: Bad address
We started to investigate the problem. Here is the strace:
# strace quota -v 2>&1 | tail -10
stat64("/dev/vzfs", {st_mode=S_IFBLK|010, st_rdev=makedev(0, 33), ...}) = 0
quotactl(Q_GETFMT|USRQUOTA, "/dev/vzfs", 0, {578035665271259138,
578057415120239672, 577865901319912296, 134589488, 1095216660491,
578057071388263424, 578057140242328624, 13835056388969442296}) = 0
quotactl(Q_GETINFO|USRQUOTA, "/dev/vzfs", 0, {0, 0, 30064771072,
18446744069549173800, 13833926829750463528, 578057415120200463, 0, 0}) = 0
geteuid32() = 0
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/vzfs", 0, {0, 0, 1263966208, 0, 0,
50600, 0, 0}) = 0
write(2, "quota: ", 7quota: ) = 7
write(2, "error while getting quota from /"..., 60error while getting
quota from /dev/vzfs for 0: Bad address
) = 60
exit_group(0) = ?
Process 15700 detached
So quotactl returns 0. Message "error while getting quota from" appears
only in one place in quota source code - ./quotaops.c:
...
if (!(q = handles[i]->qh_ops->read_dquot(handles[i], id))) {
/* If rpc.rquotad is not running filesystem
might be just without quotas... */
if (errno != ENOENT && (errno != ECONNREFUSED ||
!quiet))
errstr(_("%s: error while getting quota
from %s for %u: %s\n"),
name, handles[i]->qh_quotadev,
id, strerror(errno));
continue;
}
...
It means, that v2_read_dquot() returns not NULL. We compiled quota from
sources,
and using gdb/debug printf explore that actually these function doesn't
return NULL!
Consequently some problem with stack. First we thought, that the problem
is in system call, but then
it appeared that gcc optimization is guilty! Changing optimization to
-O0 instead -02 in
quota's Makefile helps!
# gcc --version
gcc (GCC) 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# ls -l /lib/libc.so.6
lrwxr-xr-x 1 root root 13 Sep 4 14:18 /lib/libc.so.6 -> libc-2.3.6.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]