Runaway smbd processes

For some reason my Mac is being overrun with runaway smbd processes. For example, this morning my computer has been logged into an account for maybe an hour or so, and already there are 40+ smbd processes. Every so often (it does not seem to occur on a regular interval) a new one appears, until well over 100 are running. Each one consumes 0.6-0.7% of my CPU, and eventually both processors are maxxed out and the whole system crawls almost to a halt.

Does anyone know what could be causing this, or how to fix it? Thanks for any guidance or suggestions.

G5 Mac OS X (10.4.5)

Posted on Mar 24, 2006 6:50 AM

Reply
38 replies

Mar 24, 2006 3:34 PM in response to M Prewitt

I believe that SAMBA will spawn an smbd daemon for each connection. ps elxa | egrep 'smbd|PID' will give you an idea of what's going on. There is a "max smbd processes" in /etc/smb.conf that's default set to zero, which usually means unlimited.

Roger

Mar 28, 2006 8:08 AM in response to Community User

I have already set the "max smbd processes" to 10, and "deadtime" to 15. But that does not seem to help.

Here are some additional details that have come up:

My computer has been online this morning for about 2 hours, and already there are 85 smbd processes. If I use the xSMB application (from http://www.xeir.com/) to view active SMB connections, I get a list of about 80 processes, in this form:

*
init_iconv: Conversion from UTF-16LE to CP0 not supported
init_iconv: Attempting to replace with conversion from UTF-16LE to ASCII
init_iconv: Conversion from UTF-8 to CP0 not supported
init_iconv: Attempting to replace with conversion from ASCII to ASCII
init_iconv: Conversion from US-ASCII to CP0 not supported
init_iconv: Attempting to replace with conversion from ASCII to ASCII
init_iconv: Conversion from CP0 to UTF-16LE not supported
init_iconv: Attempting to replace with conversion from ASCII to UTF-16LE
init_iconv: Conversion from CP0 to UTF-8 not supported
init_iconv: Attempting to replace with conversion from ASCII to ASCII
init_iconv: Conversion from CP0 to US-ASCII not supported
init_iconv: Attempting to replace with conversion from ASCII to ASCII
*
...and so forth.

It appears that these are spawned whenever Windows users attempt (unsuccessfully) to connect to my server. I have no idea why this started happening all of a sudden in the past week or so.

Until recently I was successfully sharing folders with Windows users on the network. Now no one is able to connect to my computer, even though its NetBIOS name shows up in the Windows network browser. OS X users are still able to connect through afp, but not through smb.

Mar 28, 2006 4:02 PM in response to M Prewitt

I'm not familiar with that application, but what you posted there looks like error messages dealing with character conversions, not processes. I've never heard of that CP0 before.

Any chance that anybody's been fiddling with language settings?

Roger

Mar 29, 2006 6:31 AM in response to Community User

Yes, you are probably right, that they represent errors, not processes or connections. I am not sure which language settings you are referring to, but I am the only user on this machine, and haven't knowingly changed anything myself.

However, when I look at "active processes" in the Activity Monitor application, I see that over time it fills up with smbd processes, which, based on trial-and-error testing, seem to be spawned by attempted network connections from other users on the network. Once spawned, they never seem to die, even though no one is actually able to connect to my computer via smb ever since this problem started occurring (i.e., the fact they are alive is not because people are successfully accessing smb shares on my machine).

According to SWAT, I am running Samba 3.0.10.

Mar 29, 2006 3:37 PM in response to M Prewitt

Until recently I was successfully sharing folders with Windows users on the network. Now no one is able to connect to my computer, even though its NetBIOS name shows up in the Windows network browser.

What changed recently? Any software updates? Any change in Server Admin? Have you reviewed the settings in Server Admin to see if anything looks funny? Any change in Workgroup Manager? Do you have backups from before that you could recover /etc/smb.conf and compare it to the current /etc/smb.conf? Could you copy and paste the global and one of the share sections of /etc/smb.conf so that we could compare it to ours?

Roger

Mar 30, 2006 9:08 AM in response to M Prewitt

I am having the EXACT same problem. Started with 100+ stranded smbd processes that consumed the entire box. My XP clients were still able connect to OSX using smb without problems. After I modified smb.conf to contain "max smbd processes = 10", my XP clients could no longer connect. Reverted back to original smb.conf still no luck. Something is definitely broke in 10.4.5...

Mar 30, 2006 9:36 AM in response to Community User

What changed recently? Any software updates? Any
change in Server Admin? Have you reviewed the
settings in Server Admin to see if anything looks
funny? Any change in Workgroup Manager? Do you have
backups from before that you could recover
/etc/smb.conf and compare it to the current
/etc/smb.conf? Could you copy and paste the global
and one of the share sections of /etc/smb.conf so
that we could compare it to ours?


That is what I am not sure of. I frequently download small applications, but I don't think any of them would modify file sharing resources.

I assume Server Admin and Workgroup Manager are part of OS X Server. I am running just the regular, non-server version of OS X.

I don't know that I have any backups of smb.conf, but other than some custom shares, custom hides, and a few tweaks to try to deal with the current problem, it should be basically the default settings. I've included it with one sample share below:

*

[global]
dos charset = CP0
unix charset = UTF-8-MAC
display charset = UTF-8-MAC
workgroup = 3ABN
server string = Michael's G5
auth methods = guest, opendirectory
map to guest = Bad User
passdb backend = opendirectorysam, guest
guest account = unknown
defer sharing violations = No
deadtime = 15
max smbd processes = 10
preferred master = No
local master = No
domain master = No
wins server = 10.0.1.10
ldap ssl = no
brlm = Yes
printer admin = @admin, @staff
hide unreadable = Yes
hide files = /. /Desktop DB /Desktop DF /*Icon/Temporary Items/
vfs objects = darwin_acls

; Using the Computer Name to compute the NetBIOS name. Remove this comment to override
netbios name = Michaels-G5

[printers]
path = /tmp
printable = Yes
browseable = No

[dropbox]
path = /Users/mprewitt/Public/Drop Box
read only = No
inherit permissions = Yes
guest only = Yes
guest ok = Yes

Mar 30, 2006 9:33 AM in response to Nils C. Anderson

smbclient may be useful if troubleshooting this
problme.


I am unfamiliar with how to use that command. What would be an example of troubleshooting usage?

smbstatus(1) - report on current Samba
connections


This spits out a list identical to what is reported by the xSMB application above. Which leads me to believe that perhaps xSMB is just a GUI for smbstatus?

perhaps the init_iconv messages are related to

iconv(1) - character set conversion
iconv(3) - perform character set conversion


Perhaps ... but why would these conversions be occurring in the first place?

Mar 30, 2006 3:50 PM in response to M Prewitt

Sorry, I forget which forum I'm in, I spend most of my time in the server forums. Anyway, that smb.conf will pay off. I'll put differences in my server's smb.conf below:

dos charset = CP437
deadtime = 5
max smbd processes = 0
brlm = yes

I don't have hide unreadable or hide files directives.

Looking at your dropbox share, you've kind of setup an oxymoron. You have guest only = yes, which I take to mean that only guest is allowed to use this share, but in the global section guest account = unknown . I read this to mean that the Unix user that the SAMBA guest account is acting as is user unknown, which if user unknown even exists, they're going to be severely limited. This and the dos charset quite possibly will straighten things out.

Roger

Mar 30, 2006 5:47 PM in response to M Prewitt

That's interesting. Try running testparm on your smb.conf file.
it repeats the following over and over and over again.

init_iconv: Conversion from UTF-16LE to CP0 not supported
init_iconv: Attempting to replace with conversion from UTF-16LE to ASCII
init_iconv: Conversion from UTF-8-MAC to CP0 not supported
init_iconv: Attempting to replace with conversion from ASCII to ASCII


looks like it doesn't like the following lines.

[global]
dos charset = CP0
unix charset = UTF-8-MAC

Mar 30, 2006 5:59 PM in response to M Prewitt

obviously I've not done much with samba on this system. so only the basic stuff is there. it also allows you to access your samba shares in manner that's very much like ftp.
smbclient -L \\127.0.0.1\ -N

Domain=[NILS-ANDERSONS] OS=[Unix] Server=[Samba 3.0.10]

Sharename Type Comment
--------- ---- -------
IPC$ IPC __s PowerBook G4)
ADMIN$ IPC __s PowerBook G4)
andya Disk User Home Directories
Domain=[NILS-ANDERSONS] OS=[Unix] Server=[Samba 3.0.10]

Server Comment
--------- -------

Workgroup Master
--------- -------

Mar 31, 2006 7:32 AM in response to Community User

I'm checking other OS X installs in my office. I am sure the "dos charset" parameter has not been manually altered by any user on any of them. It seems like "dos charset = CP0" is one default (was that way on a 10.3 system), and "dos charset = 437" is another (was that way on a coworker's 10.4 system). Perhaps the CP0 setting is the result of upgrading my computer from 10.3 to 10.4. I can't recall which upgrade route I took (whether archive and install, etc.).

I am not sure if there is any significance between "437" and "CP437". I am guessing that CP stands for "code page". I will try CP437 first, and let you know if that helps.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Runaway smbd processes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.