Bug 242715 - Updatedb commad aborts unless /sys directory is pruned (fresh install)
Updatedb commad aborts unless /sys directory is pruned (fresh install)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
7
ppc64 Linux
high Severity high
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
:
: 247381 249215 249561 250890 252265 253136 253795 296211 302201 357061 369291 372031 374421 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-05 10:40 EDT by Goffredo Marocchi
Modified: 2008-02-13 09:22 EST (History)
24 users (show)

See Also:
Fixed In Version: 2.6.23.1-21.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-06 20:19:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the last thousand lines of (strace -v -o log updated) (147.29 KB, text/plain)
2007-06-06 13:49 EDT, 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 19:02 EDT, 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 19:06 EDT, Goffredo Marocchi
no flags Details
strace -v -o log updated compressed (766.63 KB, application/x-bzip)
2007-07-22 16:20 EDT, Daniel Duggan
no flags Details

  None (edit)
Description Goffredo Marocchi 2007-06-05 10:40:43 EDT
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 10:47:45 EDT
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 09:54:12 EDT
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 13:49:22 EDT
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 19:03:01 EDT
Created attachment 156404 [details]
Here is the entire log file for the given strace command :)
Comment 5 Goffredo Marocchi 2007-06-06 19:06:31 EDT
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 10:55:23 EDT
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 09:31:27 EDT
*** Bug 247381 has been marked as a duplicate of this bug. ***
Comment 8 Daniel Duggan 2007-07-22 16:20:31 EDT
Created attachment 159750 [details]
strace -v -o log updated compressed
Comment 9 Daniel Duggan 2007-07-22 16:23:39 EDT
(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 10:59:43 EDT
*** Bug 249215 has been marked as a duplicate of this bug. ***
Comment 11 Chuck Ebbert 2007-07-23 11:52:47 EDT
"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 10:55:18 EDT
*** Bug 249561 has been marked as a duplicate of this bug. ***
Comment 13 Mikkel L. Ellertson 2007-07-28 20:01:36 EDT
Wouldn't the prooper fix be to add /sys to the PRUNEPATH lint in /etc/updatedb.conf?
Comment 14 Miloslav Trmač 2007-07-28 20:06:53 EDT
> 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-28 20:07:45 EDT
If you want to run updatedb manually, you can run /etc/cron.daily/mlocate.cron
instead.
Comment 16 Miloslav Trmač 2007-08-04 12:23:09 EDT
*** Bug 250890 has been marked as a duplicate of this bug. ***
Comment 17 Gilboa Davara 2007-08-08 12:38:38 EDT
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 12:51:05 EDT
(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 14:42:40 EDT
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 01:54:53 EDT
confirming problem on F7 x86_64 fully updated until today.
Comment 21 Miloslav Trmač 2007-08-12 16:35:28 EDT
(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-14 20:51:57 EDT
*** Bug 252265 has been marked as a duplicate of this bug. ***
Comment 23 Miloslav Trmač 2007-08-17 03:07:17 EDT
*** Bug 253136 has been marked as a duplicate of this bug. ***
Comment 24 Miloslav Trmač 2007-08-22 06:26:37 EDT
*** Bug 253795 has been marked as a duplicate of this bug. ***
Comment 25 Ingo Wald 2007-08-23 00:56:01 EDT
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 05:12:59 EDT
Ingo,

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

- Gilboa
Comment 27 Dave Morris 2007-08-30 18:35:10 EDT
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 09:21:27 EDT
*** Bug 296211 has been marked as a duplicate of this bug. ***
Comment 29 Miloslav Trmač 2007-09-23 11:41:41 EDT
*** Bug 302201 has been marked as a duplicate of this bug. ***
Comment 30 Chuck Ebbert 2007-09-24 19:46:45 EDT
I reported this upstream and nobody seemed to even care.
Comment 31 Goffredo Marocchi 2007-09-24 20:06:18 EDT
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 13:49:09 EDT
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 04:38:06 EDT
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 12:53:39 EDT
Fix in CVS
Comment 35 Miloslav Trmač 2007-10-30 22:43:42 EDT
*** Bug 357061 has been marked as a duplicate of this bug. ***
Comment 36 Miloslav Trmač 2007-11-06 20:11:47 EST
*** Bug 369291 has been marked as a duplicate of this bug. ***
Comment 37 Greg Martyn 2007-11-12 00:48:12 EST
*** Bug 374421 has been marked as a duplicate of this bug. ***
Comment 38 Greg Martyn 2007-11-12 00:49:47 EST
/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 05:48:50 EST
(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 09:22:24 EST
*** 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.