[Bug 1001189] Re: 'man' command fails with lseek error

Paul Crawford 1001189 at bugs.launchpad.net
Sun May 20 16:28:42 UTC 2012


> 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.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to man-db in Ubuntu.
https://bugs.launchpad.net/bugs/1001189

Title:
  'man' command fails with lseek error

Status in “man-db” package in Ubuntu:
  New

Bug description:
  When trying to look up the on-line documentation using the 'man'
  command it fails on 12.04 with lseek error. For example:

  $ man resolvconf
  gdbm fatal: lseek error

  This lseek error applies to other requests as well (e.g. ls, fdisk,
  etc). System information is:

  $ lsb_release -rd
  Description:	Ubuntu 12.04 LTS
  Release:	12.04

  apt-cache policy man
  man:
    Installed: (none)
    Candidate: (none)
    Version table:

  However, it is installed since it runs as a command, and I find:

  $ which man
  /usr/bin/man

  $ man --version
  man 2.6.1

  What I expect is to read the manual page appropriate to the
  command/program, and not get a software error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/man-db/+bug/1001189/+subscriptions




More information about the foundations-bugs mailing list