[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
This bug was fixed in the package gdbm - 1.14.1-2ubuntu1 --- gdbm (1.14.1-2ubuntu1) bionic; urgency=medium * Don't build using dietlibc (universe). -- Matthias Klose Thu, 01 Feb 2018 13:02:01 +0100 ** Changed in: gdbm (Ubuntu) Status: Triaged => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
This bug was fixed in the package man-db - 2.6.1-2ubuntu1 --- man-db (2.6.1-2ubuntu1) precise-proposed; urgency=low * Avoid fatal errors when opening a 64-bit GDBM database from a 32-bit process (LP: #1001189). * Link with -Wl,--enable-new-dtags, so that LD_LIBRARY_PATH can be used to override our private library directory. (This fixes a build failure when attempting to build the above change.) -- Colin WatsonThu, 22 Nov 2012 11:57:21 + ** Changed in: man-db (Ubuntu Precise) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
This all seems to be behaving correctly now, with the version in precise-proposed: man falls back as specified. (accessdb still doesn't work, but there's no way to make it work with the old gdbm and in any case that's a relatively minor issue.) ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
Hello Paul, or anyone else affected, Accepted man-db into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/man-db/2.6.1-2ubuntu1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! ** Changed in: man-db (Ubuntu Precise) Status: In Progress => Fix Committed ** Tags added: verification-needed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
** Branch linked: lp:~ubuntu-branches/ubuntu/precise/man-db/precise- proposed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
** Description changed: + [Impact] Sharing a directory containing manual page databases between 32-bit and 64-bit systems can cause man to crash. + [Test Case] Configure a local manual page hierarchy (in ~/.manpath or otherwise), containing a single page. Run mandb over it from a 64-bit environment. Request that page using man from a 32-bit environment. + [Regression Potential] This code has been in 12.10 and Debian for quite a while, so I think it's pretty safe. If it fails, it'll be fairly obvious from routine use of man and mandb. + + Original report follows: + 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: + 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. ** Changed in: man-db (Ubuntu Precise) Status: Triaged => In Progress ** Changed in: man-db (Ubuntu Precise) Assignee: (unassigned) => Colin Watson (cjwatson) ** Changed in: man-db (Ubuntu Precise) Milestone: None => ubuntu-12.04.2 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
** Branch linked: lp:debian/man-db -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
This bug was fixed in the package man-db - 2.6.2-1 --- man-db (2.6.2-1) unstable; urgency=low * New upstream release: - Optimise apropos when given many arguments (LP: #927028). - apropos prints an error message and returns non-zero when it finds no matches (closes: #672661). - Avoid fatal errors when opening a 64-bit GDBM database from a 32-bit process (LP: #1001189). * Configure with --with-xz=xz --with-lzip=lzip. * Adjust debian/watch to track .tar.xz releases. * Convert debian/copyright to copyright-format 1.0. * Override hardening-no-fortify-functions Lintian warning for /usr/bin/manpath, as a false positive. -- Colin Watson Mon, 18 Jun 2012 22:56:56 +0100 ** Changed in: man-db (Ubuntu) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
Mon Jun 18 04:20:41 BST 2012 Colin Watson Avoid fatal errors when opening a 64-bit GDBM database from a 32-bit process (Ubuntu bug #1001189). * libdb/db_gdbm.c (trap_error): New function. (man_gdbm_open_wrapper): Rearrange interface to call gdbm_open rather than taking its return value as an argument. Fetch a test value from the database after opening it, inside a setjmp/longjmp guard to prevent GDBM from exiting. * include/mydbm.h (man_gdbm_open_wrapper): Update prototype. (MYDBM_CTRWOPEN, MYDBM_CRWOPEN, MYDBM_RWOPEN, MYDBM_RDOPEN): Update man_gdbm_open_wrapper calls, since it now calls gdbm_open itself. * NEWS: Document this. It sounds like it might not be a bad idea to backport this to 12.04 as well, once this has landed in 12.10. ** Changed in: man-db (Ubuntu) Status: Triaged => Fix Committed ** Changed in: man-db (Ubuntu) Assignee: (unassigned) => Colin Watson (cjwatson) ** Also affects: gdbm (Ubuntu Precise) Importance: Undecided Status: New ** Also affects: man-db (Ubuntu Precise) Importance: Undecided Status: New ** No longer affects: gdbm (Ubuntu Precise) ** Changed in: man-db (Ubuntu Precise) Status: New => Triaged ** Changed in: man-db (Ubuntu Precise) Importance: Undecided => High ** Changed in: gdbm (Ubuntu) Status: Confirmed => Triaged ** Changed in: gdbm (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
Not really. I don't want man-db to be in the business of knowing what's local vs. not, and I very much want to preserve the property of having one database per MANDB_MAP entry. I think it would actually be much more complicated to attempt to unwind that - for instance there'd be interesting effects on localisation. Having gdbm detect this is the right answer here, and if it does so then I think everything in man-db should just work, gracefully falling back to non-database-backed operations. So gdbm 1.9.1 sounds like the right answer; but of course that will do nothing as such to address the specific case here, because gdbm 1.9.1 can still read older database files (excellent for most other purposes) and so we're still going to crash on trying to read a database file created on a 64-bit 10.04 system on a 32-bit system. I therefore think we still need to figure out some more graceful handling of this in man-db. The awkward bit is that the error goes through _gdbm_fatal, which does have a mechanism for the application to provide a different function to print the error message, but calls exit(1) either way. I can think of three ways to deal with this: 1) Poke around in the database file ourselves, trying to guess whether the "dir" offset looks plausible given the file size. 2) Fork to do an initial test open of the database. 3) Pass in a fatal error handling function that uses longjmp to avoid the exit(1) call in the library. 1) is fragile and foul on general principles. 2) has performance problems at scale, perhaps not a problem in practice but I'd prefer to avoid it. I think 3) is the most practical, although it will take some fiddling to get it right. ** Changed in: man-db (Ubuntu) Status: Confirmed => Triaged ** Changed in: man-db (Ubuntu) Importance: Undecided => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
In the long run, migrating all of the DB files to newer ones that identify the size/swap nature is the right approach, however, I wonder if a simpler fix for 'man' which would be useful for current systems would be to keep everything in the in local DB (say the /var/cache/man/index.db file or similar) but to allow that to index any files discovered by its optimistic searching of anywhere along the $PATH locations? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
** Also affects: gdbm (Ubuntu) Importance: Undecided Status: New ** Changed in: gdbm (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
> Apparently "gdbm-1.9.1 (already in Rawhide) provides different magic values > for 32 and 64 bits, so we can > discover what system the file was created on if we use this new version" Yes... for example, search for the string "Is the magic number good?" in http://git.gnu.org.ua/cgit/gdbm.git/tree/src/gdbmopen.c So with a newer version of libgdbm3, man-db should get a GDBM_BYTE_SWAPPED or GDBM_BAD_FILE_OFFSET error code when attempting to open an wrong-architecture index.db file, rather than a "successful" open() followed by a seg fault or a fatal gdbm error when attempting to read from the file, as happens now -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdbm/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1001189] Re: 'man' command fails with lseek error opening cross-architecture index.db file (on network share)
** Summary changed: - 'man' command fails with lseek error + 'man' command fails with lseek error opening cross-architecture index.db file (on network share) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1001189 Title: 'man' command fails with lseek error opening cross-architecture index.db file (on network share) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/man-db/+bug/1001189/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs