Bug 242715 - Updatedb commad aborts unless /sys directory is pruned (fresh install)
Summary: Updatedb commad aborts unless /sys directory is pruned (fresh install)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 7
Hardware: ppc64
OS: Linux
high
high
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact: Brian Brock
URL:
Whiteboard:
: 247381 249215 249561 250890 252265 253136 253795 296211 302201 357061 369291 372031 374421 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-05 14:40 UTC by Goffredo Marocchi
Modified: 2008-02-13 14:22 UTC (History)
24 users (show)

Fixed In Version: 2.6.23.1-21.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 01:19:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
the last thousand lines of (strace -v -o log updated) (147.29 KB, text/plain)
2007-06-06 17:49 UTC, Jared Smith
no flags Details
Here is the entire log file for the given strace command :) (8.75 MB, application/octet-stream)
2007-06-06 23:02 UTC, Goffredo Marocchi
no flags Details
I apologize, the log was enormous, non compressed, and put up as octet/stream... (640.90 KB, application/x-bzip)
2007-06-06 23:06 UTC, Goffredo Marocchi
no flags Details
strace -v -o log updated compressed (766.63 KB, application/x-bzip)
2007-07-22 20:20 UTC, Daniel Duggan
no flags Details

Description Goffredo Marocchi 2007-06-05 14:40:43 UTC
Description of problem:
After a fresh install (Fedora 7 PPC, pp64, PLAYSTATION 3), running the updatedb
command (with root priviledges either logging in the shell as root or using the
su -c '' command) to create the database read by the locate command will fail
unless the /sys directory is pruned from the search with the following command:

 # updatedb --add-prunepaths /sys


Version-Release number of selected component (if applicable):

# updatedb --version
updatedb (mlocate) 0.16

findutils.ppc                            1:4.2.29-2 


How reproducible:
Simply update the mlocate database running the updatedb command as root.

Steps to Reproduce:
1. updatedb
2.
3.
  
Actual results:

# updatedb
updatedb: src/updatedb.c:721: scan_cwd: Assertion `name_size > 1' failed.
Aborted



Expected results:
the command should return cleanly.


Additional info:

Comment 1 Jared Smith 2007-06-05 14:47:45 UTC
I'm seeing the same thing on F7 PPC 32-bit on a PowerBook G4

[root@hockey ~]# updatedb
updatedb: src/updatedb.c:721: scan_cwd: Assertion `name_size > 1' failed.
Aborted
[root@hockey ~]# updatedb --add-prunepaths /sys
[root@hockey ~]# uname -a
Linux hockey.jaredsmith.net 2.6.21-1.3194.fc7 #1 Wed May 23 22:12:25 EDT 2007
ppc ppc ppc GNU/Linux
[root@hockey ~]# rpm -qf `which updatedb`
mlocate-0.16-1



Comment 2 Miloslav Trmač 2007-06-06 13:54:12 UTC
Thanks for your report.

Can you run (strace -v -o log updatedb) and attach the generated log file, or at
least the last 1000 lines of the log file, please?

Comment 3 Jared Smith 2007-06-06 17:49:22 UTC
Created attachment 156375 [details]
the last thousand lines of (strace -v -o log updated)

Ask and ye shall receive...

Comment 4 Goffredo Marocchi 2007-06-06 23:03:01 UTC
Created attachment 156404 [details]
Here is the entire log file for the given strace command :)

Comment 5 Goffredo Marocchi 2007-06-06 23:06:31 UTC
Created attachment 156406 [details]
I apologize, the log was enormous, non compressed, and put up as octet/stream...

Comment 6 Miloslav Trmač 2007-06-08 14:55:23 UTC
Thanks.  The kernel is returning invalid data from getdents() on
/sys/module/nousb/parameters:

getdents64(9, {{d_ino=174, d_off=1, d_type=DT_DIR, d_reclen=24, d_name="."}
               {d_ino=173, d_off=2, d_type=DT_DIR, d_reclen=24, d_name=".."}
               {d_ino=175, d_off=3, d_type=DT_REG, d_reclen=24, d_name=""}},
           4096) = 72

Note the d_name="".

nousb comes from
__module_param_call("", nousb, param_set_bool, param_get_bool, &nousb, 0444);
in drivers/usb/core/usb.c.  It seems the empty module name confuses something.


Comment 7 Miloslav Trmač 2007-07-12 13:31:27 UTC
*** Bug 247381 has been marked as a duplicate of this bug. ***

Comment 8 Daniel Duggan 2007-07-22 20:20:31 UTC
Created attachment 159750 [details]
strace -v -o log updated compressed

Comment 9 Daniel Duggan 2007-07-22 20:23:39 UTC
(In reply to comment #8)
> Created an attachment (id=159750) [edit]
> strace -v -o log updated compressed
> As this error is present with the latest kernel.x86_64 2.6.22.1-27.fc7 kernel.
> It does not occur in the previous 2 F7 kernels



Comment 10 Miloslav Trmač 2007-07-23 14:59:43 UTC
*** Bug 249215 has been marked as a duplicate of this bug. ***

Comment 11 Chuck Ebbert 2007-07-23 15:52:47 UTC
"nousb" isn't a module parameter at all -- it's a boot-time option only.
And drivers/usb/core/usb.c is the only place using __module_param_call
directly. What happens is this:

$ pwd
/sys/module/nousb/parameters
$ ll -Q
total 0
?--------- ? ? ? ?            ? ""
$ stat ""
stat: cannot stat `': No such file or directory

Comment 12 Zing 2007-07-26 14:55:18 UTC
*** Bug 249561 has been marked as a duplicate of this bug. ***

Comment 13 Mikkel L. Ellertson 2007-07-29 00:01:36 UTC
Wouldn't the prooper fix be to add /sys to the PRUNEPATH lint in /etc/updatedb.conf?

Comment 14 Miloslav Trmač 2007-07-29 00:06:53 UTC
> Wouldn't the prooper fix be to add /sys to the PRUNEPATH lint in
/etc/updatedb.conf?
No,
1) The kernel is returning invalid data.  It shouldn't.
   (the assertion failure happens because the code in updatedb protects itself
    against invalid data, assuming they are caused by a but in updatedb.)
2) The daily updatedb run automatically excludes all "nodev" file systems,
   including /sys.


Comment 15 Miloslav Trmač 2007-07-29 00:07:45 UTC
If you want to run updatedb manually, you can run /etc/cron.daily/mlocate.cron
instead.

Comment 16 Miloslav Trmač 2007-08-04 16:23:09 UTC
*** Bug 250890 has been marked as a duplicate of this bug. ***

Comment 17 Gilboa Davara 2007-08-08 16:38:38 UTC
Two questions:
A. Why should updatedb even touch /proc and /sys? I doubt that anyone will be
using updatedb to watch the cmdline under process XXXXX or follow the USB bus
under /sys?
B. In the existing prune list under updatedb.conf, I see /sfs... /sfs? (/sys maybe?)

- Gilboa

Comment 18 Chuck Ebbert 2007-08-08 16:51:05 UTC
(In reply to comment #17)
> Two questions:
> A. Why should updatedb even touch /proc and /sys? I doubt that anyone will be
> using updatedb to watch the cmdline under process XXXXX or follow the USB bus
> under /sys?
> B. In the existing prune list under updatedb.conf, I see /sfs... /sfs? (/sys
maybe?)

I think we should be pruning sys and proc filesystems types. No idea why we don't...

Comment 19 Bill C. Riemers 2007-08-09 18:42:40 UTC
This seems like a pretty big show stopper to me.  I just removed beagle, because
it was causing Firefox to pop-up warning on websites repeatedly.  Now updatedb
doesn't work.  What is next?

Bill


Comment 20 Renich Bon Ciric 2007-08-12 05:54:53 UTC
confirming problem on F7 x86_64 fully updated until today.

Comment 21 Miloslav Trmač 2007-08-12 20:35:28 UTC
(In reply to comment #17)
> A. Why should updatedb even touch /proc and /sys? I doubt that anyone will be
> using updatedb to watch the cmdline under process XXXXX or follow the USB bus
> under /sys?
_Only_ manually-run updatedb touches /proc and /sys.  It does so because mlocate
is supposed to be portable, leaving the platform-specific file system knowledge
to the distribution scripts - /etc/cron.daily/mlocate.cron in this case.

(BTW, I consider (locate cmdline) a perfectly legitimate use case, although one
that is not supported in Fedora by default.)

> B. In the existing prune list under updatedb.conf, I see /sfs... /sfs? (/sys
maybe?)
No, sfs is from #54864.  I have never tested it - if it is a "nodev" filesystem,
 it should be removed from PRUNEFS.

Comment 22 Miloslav Trmač 2007-08-15 00:51:57 UTC
*** Bug 252265 has been marked as a duplicate of this bug. ***

Comment 23 Miloslav Trmač 2007-08-17 07:07:17 UTC
*** Bug 253136 has been marked as a duplicate of this bug. ***

Comment 24 Miloslav Trmač 2007-08-22 10:26:37 UTC
*** Bug 253795 has been marked as a duplicate of this bug. ***

Comment 25 Ingo Wald 2007-08-23 04:56:01 UTC
Actually, my prunepath contained a "/sfs" -- I wonder if that's a typo, and was
actually supposed to mean "/sys". Can anybody verify if that's the case, and an
older updatedb.conf has /sys instead of /sfs ?

BTW: Fedora 7, x86_64, fresh install with all updates installed, on a Thinkpad T61.

Comment 26 Gilboa Davara 2007-08-23 09:12:59 UTC
Ingo,

See post https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242715#c21

- Gilboa

Comment 27 Dave Morris 2007-08-30 22:35:10 UTC
This also affects other applications too.
I found this page when trying to find out what causes the the Baobab disk usage
analyzer (Fedora 7 gnome-utils package) to lock up and explode.

It looks like the corrupted information from the parameters directory causes
Baobab to sink into a recursive loop.

/sys
/sys/module
/sys/module/nousb
/sys/module/nousb/parameters
/sys/module/nousb/parameters/parameters
/sys/module/nousb/parameters/parameters/parameters
....





Comment 28 Miloslav Trmač 2007-09-19 13:21:27 UTC
*** Bug 296211 has been marked as a duplicate of this bug. ***

Comment 29 Miloslav Trmač 2007-09-23 15:41:41 UTC
*** Bug 302201 has been marked as a duplicate of this bug. ***

Comment 30 Chuck Ebbert 2007-09-24 23:46:45 UTC
I reported this upstream and nobody seemed to even care.


Comment 31 Goffredo Marocchi 2007-09-25 00:06:18 UTC
Bad day to say that :(... I was just reading the reports from the '07 Kernel
Summit and the saddening report of more and more bugs which are simply left out
in some bugzilla system somewhere to die.

:(.

Comment 32 Alan Madill 2007-10-10 17:49:09 UTC
Confirm that this is a problem with Fedora Core 6 with latest kernel 2.6.22.9-
61.fc6

Comment 33 Joachim Frieben 2007-10-19 08:38:06 UTC
This is still an issue for current "rawhide" on x86_64:

  kernel-2.6.23.1-18.fc8.x86_64
  glibc-2.7-1.x86_64
  mlocate-0.18-1.x86_64

$ updatedb
updatedb: src/updatedb.c:730: scan_cwd: Assertion `name_size > 1' failed.
Abort

Comment 34 Chuck Ebbert 2007-10-22 16:53:39 UTC
Fix in CVS

Comment 35 Miloslav Trmač 2007-10-31 02:43:42 UTC
*** Bug 357061 has been marked as a duplicate of this bug. ***

Comment 36 Miloslav Trmač 2007-11-07 01:11:47 UTC
*** Bug 369291 has been marked as a duplicate of this bug. ***

Comment 37 Greg Martyn 2007-11-12 05:48:12 UTC
*** Bug 374421 has been marked as a duplicate of this bug. ***

Comment 38 Greg Martyn 2007-11-12 05:49:47 UTC
/etc/updatedb.conf from fedora 8 has "/sfs" in PRUNEPATHS. If it hasn't already
been fixed, that should probably be changed to "/sys"

Comment 39 Miloslav Trmač 2007-11-18 10:48:50 UTC
(In reply to comment #38)
> /etc/updatedb.conf from fedora 8 has "/sfs" in PRUNEPATHS. If it hasn't already
> been fixed, that should probably be changed to "/sys"
See comment #21.

Comment 40 Miloslav Trmač 2008-02-13 14:22:24 UTC
*** Bug 372031 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.