Bug 37542

Summary: [OOPS] 3.0-rc1 cifs
Product: File System Reporter: Maciej Rutecki (maciej.rutecki)
Component: CIFSAssignee: fs_cifs (fs_cifs)
Status: CLOSED CODE_FIX    
Severity: normal CC: jlayton, maciej.rutecki, mp3project, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.0-rc1 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 36912    
Attachments: patch -- demote DNS lookup error message to cFYI
patch -- demote DFS referral lookup errors to cFYI

Description Maciej Rutecki 2011-06-15 19:54:55 UTC
Subject    : [OOPS] 3.0-rc1 cifs
Submitter  : Martijn Uffing <mp3project@sarijopen.student.utwente.nl>
Date       : 2011-06-09 20:15
Message-ID : Pine.LNX.4.64.1106092211500.19687@sarijopen.student.utwente.nl
References : http://marc.info/?l=linux-kernel&m=130765235926144&w=2

This entry is being used for tracking a regression from 2.6.39. Please don't
close it until the problem is fixed in the mainline.
Comment 1 Jeff Layton 2011-06-15 21:00:17 UTC
One of the problems reported in this thread should now be fixed (the problem with CIFSTCon not handling NULL pointers correctly).

The other problem is still awaiting a fix (the problem where cifs_cleanup_volume_info tries to kfree a constant string).
Comment 2 Martijn Uffing 2011-06-20 15:36:04 UTC
I saw the quick fix patch of Pavel on linux-cifs and give it a try.

kernel:
  vanilla 3.0.0-rc3
  + patch http://marc.info/?l=linux-cifs&m=130779248723184&w=2
  + patch http://marc.info/?l=linux-cifs&m=130855884503301&w=2

result:
  No OOPS (fixed by first patch)
  No BUG  (fixed by second patch)

So the OOPS and BUG seems to be fixed by these 2 patches.


But ... there's still something different in the diff -up dmesg-2.6.39 dmesg-3.0.0-rc3-patched.

-CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 2.6.41
+CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.1
+CIFS VFS: dns_resolve_server_name_to_ip: unable to resolve: sarijopen.student.utwente.nl
+CIFS VFS: cifs_compose_mount_options: Failed to resolve server part of \\sarijopen.student.utwente.nl\sysadmin to IP: -2

dmesg says unable to resolve sarijopen.student.utwente.nl, however the share DOES get mounted and I've got no troubles accessing the files in the share.

fstab:
 //sarijopen.student.utwente.nl/sysadmin /home/XXXX/docs_sysadmin  cifs    guest,uid=XXXX,gid=XXXX,users,auto,nounix,nobrl,auto 

Is there still something wrong, or did the cifs module become more vocal in error/debug messages?
Comment 3 Jeff Layton 2011-06-21 10:53:20 UTC
(In reply to comment #2)

> Is there still something wrong, or did the cifs module become more vocal in
> error/debug messages?

It has always printed these messages when chasing DFS referrals and the name can't be resolved. The difference now is that we're attempting to resolve a DFS referral on every mount, not just when the server returns the equivalent of EREMOTE.

What we should probably do is demote this message to a debug message, or push that error message out to the callers and just print it when we're chasing a DFS referral.

Regardless though, this is really a separate bug. Can you send a note about this to the linux-cifs mailing list so we can discuss the solutions there?
Comment 4 Jeff Layton 2011-06-21 11:16:15 UTC
Created attachment 63092 [details]
patch -- demote DNS lookup error message to cFYI

Martjin, does this patch silence that error message?
Comment 5 Martijn Uffing 2011-06-21 19:22:25 UTC
Partially.

3.0.0-rc4-patched
 vanilla 3.0.0-rc4
  ( fix for OOPS is already included in linus 3.0.0-rc4)
  + http://marc.info/?l=linux-cifs&m=130855884503301&w=2 (kfree)
  + https://bugzilla.kernel.org/attachment.cgi?id=63092 (demote DNS error)

diff -up dmesg-2.6.39 dmesg-3.0.0-rc4-patched

-CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 2.6.41
-input: ACPI Virtual Keyboard Device as /devices/virtual/input/input6
+CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.1
+CIFS VFS: dns_resolve_server_name_to_ip: unable to resolve: sarijopen.student.utwente.nl

Conclusion:
message "CIFS VFS: cifs_compose_mount_options: Failed to resolve server part of
\\sarijopen.student.utwente.nl\sysadmin to IP: -2" is gone/demoted.
Still got "CIFS VFS: dns_resolve_server_name_to_ip: unable to resolve: sarijopen.student.utwente.nl"

I didn't even know what DFS was. But after some reading I can say.
a)I do not use DFS on purpose. Single server, serving files with security=share
b)However, debian etch has apparently dfs turned on by default.
  testparm -v|grep dfs

        host msdfs = Yes
        msdfs root = Yes
        msdfs proxy = 



Should the message "CIFS VFS: dns_resolve_server_name_to_ip: unable to resolve: sarijopen.student.utwente.nl" still happen? And if not so, further discussion in linux-cifs?

The real OOPS/BUG can be considered fixed by the combination of your first and Pavels patch. I will test 3.0.0 when released by Linus, to be sure it contains both fixes.
Comment 6 Jeff Layton 2011-06-22 14:10:20 UTC
Created attachment 63202 [details]
patch -- demote DFS referral lookup errors to cFYI

No, it shouldn't happen if you haven't configured it. Again, this is due to the change that made a DFS referral resolution attempt occur on every mount. The root cause is really too much chattiness in dmesg though. There's really no need to spam the ring buffer with these sorts of errors even when people have DFS configured. If they need to troubleshoot they can always turn up cFYI.

Martjin, could you test this patch? It should get rid of it.
Comment 7 Martijn Uffing 2011-06-22 21:01:08 UTC
Your revised patch indeed silences that last message.

3.0.0-rc4-patched
 vanilla 3.0.0-rc4
  ( fix for OOPS is already included in linus 3.0.0-rc4)
  + http://marc.info/?l=linux-cifs&m=130855884503301&w=2 (kfree)
  + https://bugzilla.kernel.org/attachment.cgi?id=63202 (revised demote DNS msg)

diff -up dmesg-2.6.39 dmesg-3.0.0-rc4-patched (cifs related)

-CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 2.6.41
+CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.1

And when someone wants to troubleshoot:
"echo 1 >/proc/fs/cifs/cifsFYI" 
....
fs/cifs/cifssmb.c: In GetDFSRefer the path \sarijopen.student.utwente.nl\sysadmin
fs/cifs/transport.c: For smb_command 50
fs/cifs/transport.c: Sending smb:  total_len 152
fs/cifs/connect.c: rfc1002 length 0x150
fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=7 state=4
fs/cifs/cifssmb.c: Decoding GetDFSRefer response BCC: 277  Offset 56
fs/cifs/cifssmb.c: num_referrals: 1 dfs flags: 0x3 ...
fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: unable to resolve: sarijopen.student.utwente.nl
fs/cifs/cifs_dfs_ref.c: cifs_compose_mount_options: Failed to resolve server part of \\sarijopen.student.utwente.nl\sysadmin to IP: -2
....

So..
OOPS fixed, BUG fixed. No extra messages in dmesg in normal operation, but still debug messages available when asked for.
Comment 8 Rafael J. Wysocki 2011-06-26 21:24:40 UTC
Handled-By : Jeff Layton <jlayton@redhat.com>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=63202
Comment 9 Rafael J. Wysocki 2011-06-26 22:36:47 UTC
On Monday, June 27, 2011, Martijn Uffing wrote:
> Ave
> 
> The OOPS/BUG is fixed by 2 patches. Both patches are already included in 
> the linus git tree.
> 
> A patch for the separate issue to demote the superfluous kernel messages 
> from error to debug level is available, but not yet included in linus git.
> I will track this patch and ping the author if it isn't included in one of 
> the final rc's.
> 
> As far as I am concerned, this bug can be removed from the regression 
> list.
> 
> Martijn
> 
> -----------------------------------------
> Ceterum censeo Carthaginem esse delendam
> 
> When it comes to procrastination, casting the first stone is definitely on
> my TO DO list.
> 
> 
> 
> On Sun, 26 Jun 2011, Rafael J. Wysocki wrote:
> 
> > This message has been generated automatically as a part of a summary report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.39.  Please verify if it still should be listed and let the
> tracking team
> > know (either way).
> >
> >
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=37542
> > Subject             : [OOPS] 3.0-rc1 cifs
> > Submitter   : Martijn Uffing <mp3project@sarijopen.student.utwente.nl>
> > Date                : 2011-06-09 20:15 (18 days old)