Samba Deamons Going Weird

Support section for FREESCO v0.3.x 3rd Party Packages

Postby Spook » Mon Apr 28, 2008 4:15 am

Hi all,
yesterday I noticed that within my LAN access to Freesco Server's Samba shares was not possible from the WinXP clients.
I checked the process table on the Freesco server and had lots of Samba deamons/processes running ( more than 30 or 40 ) and none of them had a PID neither a PID of the parent process was shown.
I tried to restart Samba by "rc_samba restart" but the only notice was Samba services stopped --> done
And that's it.
No restart.
I checked again with "ps -ef" and the processes were still there - again without PID etc.

Any ideas what could be the reason - and how I can get rid of those processes ?

Thanks in advance

Spook
User avatar
Spook
Junior Advanced Member
 
Posts: 144
Joined: Thu Oct 09, 2003 5:39 pm
Location: Germany / Berlin

Postby dingetje » Mon Apr 28, 2008 9:34 am

Are you starting samba via inetd or via smbd/nmbd -D?

I'm starting via -D because I've seen this cascade of processes on my box too when started via inetd. Here's my partial /pkg/rc/rc_samba:

Code: Select all
str()   {
        [ "`fn1`" -o "`fn2`" ] && return # if already running return
        echo -n "Starting Samba...                      "
        /pkg/usr/local/samba/bin/nmbd -D
        /pkg/usr/local/samba/bin/smbd -D
        ln -sf /pkg/usr/local/samba/bin/smbmount /pkg/bin
        ln -sf /pkg/usr/local/samba/bin/smbumount /pkg/bin
        = 0 # test the exit code of the program
             # Note: Not all programs will respond correctly to the 0
             # if this happens just use =
}
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Postby Spook » Mon Apr 28, 2008 9:52 am

Thanks Dingetje,

I will give it a try - but first of all I need to shut down the still running processes.
How can I do this without knowing the PID ???

Do you have an idea for that too ??.

Tia

Spook

Additional note:
That's how the processes look after typing "ps -ef" (of course that's not all processes that are shown ...)

Code: Select all
[root@Freesco] ps -ef
  Pid   Stat   Parent   Line    Name    Command
  1      S      0               init    init
  2      S      1               kflushd
  3      S      1               kswapd
  4      S      1               logrotate       logrotatehda4500005000y
  64     S      1               syslogd syslogd-r-h-m0
  66     S      1               klogd   klogd
  158    S      1               daemon  sh/sbin/daemon-agetty 9600 tty2
  161    S      158             agetty  agetty9600tty2
  Pid:   D      PPid:   ttyp0   smbd    /pkg/usr/local/samba/bin/smbd-D
  Pid:   D      PPid:   ttyp0   smbd    /pkg/usr/local/samba/bin/smbd-D
  Pid:   D      PPid:   ttyp0   smbd    /pkg/usr/local/samba/bin/smbd-D
  Pid:   D      PPid:           update  update
  Pid:   D      PPid:   ttyp0   smbd    /pkg/usr/local/samba/bin/smbd-D
User avatar
Spook
Junior Advanced Member
 
Posts: 144
Joined: Thu Oct 09, 2003 5:39 pm
Location: Germany / Berlin

Postby dingetje » Mon Apr 28, 2008 4:28 pm

you can try the killall command, like so:

Code: Select all
killall nmbd
killall smbd
GreetZ
http://dingetje.homeip.net

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1004
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Postby Spook » Wed Apr 30, 2008 8:30 am

Thanks for the hint Dingetje.

Unfortunately, before I saw your reply, I've read a lot in the web about processes with status "D" and that it would be impossible to kill those processes.
According to those sources only a reboot could end those processes.
I tried that with "reboot" - but the box would not reboot.

The only thing that worked finally was a reset of the box.

If I would have read your post earlier I would of course have tried that first.

- well, anyway - the processes are gone now (that don't wonder after a reboot) - and I tried the commands you proposed after that - but with the processes having a status "S"..
It worked fine.
The processes were killed.
Unfortunately I dont know whether it would have worked with the old constellation where the processes were in status "D" and did not even have a process ID.

In case it happens again I will give it a try.

Thanks again

Spook
User avatar
Spook
Junior Advanced Member
 
Posts: 144
Joined: Thu Oct 09, 2003 5:39 pm
Location: Germany / Berlin

Postby Spook » Tue Jun 02, 2009 4:00 pm

And again the same problem.

Trying to kill the smbd processes with command "killall smbd" did not have any effect.
I tryed, just in case, "killall -9 smbd" too - but it didn't work either.

Any ideas what else can be done to kill those processes.
By the way - there are some rsync processes too that have a process ID but can not be killed neither.

TiA
Spook
User avatar
Spook
Junior Advanced Member
 
Posts: 144
Joined: Thu Oct 09, 2003 5:39 pm
Location: Germany / Berlin

Postby Lightning » Tue Jun 02, 2009 7:30 pm

What specific version of the Samba package are you running ?
Is it being started with inetd or through the rc_samba script ?

For information, any process without a PID can never be stopped except with a reboot. :(
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3049
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Samba Deamons Going Weird

Postby Spook » Sun Dec 20, 2009 2:19 pm

Hi again - after quite some time I came back to this post.
In fact the problem has not occured for months now - but there must be some reasons why it has occured in the past.

The samba package I'm runing is: samba_2.2.8_nachoman77

About the starting method I'm not sure.
At least there is a start script existing /pkg/rc/rc_samba
But how can I figure out wheter that is working or the other mentioned method inetd ?

By the way - the start section in the rc_samba script is identical to the one dingetje has posted below.

Tia

Spook
User avatar
Spook
Junior Advanced Member
 
Posts: 144
Joined: Thu Oct 09, 2003 5:39 pm
Location: Germany / Berlin

Re: Samba Deamons Going Weird

Postby Lightning » Sun Dec 20, 2009 6:25 pm

If you are using the default rc_samba as Dingetje posted AND it say's "Starting Samba" at startup then you are running Samba in daemon mode and not as an inted process. But you can also check to see if you have a /etc/inetd.conf file and if that file exists then if it has any references to the smbd and nmbd binaries. If it does then those lines should be commented out with a #
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3049
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Samba Deamons Going Weird

Postby Spook » Tue Jan 05, 2010 4:52 am

Hi,
I checked my box and there is no /etc/inetd.conf file existing.
Therefore it sees to be clear that samba is started by rc_samba.
I still have the feeling that the problems where caused by Vista accessing the Samba shares - don't know why but since Vista is not accessing the Samba shares anymore no problems occure.
From Windows XP it's no problem to access and transfer files to the Freesco Samba shares.
More than 40 GByte transfered and Samba works like a charme.
Conclusion - Vista sucks. With Windows7 no problems so far :-)

Thanks for hints and help

Spook
User avatar
Spook
Junior Advanced Member
 
Posts: 144
Joined: Thu Oct 09, 2003 5:39 pm
Location: Germany / Berlin

Re: Samba Deamons Going Weird

Postby CDFiXER » Fri Jan 22, 2010 2:34 pm

I have seen these same issues with using SAMBA and initd. I ended up starting SAMBA without initd. At the time I was using XP clients and Win98SE clients exclusively. Even when I thought it was fixed, anywhere from 5 minutes to 5 days later, initd would start spawning daemons all over the place but once I started SAMBA without initd I never had another problem. At least no problem along those lines.
Catapultam habeo.
Nisi pecuniam omnem mihi dabis, ad caput tuum saxum
immane mittam.
User avatar
CDFiXER
Advanced Member
 
Posts: 367
Joined: Tue Jan 07, 2003 1:45 am


Return to 3rd Party Package Support for FREESCO v0.3.x

Who is online

Users browsing this forum: No registered users and 1 guest