Comment 11 for bug 1001189

Revision history for this message
Paul Crawford (psc-sat) wrote : Re: [Bug 1001189] Re: 'man' command fails with lseek error

> As far as the first question: Does "/packages/local/share/man/" get opened
> and/or stat-ed in the strace when you run "man" on the Lucid box and from
> other accounts on the Precise box?

It seems not.

> Is $MANPATH set differently in the different accounts?

There is no $MANPATH variable set on either machine, and the
/etc/manpath.config files appear identical on 10.04 and 12.04

> Is /packages/local/ a shared network mount available on the Lucid box, too
> (or something like that), or is it unique to the Precise box?

Yes, it is nfs auto-mounted and available on both machines and to all
NIS accounts.

> What are the access permissions on the directories in the
> /packages/local/share/man path? (I'm wondering if somehow "opr" is the only
> one able to access that index.db file?)

I can access it with other accounts, so it is not a permission issue.

> $ file /var/cache/man/index.db
> /var/cache/man/index.db: GNU dbm 1.x or ndbm database, little endian
>
> What does it report for your /packages index.db file?

The same description:
$ file /packages/local/share/man/index.db
/packages/local/share/man/index.db: GNU dbm 1.x or ndbm database, little
endian
However, I don't know if there are other variations in the DB format
that are not reported by the 'file' command.

There is something controlling the order of reading index files though,
as if I run strace and then look for index.db in the results I get this
for the opr account on 12.04:

$ grep 'index\.db' /tmp/man.txt
stat64("/packages/local/man/index.db", {st_mode=S_IFREG|0644,
st_size=3208201, ...}) = 0
stat64("/packages/local/man/index.db", {st_mode=S_IFREG|0644,
st_size=3208201, ...}) = 0
stat64("/packages/local/man/index.db", {st_mode=S_IFREG|0644,
st_size=3208201, ...}) = 0
open("/var/cache/man/local/index.db", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/packages/local/share/man/index.db", O_RDONLY) = 3

But with another account I get:

$ grep 'index\.db' /tmp/man1.txt
open("/var/cache/man/local/index.db", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3
open("/var/cache/man/en_GB/index.db", O_RDONLY) = 3

And with opr an my 10.04 box I get:

$ grep 'index\.db' /tmp/man.txt
open("/var/cache/man/local/index.db", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/var/cache/man/index.db", O_RDONLY) = 3

So in all of these cases, it tries /var/cache/man/local/index.db and
fails, but then the next one it tries differs, and in the case of opr on
12.04 it tries /packages/local/share/man/index.db which opens but then
breaks the fseek() step. On another machine/account it tries something
else which succeeds and then it is happy.