man-db: mandb dies with "input in flex scanner failed"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
man-db (Debian) |
Fix Released
|
Unknown
|
|||
man-db (Ubuntu) |
Invalid
|
High
|
Unassigned |
Bug Description
Automatically imported from Debian bug report #261241 http://
Debian Bug Importer (debzilla) wrote : | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Message-Id: <email address hidden>
Date: Sat, 24 Jul 2004 15:21:28 +0200
From: Dimitry Andric <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: man-db: mandb dies with "input in flex scanner failed"
Package: man-db
Version: 2.3.20-18.woody.4
Severity: grave
Justification: renders package unusable
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux springbank.
Locale: LANG=C, LC_CTYPE=C
Versions of packages man-db depends on:
ii bsdmainutils 5.20020211-4.99 More utilities from FreeBSD.
ii debconf 1.4.25 Debian configuration management sy
ii dpkg 1.10.21 Package maintenance system for Deb
ii groff 1.17.2-15.woody.1 GNU troff text-formatting system
ii groff-base 1.17.2-15.woody.1 GNU troff text-formatting system (
ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an
ii libdb2 2:2.7.7.0-7 The Berkeley database routines (ru
I got some mail from cron, specifying that cron.daily/man-db failed.
It turns out to die on the following line:
start-
--startas /usr/lib/
-- --no-purge >/dev/null 2>/dev/null
When I run this mandb command by hand, using:
sudo -u man mandb
I get the following output:
Purging old database entries in /usr/share/man...
mandb: can't update index cache /var/cache/
Processing manual pages under /usr/share/man...
fopen: No such file or directory
Updating index cache for path `/usr/share/man'. Wait...input in flex scanner failed
Running this under strace as follows:
sudo -u man strace -f -o /tmp/mandb.strace mandb > mandb.out 2>&1
gives the following output (last few lines only, if you really want it
I can post the full log somewhere, about 10MiB):
4983 open("/
4983 fstat64(7, {st_mode=
4983 old_mmap(NULL, 4096, PROT_READ|
4983 read(7, ".TH mysqlaccess 1 \"19 December 2"..., 4096) = 2827
4983 close(7) = 0
4983 munmap(0x40015000, 4096) = 0
4983 open("/
4983 fstat64(7, {st_mode=
4983 old_mmap(NULL, 4096, PROT_READ|
4983 read(7, ".TH mysqlaccess 1 \"19 December 2"..., 4096) = 2827
4983 read(7, "", 4096) = 0
4983 read(7, "", 4096) = 0
4983 close(7) = 0
4983 munmap(0x40015000, 4096) = 0
4983 close(6) = 0
4983 rmdir("
4983 unlink(
4983 lstat64(
4983 lstat64("/usr", {st_mode=
In Debian Bug tracker #261241, Colin Watson (cjwatson) wrote : Re: Bug#261241: man-db: mandb dies with "input in flex scanner failed" | #3 |
On Sat, Jul 24, 2004 at 03:21:28PM +0200, Dimitry Andric wrote:
> Package: man-db
> Version: 2.3.20-18.woody.4
> Severity: grave
> Justification: renders package unusable
You can still use man, even if in 2.3.20 it was a bit painful without an
up-to-date database, so I don't think it renders the package unusable.
Anyway ...
> Purging old database entries in /usr/share/man...
> mandb: can't update index cache /var/cache/
> Processing manual pages under /usr/share/man...
> fopen: No such file or directory
> Updating index cache for path `/usr/share/man'. Wait...input in flex scanner failed
[...]
> 4983 lstat64(
> 4983 readlink(
> 4983 brk(0x8093000) = 0x8093000
> 4983 open("/
> 4983 fstat64(6, {st_mode=
> 4983 old_mmap(NULL, 4096, PROT_READ|
> 4983 read(6, 0x40015000, 4096) = -1 EISDIR (Is a directory)
[...]
> As you can see, the flex scanner tries to open and read a *directory*,
> for some unknown reason. Any idea what might cause this?
If you look closely at the snippet above, you'll see that
mod-ssl-
try to read the man page. Fix that broken symlink and mandb should work
again.
I fixed the general misbehaviour in mandb when it unexpectedly
encounters a directory in man-db 2.4.2. From the NEWS file:
o Directories found in strange places in manual hierarchies don't
crash mandb.
Cheers,
--
Colin Watson [<email address hidden>]
Colin Watson (cjwatson) wrote : | #4 |
Report is against woody; the version in sarge/sid/warty deals with this much
more gracefully, and in any case a workaround is available on woody (namely, fix
the broken symlink). Not something we need to worry about.
Debian Bug Importer (debzilla) wrote : | #5 |
Message-ID: <email address hidden>
Date: Sat, 24 Jul 2004 16:51:48 +0100
From: Colin Watson <email address hidden>
To: <email address hidden>
Subject: Re: Bug#261241: man-db: mandb dies with "input in flex scanner failed"
On Sat, Jul 24, 2004 at 03:21:28PM +0200, Dimitry Andric wrote:
> Package: man-db
> Version: 2.3.20-18.woody.4
> Severity: grave
> Justification: renders package unusable
You can still use man, even if in 2.3.20 it was a bit painful without an
up-to-date database, so I don't think it renders the package unusable.
Anyway ...
> Purging old database entries in /usr/share/man...
> mandb: can't update index cache /var/cache/
> Processing manual pages under /usr/share/man...
> fopen: No such file or directory
> Updating index cache for path `/usr/share/man'. Wait...input in flex scanner failed
[...]
> 4983 lstat64(
> 4983 readlink(
> 4983 brk(0x8093000) = 0x8093000
> 4983 open("/
> 4983 fstat64(6, {st_mode=
> 4983 old_mmap(NULL, 4096, PROT_READ|
> 4983 read(6, 0x40015000, 4096) = -1 EISDIR (Is a directory)
[...]
> As you can see, the flex scanner tries to open and read a *directory*,
> for some unknown reason. Any idea what might cause this?
If you look closely at the snippet above, you'll see that
mod-ssl-
try to read the man page. Fix that broken symlink and mandb should work
again.
I fixed the general misbehaviour in mandb when it unexpectedly
encounters a directory in man-db 2.4.2. From the NEWS file:
o Directories found in strange places in manual hierarchies don't
crash mandb.
Cheers,
--
Colin Watson [<email address hidden>]
In Debian Bug tracker #261241, Dimitry Andric (dimitry-andric) wrote : Re: Bug#261241 acknowledged by developer (Re: Bug#261241: man-db: mandb dies with "input in flex scanner failed") | #6 |
On 2004-07-24 at 18:03:15 Debian Bug Tracking System wrote:
> On Sat, Jul 24, 2004 at 03:21:28PM +0200, Dimitry Andric wrote:
>> Package: man-db
>> Version: 2.3.20-18.woody.4
>> Severity: grave
>> Justification: renders package unusable
> You can still use man, even if in 2.3.20 it was a bit painful without an
> up-to-date database, so I don't think it renders the package unusable.
Well, the 'unusable' applied to man-db in this case, not to man
itself. :) I didn't mean to be pedantic, my apologies if this was how
it looked.
>> 4983 lstat64(
>> {st_mode=
>> 4983 readlink(
>> 4983 brk(0x8093000) = 0x8093000
>> 4983 open("/
> If you look closely at the snippet above, you'll see that
> mod-ssl-
> try to read the man page. Fix that broken symlink and mandb should work
> again.
Ah! I completely missed this, thanks. Note that this symlink was
obviously caused by the just-released libapache-mod-ssl security fix
for DSA-532-1. Maybe there's something wrong in that package, I'll
check it out and possibly report something to its maintainer.
Anyway, removing the link indeed fixes the problem. Thanks!
> I fixed the general misbehaviour in mandb when it unexpectedly
> encounters a directory in man-db 2.4.2. From the NEWS file:
Okay, but this fix probably won't make it into woody? :)
Debian Bug Importer (debzilla) wrote : | #7 |
Message-ID: <email address hidden>
Date: Sun, 25 Jul 2004 01:24:37 +0200
From: Dimitry Andric <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: Re: Bug#261241 acknowledged by developer (Re: Bug#261241: man-db: mandb dies with "input in
flex scanner failed")
-------
Content-Type: text/plain; charset=us-ascii
Content-
On 2004-07-24 at 18:03:15 Debian Bug Tracking System wrote:
> On Sat, Jul 24, 2004 at 03:21:28PM +0200, Dimitry Andric wrote:
>> Package: man-db
>> Version: 2.3.20-18.woody.4
>> Severity: grave
>> Justification: renders package unusable
> You can still use man, even if in 2.3.20 it was a bit painful without an
> up-to-date database, so I don't think it renders the package unusable.
Well, the 'unusable' applied to man-db in this case, not to man
itself. :) I didn't mean to be pedantic, my apologies if this was how
it looked.
>> 4983 lstat64(
>> {st_mode=
>> 4983 readlink(
=3D 1
>> 4983 brk(0x8093000) =3D 0x8093000
>> 4983 open("/
> If you look closely at the snippet above, you'll see that
> mod-ssl-
> try to read the man page. Fix that broken symlink and mandb should work
> again.
Ah! I completely missed this, thanks. Note that this symlink was
obviously caused by the just-released libapache-mod-ssl security fix
for DSA-532-1. Maybe there's something wrong in that package, I'll
check it out and possibly report something to its maintainer.
Anyway, removing the link indeed fixes the problem. Thanks!
> I fixed the general misbehaviour in mandb when it unexpectedly
> encounters a directory in man-db 2.4.2. From the NEWS file:
Okay, but this fix probably won't make it into woody? :)
-------
Content-Type: application/
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFBAu+
2MCI/TkzICjyEzQ
=RXVd
-----END PGP MESSAGE-----
-------
In Debian Bug tracker #261241, Colin Watson (cjwatson) wrote : Re: Bug#261241: acknowledged by developer (Re: Bug#261241: man-db: mandb dies with "input in flex scanner failed") | #8 |
On Sun, Jul 25, 2004 at 01:24:37AM +0200, Dimitry Andric wrote:
> On 2004-07-24 at 18:03:15 Debian Bug Tracking System wrote:
> > If you look closely at the snippet above, you'll see that
> > mod-ssl-
> > try to read the man page. Fix that broken symlink and mandb should work
> > again.
>
> Ah! I completely missed this, thanks. Note that this symlink was
> obviously caused by the just-released libapache-mod-ssl security fix
> for DSA-532-1. Maybe there's something wrong in that package, I'll
> check it out and possibly report something to its maintainer.
Please do report a bug (or reopen+
symlink's in a package, yes.
> > I fixed the general misbehaviour in mandb when it unexpectedly
> > encounters a directory in man-db 2.4.2. From the NEWS file:
>
> Okay, but this fix probably won't make it into woody? :)
Indeed. Working hard on sarge, though ...
(Mind you, the patch is fairly straightforward. Attached, although I've
no idea offhand how well it would apply to 2.3.20.)
Cheers,
--
Colin Watson [<email address hidden>]
Debian Bug Importer (debzilla) wrote : | #9 |
Message-ID: <email address hidden>
Date: Sun, 25 Jul 2004 02:38:13 +0100
From: Colin Watson <email address hidden>
To: Dimitry Andric <email address hidden>, <email address hidden>
Subject: Re: Bug#261241: acknowledged by developer (Re: Bug#261241: man-db: mandb dies with "input
in flex scanner failed")
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-
On Sun, Jul 25, 2004 at 01:24:37AM +0200, Dimitry Andric wrote:
> On 2004-07-24 at 18:03:15 Debian Bug Tracking System wrote:
> > If you look closely at the snippet above, you'll see that
> > mod-ssl-
> > try to read the man page. Fix that broken symlink and mandb should work
> > again.
>
> Ah! I completely missed this, thanks. Note that this symlink was
> obviously caused by the just-released libapache-mod-ssl security fix
> for DSA-532-1. Maybe there's something wrong in that package, I'll
> check it out and possibly report something to its maintainer.
Please do report a bug (or reopen+
symlink's in a package, yes.
> > I fixed the general misbehaviour in mandb when it unexpectedly
> > encounters a directory in man-db 2.4.2. From the NEWS file:
>
> Okay, but this fix probably won't make it into woody? :)
Indeed. Working hard on sarge, though ...
(Mind you, the patch is fairly straightforward. Attached, although I've
no idea offhand how well it would apply to 2.3.20.)
Cheers,
--
Colin Watson [<email address hidden>]
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-
-------
PatchSet 381
Date: 2003/08/16 14:08:04
Author: cjwatson
Branch: HEAD
Tag: (none)
Log:
* src/lexgrog.l (find_name): Report a sensible error if file is a
directory.
Members:
docs/ChangeLog
src/lexgrog.
Index: man-db/
diff -u man-db/
--- man-db/
+++ man-db/
@@ -1,3 +1,8 @@
+Sat Aug 16 14:07:46 BST 2003 Colin Watson <email address hidden>
+
+ * src/lexgrog.l (find_name): Report a sensible error if file is a
+ directory.
+
Fri Aug 15 18:11:06 BST 2003 Colin Watson <email address hidden>
* src/check_mandirs.c (test_manfile): file is const.
Index: man-db/
diff -u man-db/
--- man-db/
+++ man-db/
@@ -381,14 +381,29 @@
yyin = fdopen (dup (0), "r");
} else {
#ifdef COMP_SRC
+ struct compression *comp;
+#endif /* COMP_SRC */
+ struct stat st;
+
+ if (stat (file, &st)) {
+ error (0, errno, "%s", file);
+ return 0;
+ }
+
+ if (S_ISDIR (st.st_mode)) {
+ error (0, EISDIR, "%s", file);
+ return 0;
+ }
+
+#ifdef COMP_SRC
/* See if we need to decompress the file(s) first. */
- struct compression *comp = comp_info (file);
+ comp = comp_info (file);
if (comp) {
file = decompress (file, comp);
if (!file)
return 0;
...
In Debian Bug tracker #261241, Dimitry Andric (dimitry-andric) wrote : | #10 |
On 2004-07-25 at 03:38:13 Colin Watson wrote:
>> > I fixed the general misbehaviour in mandb when it unexpectedly
>> > encounters a directory in man-db 2.4.2. From the NEWS file:
> (Mind you, the patch is fairly straightforward. Attached, although I've
> no idea offhand how well it would apply to 2.3.20.)
Here's a modified patch, which should apply cleanly to man-db
2.3.20-18.woody.4. I've built, installed and tested a custom deb with
it, which complains nicely about symlinks to dirs, but doesn't die:
$ sudo -u man mandb
Purging old database entries in /usr/share/man...
[...]
mandb: /usr/share/
mandb: warning: /usr/share/
[...]
Debian Bug Importer (debzilla) wrote : | #11 |
Message-ID: <email address hidden>
Date: Sun, 25 Jul 2004 16:56:49 +0200
From: Dimitry Andric <email address hidden>
To: Colin Watson <email address hidden>, <email address hidden>
Subject: Re: Bug#261241: acknowledged by developer (Re: Bug#261241: man-db: mandb dies with "input
in flex scanner failed")
-------
Content-Type: multipart/mixed;
boundary=
-------
Content-Type: text/plain; charset=us-ascii
Content-
On 2004-07-25 at 03:38:13 Colin Watson wrote:
>> > I fixed the general misbehaviour in mandb when it unexpectedly
>> > encounters a directory in man-db 2.4.2. From the NEWS file:
> (Mind you, the patch is fairly straightforward. Attached, although I've
> no idea offhand how well it would apply to 2.3.20.)
Here's a modified patch, which should apply cleanly to man-db
2.3.20-18.woody.4. I've built, installed and tested a custom deb with
it, which complains nicely about symlinks to dirs, but doesn't die:
$ sudo -u man mandb
Purging old database entries in /usr/share/man...
[...]
mandb: /usr/share/
mandb: warning: /usr/share/
ailed
[...]
-------
Content-Type: application/
Content-
Content-
ZGlmZiAtdXJkIG1
LjIwL2RvY3MvQ2h
b2cJRnJpIFNlcCA
bmdlTG9nCVN1biB
dWcgMTYgMTQ6MDc
bi5vcmc+
YmxlIGVycm9yIGl
OjI4OjEyIEJTVCA
CiAJKiBWZXJzaW9
L2xleGdyb2cubCB
MjAtb3JpZy9zcmM
LWRiLTIuMy4yMC9
MjIsNiArMjIsNyB
T05GSUdfSCAqLwo
PgogCiAjaWZuZGV
biA9IGZkb3BlbiA
CisJCXN0cnVjdCB
CQlzdHJ1Y3Qgc3R
b3IgKDAsIGVycm5
KFNfSVNESVIgKHN
aWxlKTsKKwkJCXJ
aWYgd2UgbmVlZCB
Y3QgY29tcHJlc3N
KwkJY29tcCA9IGN
Daniel Robitaille (robitaille) wrote : | #12 |
Was fixed in Debian in 2004
Changed in man-db: | |
status: | Unconfirmed → Fix Released |
Changed in man-db: | |
status: | Unknown → Fix Released |
Automatically imported from Debian bug report #261241 http:// bugs.debian. org/261241