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

Paul Crawford 1001189 at bugs.launchpad.net
Sat May 19 13:03:09 UTC 2012


Running it with strace produced this near the end:

open("/packages/local/share/man/index.db", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3208201, ...}) = 0
fcntl64(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
read(3, "\316\232W\23\0\0\20\0\0\0\20\0\0\0\0\0\0\0\20\0\21\0\0\0\0\0\20\0\246\252\0\0"..., 52) = 52
mmap2(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb72b7000
read(3, "\0\0\0\0\5\0\0\0\0\0\0\0\253\0300\0\0\0\0\0\17\0\0\0\0\0\0\0003\2370\0"..., 1048524) = 1048524
lseek(3, 1048576, SEEK_SET)             = 1048576
read(3, "", 0)                          = 0
lseek(3, 3078034552, SEEK_SET)          = -1 EINVAL (Invalid argument)
write(2, "gdbm fatal: ", 12gdbm fatal: )            = 12


The file it read is nowhere near as big as the lssek(3, 3078034552, SEEK_SET) tried to position, and it should know that from the fstat64() call just above! The file is:

$ ls  -l /packages/local/share/man/index.db
-rw-r--r-- 1 man daemon 3208201 Nov 30 10:15 /packages/local/share/man/index.db

I don't know why it attempted to go that far, presumably it is reading
an offset from the database and that is now wrong?

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