[linux-cifs-client] Re: "Cannot allocate memory"

Ohmster theohmster at comcast.net
Tue Oct 24 01:47:03 GMT 2006


Hello Steven,

How nice to hear from you so soon. You are like the only person on the planet that might have any idea of what this memory 
allocation error is all about. I have searched and googled and browsed and joined lists and asked some more, not one person or place 
has a clue about this error, time to go directly to the author. The Fedora Core 5 machine is on the Internet 24/7 and has a FQDN (3 
of them actually.). I run an open ssh server. vsftpd server, and an apache httpd server so if you need direct access to the machine 
for troubleshooting or research, that would be no problem. I will adduser for you to have an account and give you root if you need 
it. Email me privately for access and password. Thank you Steven.

the ohmster at comcast dot net (All one email address, subsitute correct character for "the at symbol".)
ohmster at ohmster dot com

I have other samba issues as well, ever bit of samba worked flawlessly in Fedora Core 3. Whether or not this is relevent is up to 
you. It is included as FYI.

Share exports from the linux machine do indeed show up in Network Places in XP machines on the net and easily map to network drives.

XP printer does not show up on the Linux machine. It is not possible to browse or specify a samba printer anymore, either with the 
Gnome menu, System, Administration, Printing GUI, or the hp-setup and hp-probe tools (CLI or GUI). This may not be relevent, just 
FYI.

[root at ohmster samba]# hp-probe 192.168.0.3 (IP address of XP machine where the shared printer is located. Worked fine in FC3.
[snip]
warning: No devices found. If this isn't the result you are expecting,
warning: check to make sure your devices are properly connected.
[root at ohmster samba]#

I cannot browse for or specify a printer on the XP machines either unless I specify a workgroup, a user and a password.

Specific Q & A will be inline format below...

----- Original Message ----- 
From: "Steve French" <smfltc at us.ibm.com>
To: <linux-cifs-client at lists.samba.org>; <theomster at comcast.net>; <chuck.mcintyre at gmail.com>
Sent: Monday, October 23, 2006 1:18 PM
Subject: [linux-cifs-client] Re: "Cannot allocate memory"


> > mount -t cifs -o
> credentials=/etc/smbpasswd.cifs,directio,uid=         etc.
> > ...
> > mount error 12 = Cannot allocate memory
> >
> > Can you please, please take a moment and share your thoughts with me
> on this error if you have any time at all for this?
>
> Could you enable cifs debug message logging and retry, appending the corresponding section of dmesg output to see if we can narrow 
> down which call is running out of memory?

Yes I certainly would take a moment to do this now.

[root at ohmster samba]# locate DebugData
[root at ohmster samba]# mount -t cifs //missy/ohmster_music /mnt/test -o rw,credentials=/etc/smbpasswd.cifs
mount error 12 = Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
[root at ohmster samba]# echo 3 > /proc/fs/cifs/cifsFYI
[root at ohmster samba]#

Darn it, my dmesg is clogged up with TCP traffic data, firestarter firewall can be thanked for that. Let's try it with "tail -f 
/var/log/messages".

[root at ohmster samba]# mount -t cifs //missy/ohmster_music /mnt/test -o rw,credentials=/etc/smbpasswd.cifs
mount error 12 = Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
[root at ohmster samba]#

Oct 23 21:15:40 ohmster kernel:  CIFS VFS: cifs_mount failed w/return code = -12
Oct 23 21:19:43 ohmster kernel: Status code returned 0xc0000205 NT_STATUS_INSUFF_SERVER_RESOURCES
Oct 23 21:19:43 ohmster kernel:  CIFS VFS: cifs_mount failed w/return code = -12

Wow, here is a bunch more stuff in the dmesg output now. (Had to shut down my newsreader, it was pulling headers, choking the logs 
with TCP traffic.)

 CIFS VFS: cifs_mount failed w/return code = -12
 fs/cifs/cifsfs.c: Devname: //missy/ohmster_music flags: 64
 fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 1 with uid: 0
 fs/cifs/connect.c: Username: linux
 fs/cifs/connect.c: UNC: \\missy\ohmster_music ip: 192.168.0.3
 fs/cifs/connect.c: Socket created
 fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x7fffffff
 fs/cifs/connect.c: Demultiplex PID: 19479
 fs/cifs/connect.c: Existing smb sess not found
 fs/cifs/cifssmb.c: secFlags 0x7
 fs/cifs/transport.c: For smb_command 114
 fs/cifs/transport.c: Sending smb of length 67
 fs/cifs/connect.c: rfc1002 length 0x65)
 fs/cifs/cifssmb.c: Dialect: 1
 fs/cifs/cifssmb.c: negprot rc 0
 fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0xe3fd Time Zone: 240
 fs/cifs/sess.c: sess setup type 1
 fs/cifs/transport.c: For smb_command 115
 fs/cifs/transport.c: Sending smb:  total_len 272
 fs/cifs/connect.c: rfc1002 length 0x7f)
 fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
 fs/cifs/sess.c: ssetup rc from sendrecv2 is 0
 fs/cifs/sess.c: UID = 2048
 fs/cifs/sess.c: bleft 82
 fs/cifs/sess.c: words left: 0
 fs/cifs/sess.c: ssetup freeing small buf c53c8040
 fs/cifs/connect.c: CIFS Session Established successfully
 fs/cifs/connect.c: file mode: 0x7f7  dir mode: 0x1ff
 fs/cifs/transport.c: For smb_command 117
 fs/cifs/transport.c: Sending smb of length 94
 fs/cifs/connect.c: rfc1002 length 0x27)
Status code returned 0xc0000205 NT_STATUS_INSUFF_SERVER_RESOURCES
 fs/cifs/netmisc.c:  !!Mapping smb error code 8 to POSIX err -12 !!
 fs/cifs/connect.c: CIFS Tcon rc = -12
 fs/cifs/cifssmb.c: In SMBLogoff for session disconnect
 fs/cifs/transport.c: For smb_command 116
 fs/cifs/transport.c: Sending smb of length 39
 fs/cifs/connect.c: rfc1002 length 0x2b)
 fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 1) rc = -12
 CIFS VFS: cifs_mount failed w/return code = -12
[root at ohmster ~]#

Alright, well, it appears that maybe the XP machine has this memory problem perhaps? mem output from this machine:

C:\Documents and Settings\Ohmster>mem

    655360 bytes total conventional memory
    655360 bytes available to MS-DOS
    597760 largest executable program size

   1048576 bytes total contiguous extended memory
         0 bytes available contiguous extended memory
    941056 bytes available XMS memory
           MS-DOS resident in High Memory Area

C:\DOCUME~1\Ohmster>


I have another XP machine on the LAN and let's try to mount a share from that one to see how it goes.

[root at ohmster samba]# mount -t cifs //paula/Paula_Music /mnt/test -o rw,user=linux
Password:
[root at ohmster samba]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/VolGroup01-LogVol00 on /mnt/old_sys type ext3 (rw)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
automount(pid2429) on /net type autofs (rw,fd=4,pgrp=2429,minproto=2,maxproto=4)
//paula/Paula_Music on /mnt/test type cifs (rw,mand)
[root at ohmster samba]#

OMG, it worked on that machine!

Lot of dmsg output:

fs/cifs/cifsfs.c: Devname: //paula/Paula_Music flags: 64
 fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 4 with uid: 0
 fs/cifs/connect.c: Username: linux
 fs/cifs/connect.c: UNC: \\paula\Paula_Music ip: 192.168.0.2
 fs/cifs/connect.c: Socket created
 fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x7fffffff
 fs/cifs/connect.c: Demultiplex PID: 19730
 fs/cifs/connect.c: Existing smb sess not found
 fs/cifs/cifssmb.c: secFlags 0x7
 fs/cifs/transport.c: For smb_command 114
 fs/cifs/transport.c: Sending smb of length 67
 fs/cifs/connect.c: rfc1002 length 0x65)
 fs/cifs/cifssmb.c: Dialect: 1
 fs/cifs/cifssmb.c: negprot rc 0
 fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0xe3fd Time Zone: 240
 fs/cifs/sess.c: sess setup type 1
 fs/cifs/transport.c: For smb_command 115
 fs/cifs/transport.c: Sending smb:  total_len 272
 fs/cifs/connect.c: rfc1002 length 0x7f)
 fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
 fs/cifs/sess.c: ssetup rc from sendrecv2 is 0
 fs/cifs/sess.c: Guest login
 fs/cifs/sess.c: UID = 2048
 fs/cifs/sess.c: bleft 82
 fs/cifs/sess.c: words left: 0
 fs/cifs/sess.c: ssetup freeing small buf c53c8580
 fs/cifs/connect.c: CIFS Session Established successfully
 fs/cifs/connect.c: file mode: 0x7f7  dir mode: 0x1ff
 fs/cifs/transport.c: For smb_command 117
 fs/cifs/transport.c: Sending smb of length 90
 fs/cifs/connect.c: rfc1002 length 0x42)
 fs/cifs/connect.c: Tcon flags: 0x0
 fs/cifs/connect.c: CIFS Tcon rc = 0
 fs/cifs/cifssmb.c: In QFSDeviceInfo
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 68
 fs/cifs/connect.c: rfc1002 length 0x44)
 fs/cifs/cifssmb.c: In QFSAttributeInfo
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 68
 fs/cifs/connect.c: rfc1002 length 0x50)
 fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 4) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_read_inode as Xid: 5 with uid: 0
 fs/cifs/inode.c: Getting info on
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 74
 fs/cifs/connect.c: rfc1002 length 0xf0)
 fs/cifs/inode.c: Old time 0
 fs/cifs/inode.c: New time 21130984
 fs/cifs/inode.c: Directory inode
 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 6 with uid: 68
 fs/cifs/inode.c: Revalidate:  inode 0xc4575cbc count 1 dentry: 0xc4e8d43c d_time 0 jiffies 21130984
 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 6) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 7 with uid: 500
 fs/cifs/inode.c: Revalidate:  inode 0xc4575cbc count 1 dentry: 0xc4e8d43c d_time 0 jiffies 21130994
 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 7) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 8 with uid: 500
 fs/cifs/inode.c: Revalidate:  inode 0xc4575cbc count 1 dentry: 0xc4e8d43c d_time 0 jiffies 21131001
 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 8) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 9 with uid: 500
 fs/cifs/inode.c: Revalidate:  inode 0xc4575cbc count 1 dentry: 0xc4e8d43c d_time 0 jiffies 21131001
 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 9) rc = 0
 fs/cifs/dir.c: CIFS VFS: in cifs_lookup as Xid: 10 with uid: 500
 fs/cifs/dir.c:  parent inode = 0xc4575cbc name is: .Trash-ohmster and dentry = 0xc4024aec
 fs/cifs/dir.c:  NULL inode in lookup
 fs/cifs/dir.c:  Full path: \.Trash-ohmster inode = 0x00000000
 fs/cifs/inode.c: Getting info on \.Trash-ohmster
 fs/cifs/transport.c: For smb_command 50
 fs/cifs/transport.c: Sending smb of length 104
 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 11 with uid: 500
 fs/cifs/inode.c: Revalidate:  inode 0xc4575cbc count 1 dentry: 0xc4e8d43c d_time 0 jiffies 21131001
 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 11) rc = 0
 fs/cifs/inode.c: CIFS VFS: in cifs_revalidate as Xid: 12 with uid: 500
 fs/cifs/inode.c: Revalidate:  inode 0xc4575cbc count 1 dentry: 0xc4e8d43c d_time 0 jiffies 21131001
 fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate (xid = 12) rc = 0
 fs/cifs/connect.c: rfc1002 length 0x27)
 fs/cifs/connect.c: invalid transact2 word count
Status code returned 0xc0000034 NT_STATUS_OBJECT_NAME_NOT_FOUND
 fs/cifs/netmisc.c:  !!Mapping smb error code 2 to POSIX err -2 !!
 fs/cifs/cifssmb.c: Send error in QPathInfo = -2
 fs/cifs/dir.c: CIFS VFS: leaving cifs_lookup (xid = 10) rc = 0
 fs/cifs/dir.c: neg dentry 0xc4024aec name = .Trash-ohmster
[root at ohmster ~]#

> then
> "dmesg" (or equivalent) after the mount.

You got it.

So then it is not the Linux server with the problem at all, it is my XP machine, is that it with the problem? I have 1Gb of memory 
in that machine, how in the world can it be out of memory? Is there something that is configurable on my XP machine to allocate 
memory for this mounting issue that you know of Steven? Do you think that the HP Deskjet printer not being browsable or even 
discoverable is due to this memory issue as well? The printer is on the "bad" machine. (Sob, my machine is now "the bad machine"!)

Thank you so much for your time, am anxiously waiting your reply.

Sincerely,
Ohmster
Paul

> _______________________________________________
> linux-cifs-client mailing list
> linux-cifs-client at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux-cifs-client 



More information about the linux-cifs-client mailing list