# Samba : stalls after mount

## RabCaz

Hi

I recently reinstalled Gentoo due to HDchange. Everything went nice, I even added some extra CFLAGS. My problem is when I mount shares that are on my server (Debian). I can mount the shares, either through /etc/fstab or smb4k. After that I can browse the shares for a little moment, if I try to open e.g a movie or add a folder to XMMS it all hangs. Konqueror stops responding and after a while the "Konqueror is not responding...." dialog appears and I can shut it down. I cannot unmount the share nor access it again. Mostly I can kill the smbmount process, but not always.

This problem occurred after the reinstall. Before it worked without a glitch (mounted as user via /etc/fstab). I have tried with 2.6.8.1, currently running 2.6.7 and the 2.6.9-rc2 kernel with same result.

I have also tried different versions of Samba and even Samba-tng. All this with the same result, it hangs and the share is not accessible. And umount replies that the device is busy....

Might it be some error due to the extra flags in make.conf or is it a known bug ? I've been searching the net and the forum for a while and havent found any related info. As Im not at home right now I cannot post my configfiles.

What do you think about this problem ?

----------

## hecatomb

I have no idea if this results from the extra CFLAGS.

Maybe your /var/log/messages will give you some more information. Have a look at it just when the smb connection hangs.

Are you able to copy files from the share to your local hd? Mount the share and copy some files. Use the commandline to do this to see if errors are shown.

----------

## RabCaz

 *hecatomb wrote:*   

> I have no idea if this results from the extra CFLAGS.
> 
> Maybe your /var/log/messages will give you some more information. Have a look at it just when the smb connection hangs.
> 
> Are you able to copy files from the share to your local hd? Mount the share and copy some files. Use the commandline to do this to see if errors are shown.

 

I have managed to copy a few files, then the speed slows down and shows "stalled" in the filetransferwindow. If im not misstaking I checked the logs for nmbd and smbd and they showed nothing unusual..

But ill post the logs later on today.

----------

## XebB

I have the same problem, but for me it also happens when i'm trying to add all songs to my xmms-playlist.

The biggest problem I've got though, is when i'm trying to start DC++ (wine), it totally kills the shares...

I've read around some on this forum, and alot of people can fix this by re-compiling samba, with a older version of gcc, but I just tried that, and it doesn't work for me...

----------

## RabCaz

 *XebB wrote:*   

> I've read around some on this forum, and alot of people can fix this by re-compiling samba, with a older version of gcc, but I just tried that, and it doesn't work for me...

 

I must thank you !

i did a  a

```
USE_GCC="3.3.2" emerge samba
```

 and then i could copy files, see video from the server and so. It seems to work. When adding the entire Musicfolder to XmmS it hanged it though. Seems like it hangs it all the time.

Im gonna try with Amarok too to see if its a xmmsthing. When XmmS hangs it i must do a killall -9 xmms and kill the smbmount process and then unmount the share and remount it.

----------

## RabCaz

Though it still seems to be a very unstable connection to the server...

----------

## RabCaz

Well I could play from two albums (Do not worry, Ive bought them =p ) the whole night without any problems it seems. Going to try to add more files when I get home today and see what happends.

XebB : Whats your specs on your machine ?

Im running Gentoo 2004.2 with latest portage, Xp2800+, 512 PC2700, 2x WD 80gig disks, Radeon 9700pro. KDE 3.3.3 kernel 2.6.7 (due to the bug that K3b cannot recognize the CDR as a writing device). Asus A7n8x-x MB.

My bext project (exept from trying to get DAOC:TOA to work with Cedega) will be to enable the dualboot (for playing, but will I get ToA working with Cedega its not necessary =D ) Grub dosent wanna play nice just yet.

----------

## XebB

I'm running:

kernel: 2.6.8-gentoo-r3

portage: 2.0.50-r11

amd xp 2500+@3200+ (200x11)

512Mb@433mhz

2xSeagate 120G raid0

Radeon 9700-nonPro

Asus A7n8x-e Deluxe

Fluxbox as WM

I can't get samba to work stable, got any help?  :Sad: 

----------

## RabCaz

 *XebB wrote:*   

> I'm running:
> 
> kernel: 2.6.8-gentoo-r3
> 
> portage: 2.0.50-r11
> ...

 

Im gonna do some fiddeling with it when I come home today.

Perhaps try to make a package of, never done that before so =), that you could try out maybe ?

I havent really tried samba out more than watching some movies directly from the server. (Did some copying of a few small files and a large one which went nice)

----------

## Mitzi

I'm having the exact same problem since emerging to Samba 3.0.6 (since then I've also tried 3.0.7 which has the same problems).  It appears like everything is working fine I can see the shares but when I try and open a file the connection hangs.  Everything works fine using smbclient, it only hangs when trying to access the shares via my Windows XP SP2 box.

I have a feeling that my only option is to revert back to an older version of Samba...anyone know how to do this via emerge??

----------

## nyteryda

 *Mitzi wrote:*   

> I'm having the exact same problem since emerging to Samba 3.0.6 (since then I've also tried 3.0.7 which has the same problems).  It appears like everything is working fine I can see the shares but when I try and open a file the connection hangs.  Everything works fine using smbclient, it only hangs when trying to access the shares via my Windows XP SP2 box.
> 
> I have a feeling that my only option is to revert back to an older version of Samba...anyone know how to do this via emerge??

 

you can emerge a specific package version by doing something like

```
emerge =net-fs/samba-3.0.7
```

----------

## Mitzi

 *nyteryda wrote:*   

>  *Mitzi wrote:*   I'm having the exact same problem since emerging to Samba 3.0.6 (since then I've also tried 3.0.7 which has the same problems).  It appears like everything is working fine I can see the shares but when I try and open a file the connection hangs.  Everything works fine using smbclient, it only hangs when trying to access the shares via my Windows XP SP2 box.
> 
> I have a feeling that my only option is to revert back to an older version of Samba...anyone know how to do this via emerge?? 
> 
> you can emerge a specific package version by doing something like
> ...

 

Oh great thanks.  Now is there anyway to find out what version I did have before the 3.0.6 upgrade or should I just try and go for the latest of the 2.2 branch (I think it was 2.2.11)?

----------

## RabCaz

Since it seems to still be a bit unstable (hangs when adding many files to either XmmS or amarok) im going to go on a wild chase here and try a GCC="3.3.0" emerge samba to see if it might be any better...

btw no other app that behaves strangely ?

----------

## XebB

RabCaz: Well, how did you do with your test? Is it working normally now?

----------

## RabCaz

 *XebB wrote:*   

> RabCaz: Well, how did you do with your test? Is it working normally now?

 

Well now i could add the entire Audiolib to Amarok, added it folder by folder (just to be sure)

And it seems like its going stable, at least more relieable than before...

Ill be back after some testing.

----------

## Mitzi

Update: Well I've reverted back to 3.0.5 (compiled with GCC 3.3.4) and everything is fine again.  I think there are some fundamental problems with 3.0.6 and 3.0.7.

Cheers,

Mitzi

----------

## RabCaz

 *Mitzi wrote:*   

> Update: Well I've reverted back to 3.0.5 (compiled with GCC 3.3.4) and everything is fine again.  I think there are some fundamental problems with 3.0.6 and 3.0.7.
> 
> Cheers,
> 
> Mitzi

 

Hmm, I tried the lowest version in portage too, but with the same result.

Might be something specifik with Samba then. I dont recall which version I used that woked for me. 

But the one im currently using with the GCC="3.3.0" seems to work nice. Got one hangup when I rapidly changed songs, bur nothing more than that.

----------

## RabCaz

Update : Xmms hangs when adding "too many" folders e.g seems to be something when reading/scanning through multiple folders/files....

When Amarok stalls and hang the entire system somehow follows, KDE goes byebye and a ps -A wont even complete, either as ordinary user nor as root... killall -9 amarokapp or kill -9 wont even touch the amarokapp pid...

damn strange..... Seems like it drags some part of the kernel with it too since not even a reboot works... stops telling me "Failed to umount network filesystems  [!!]" so I have to reset the pc manually...

Starting to get on my nerver too =/

strange, very strange. Gonna give samba 3.05 a try.

----------

## RabCaz

Same thing with samba 3.05, going back to gcc 3.3.3 to test..

was using 3.3.4-r1

----------

## RabCaz

Im starting to think that it might be something with the smbsupport compiled in the kernel somehow since it seems like it holds the process, or mount, still active even after the pid has been killed... e.g if i use xmms and it hangs, i can kill xmms, an mostly umount the disks, but mostly the music_disk (which is the mount that hangs, the other disk unmounts without a prob (even that that disk contains a folder which in reality is the mounted disk that hanged))

it is still "alive" as a mount even if the pid is destroyed.. it also fecks up my ability to browse my homefolder... it all comes down to this, reboot to get the mount to unmount.... have anyone had any of these problems ?

Im gonna try to recompile my kernel without smbsupport in the kernel to see if its that thas causes the prob. (would be strange considering the different kernels ive tested....)

----------

## RabCaz

yuepp, none of this helped at all... what might be the error ??

worst part is that i need to get samba working...

and its quite irritating that there seems to be noo solution to it...

Update : also went back to gcc 3.3.4-rc1...

nothing helps... dont like this a bit im afraid..

What recent changes has been made too samba that caues this ?

I have also changed back my CFLAGS to assemble last install's CLFAGS and still no lucke... meanwhile in Win everything works nice so it does not seem to be a serverissue....

Must I reinstall again ? ....

----------

## kopfsalat

I had a similar problem with my samba server running on debian.

Adding

```
use sendfile = no
```

under the [global] section in smb.conf seems to have resolved this.

hope that helps.

----------

## crypt0shite

 *kopfsalat wrote:*   

> I had a similar problem with my samba server running on debian.
> 
> Adding
> 
> ```
> ...

 

just wanted to add this solution worked for me.  Thanks!!!

----------

## RabCaz

 *crypt0shite wrote:*   

>  *kopfsalat wrote:*   I had a similar problem with my samba server running on debian.
> 
> Adding
> 
> ```
> ...

 

Yejj & joy, it seems like it did the trick. Although I let my Gentoo reinstall last night =D =D. But with the same result, but with the suggested adding to smb.conf it seems to wok. Adding the entire musicdisk went flawless, and swithcing between songs works nice =D.

Thank you for the solution Crypt0 !

----------

## RabCaz

(since im on a kind of monlogue here Ill continue it =D)

Well. it worked for a while... did a reinstall of the server today.. going Mandrake on it. Part får testing, part for checking of the debian install was f00... install went nice and smooth... and I ended upp the same way.. the network hangs like crazy..... not even Crypt0shit's solution seemed to work.... So for the moment Im reverting back to samba 3.0.5 ...

still strange, all I can think of that has changed since the last time (before the reinstall due to HDchange, when everything worked perfect..) is the new portage... any ideas anyone ?

I havent had the chance to test the server i win yet though...

Update_1: It also hangs KDEpanels (perhaps due to that Amarok has a icon and the Mediacontrol there) but if I do a kill -9 <pid for smbiod> it "releases" the panels , but i can foget about browsing my homefolder..... weird

Update_2 : Afterwards, if I try to remount the share, without restarting, I get the follwing error : "Could not resolve mount point /home/path/to/share".

But now I could umount the share and remount it, though this time its mounted with samba 3.0.5. Gonna make a reboot later so it can be mounted "freshly". Ill get back to you about the result.

----------

## crazy_devil

Hi,

I was wondering what kind of file system you are using since I experience the very same problem....

----------

## RabCaz

 *crazy_devil wrote:*   

> Hi,
> 
> I was wondering what kind of file system you are using since I experience the very same problem....

 

Im using Gentooo (on this machine) and nowmore im using Mandrake 10 on the server. (its acting as a ftp/web/fileserver). 

And it seems that the problems have gone away now since I emerged samba 3.0.5 . Used 3.0.7 before but as I have noticed that a few people have this kind of trouble with 3.0.7 therefore I reverted to 3.0.5.

The problems before seemed to be somehow Debianspecific, but it was a flunky unstable install I had, so a reinstall was comming its way anyway =D.

----------

## crazy_devil

I see.

Well, after some testing(I use reiserFS as a file system) I found out that DMA Xfer on my harddrive was off. With a quickly installed FTP server I had the same problem.   :Embarassed:   Recompiled the kernel, and it is working perfectly.

----------

## RabCaz

 *crazy_devil wrote:*   

>  it is working perfectly.

 

Glad that it works =D

----------

## XebB

The "use sendfile = no" doesn't work for me either...

My the samba-server on my server seems to be working perfect.. Both from my gf's comp running winxp and on the xbox, still... But I just can't get it to Not hang itself when I try to load all mp3's to the xmms's playlist!

I really need to be able to do this, since I'm also running DC++ through Wine, and it must load all my mp3's!

Read some in another thread and saw we have 2 people that might be able to help us, right here in the forums... So i'll send 'em a PM about this thread, and we'll c where it can take us...

Sorry for being inactive and leaving you alone RabCaz, but now i'm Back  :Smile: 

----------

## mglauche

This seems strange as smbfs is a part of the kernel, and not samba ...

which kernel are you using ?

----------

## plate

I suspect this to be related to this bug (#66318).

----------

## XebB

My version of kernel is:

gentoo-dev-sources version:  2.6.8-gentoo-r3

And for samba i'm using: 

3.0.7-r1

It's suggested in that other thread that I downgrade samba to 3.0.5, will that help me in any way?

----------

## thepi

Just wanted to mention: the "use sendfile = no" approach works on this side as well  :Very Happy:   Only thing is that it increases processing & network load slightly.  :Confused: 

pi~

----------

## tgnb

 *thepi wrote:*   

> Just wanted to mention: the "use sendfile = no" approach works on this side as well   Only thing is that it increases processing & network load slightly. 
> 
> pi~

 

It doesnt seem to help me  :Sad:  I think its kernel related personally because i have another box running an older(2.6.7) kernel and i'm not seeing the problem there.

----------

