Bug 7409 - Thousands of reduce_name: couldn't get realpath
Summary: Thousands of reduce_name: couldn't get realpath
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.5.4
Hardware: x64 Windows XP
: P3 major
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 06:01 UTC by Marc Muehlfeld
Modified: 2011-08-27 08:11 UTC (History)
0 users

See Also:


Attachments
smb.conf (3.69 KB, text/plain)
2010-05-05 06:06 UTC, Marc Muehlfeld
no flags Details
shares.conf (1.43 KB, text/plain)
2010-05-05 06:06 UTC, Marc Muehlfeld
no flags Details
Level-10-Debug-Log (176.75 KB, application/octet-stream)
2010-05-05 08:01 UTC, Marc Muehlfeld
no flags Details
git-am fix for 3.5.x. (901 bytes, patch)
2010-09-13 18:54 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2010-05-05 06:01:12 UTC
My logfiles are getting filled with tousends of "reduce_name: couldn't get realpath" messages when I'm just at debug level 1:


[2010/05/05 12:41:52,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Stoffwechselgenetik/Aufträge/*
[2010/05/05 12:41:52,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Stoffwechselgenetik/Methoden/*
[2010/05/05 12:41:52,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Molekulargenetik/Genotypisierung/Befunde/*
[2010/05/05 12:41:52,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Molekulargenetik/Genotypisierung/Sonstiges/*
[2010/05/05 12:41:52,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Molekulargenetik/Genotypisierung/Verwaltung/*
[2010/05/05 12:41:52,  1] smbd/vfs.c:check_reduced_name(921)


With about 170 workstations (all XP SP3) this produces very much I/O and load and slows down our fileserver. On some machines this comes up 10-20 per second for some hours. Then everything is silent for some time again. This also appears if nobody is working (e. g. if the computer is just logged on at night).

I'm not sure if this came up in 3.3.12 or a little bit earlier. But this wasn't there in the past.
Comment 1 Marc Muehlfeld 2010-05-05 06:06:31 UTC
Created attachment 5684 [details]
smb.conf
Comment 2 Marc Muehlfeld 2010-05-05 06:06:43 UTC
Created attachment 5685 [details]
shares.conf
Comment 3 Marc Muehlfeld 2010-05-05 08:01:08 UTC
Created attachment 5686 [details]
Level-10-Debug-Log

I made a level 10 debug log and saw something strange:

The user that was logged on this machine ("instruments") has no permission to enter the directory "Systemadministration". The appearing "couldn't get realpath" messages in the log say:

[2010/05/05 14:46:21,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Systemadministration/Formulare und Vorlagen
[2010/05/05 14:46:39,  1] smbd/vfs.c:check_reduced_name(921)
  reduce_name: couldn't get realpath for Systemadministration/NT Server Tools
...

The user "instruments" is only in the group "Domain Users", so he can't see the content of /shares/IT/Systemadministration/:

# ls -la /shares/IT/Systemadministration/ -d
drwxrws--- 14 root sysadmin 472  5. Mai 14:32 /shares/IT/Systemadministration/

# id instruments
uid=1387(instruments) gid=513(Domain Users) Gruppen=513(Domain Users) 

Why are this messages are appearing on subfolders that the user could not see, because he/she can't even enter the top folder?

I also saw that directly after the realpath messages an "NT_STATUS_ACCESS_DENIED" was logged. But isn't there something wrong?
Comment 4 Marc Muehlfeld 2010-05-05 09:29:10 UTC
More information:

1.) The message appears in the log every time the user clicks to a folder, he/she doesn't have permission to (but im some cases also where he/she has permission). 

The bad thing is: Software that scans network drives (virus scanners, indexer, etc.) makes the messages appearing in thousands and slow down the server.


2.) It also appears on 3.5.2


3.) If I turn off "unix extensions", the message is gone.
Comment 5 Marc Muehlfeld 2010-05-20 13:04:11 UTC
The "unix extensions" doesn't change anything. It seems it was fortuity.


Summary:
Everytime somebody want's to access a folder/file where he/she had no permission to, the "reduce_name: couldn't get realpath" error is logged at log level 1.

Happens on 3.5.3 and 3.3.12 (haven't tried 3.4.x).
Comment 6 Guenther Deschner 2010-05-27 05:41:28 UTC
Jeremy, can you please have a look ?
Comment 7 Marc Muehlfeld 2010-09-13 14:13:12 UTC
Same problem on 3.5.4. Every "permission denied" leaves an "reduce_name: couldn't get realpath for..." in the logfile.
Comment 8 Jeremy Allison 2010-09-13 18:54:30 UTC
Created attachment 5962 [details]
git-am fix for 3.5.x.

Obvious fix - raise debug to level 3 from 1.

Jeremy.
Comment 9 Marc Muehlfeld 2010-10-25 03:26:08 UTC
This fixes the problem.
Comment 10 Jeremy Allison 2010-10-25 12:35:40 UTC
Karolin please pick for 3.5.next.
Thanks,
Jeremy.
Comment 11 Karolin Seeger 2010-11-11 04:55:19 UTC
Pushed to v3-5-test.
Closing out bug report.

Thanks!