Samba creates multiple copies of video in /tmp

I have a desktop and a laptop both running opensuse 11.2 with kde4. I have a samba share on my desktop. I tried opening a video on that share from my laptop (wirelessly) with Dolphin/SMPlayer. Here’s what happened:

The video started downloading and the system tray notified me it would take 25 minutes. I thought that was too long (video is 350MB) so I checked the download speed and it was about 2 MB/s. It didn’t make sense but I let it keep going.

25 minutes and 3.4 GB later, the download finally “finished”–according to the system tray. However, I checked my system monitor and something was still downloading at 2 MB/s. I confirmed with “df -h” that I was losing 2MB of space a second. At this point I only had about 700MB of disk space left so I rebooted (I wasn’t sure how else to stop the download).

After digging around on / I found my video at /var/tmp/kdecache-londy/krun and it was 350MB. Then I found multiple copies of the same video, of varying sizes, on /tmp/kde-londy totalling 3GB.

I deleted the tmp files and tried it again. This time instead of clicking on the video to play it, I tried copying it to my laptop. Same thing started to happen but I didn’t let it continue.

WTF??

For me happen the same thing. What i can see is that in the process list appear a lot of samba process even when i only clicked on a “copy” from the server. My situation is:

Server: openSUSE 11.1 (Kde 3.5)
Client: openSUSE 11.2 (Kde 4.2)

Server function very good, i use it with Windows clients machines and do the job, it copy around at 6MB/s.

In my desktop client with openSUSE 11.2 i can browse the network but when i do: left button in the file and then click ‘copy’ in my list process appear a lot of kdeinit4 process like:


root      7143  5.8  0.0   3348  1740 pts/1    R+   18:50   1:31 iptraf
jago      7292  0.0  0.0   4136  1340 ?        S    19:00   0:00 /bin/sh /usr/bin/firefox
jago      7297  1.0  2.7 207544 57288 ?        Sl   19:00   0:10 /usr/lib/firefox/firefox
jago      7300  0.0  0.1   6592  2912 ?        S    19:00   0:00 /usr/lib/GConf/2/gconfd-2
jago      7309  0.0  0.6  61424 12384 ?        S    19:00   0:00 /usr/lib/mozilla/kmozillahelper
jago      7397  9.7  1.8 122424 38040 ?        Sl   19:03   1:16 /usr/bin/dolphin -icon system-file-manager -caption Dolphin
root      7496  0.0  0.0      0     0 ?        S    19:05   0:00 [pdflush]
jago      7514  0.0  0.1   4984  2520 pts/3    Ss+  19:06   0:00 /bin/bash
jago      7838  1.4  0.3  73960  7260 ?        S    19:15   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinyJ7397.slave-socket
jago      7842  2.5  0.5  89604 11264 ?        S    19:15   0:00 kdeinit4: kio_smb [kdeinit] smb local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinZf7397.slave-socket
jago      7844  2.6  0.5  89604 11256 ?        S    19:15   0:00 kdeinit4: kio_smb [kdeinit] smb local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinna7397.slave-socket
jago      7845  1.7  0.3  73960  7148 ?        S    19:15   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinYl7397.slave-socket
jago      7846  2.9  0.5  89604 11264 ?        S    19:15   0:00 kdeinit4: kio_smb [kdeinit] smb local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinay7397.slave-socket
jago      7847  1.3  0.3  73960  7132 ?        S    19:15   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinQF7397.slave-socket
jago      7848  2.6  0.5  89604 11264 ?        S    19:15   0:00 kdeinit4: kio_smb [kdeinit] smb local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinaC7397.slave-socket
jago      7849  1.9  0.3  73960  7120 ?        S    19:15   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinAe7397.slave-socket
jago      7850  2.6  0.5  89604 11268 ?        S    19:15   0:00 kdeinit4: kio_smb [kdeinit] smb local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinbk7397.slave-socket
jago      7851  1.9  0.3  73960  7112 ?        S    19:15   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-jago/klauncherNT1541.slave-socket local:/tmp/ksocket-jago/dolphinAL7397.slave-socket
root      7866  0.0  0.0   2508   896 pts/0    R+   19:16   0:00 ps -aux

In the iptraf detailed statistic in eth0 appear (look the incoming data):

│ Total rates:      88660.0 kbits/sec        Broadcast packets:           14                                                                                                    │
│                   11843.8 packets/sec      Broadcast bytes:           2704                                                                                                    │
│                                                                                                                                                                               │
│ Incoming rates:   86097.8 kbits/sec                                                                                                                                           │
│                    7511.2 packets/sec                                                                                                                                         │
│                                            IP checksum errors:           0                                                                                                    │
│ Outgoing rates:    2583.0 kbits/sec                                                                                                                                           │
│                    4332.6 packets/sec                                                                                                                                         │
│                                                                              

With df -h i have (notice my low disk space on /):

Jago:/tmp/kde-jago # df -h
S.ficheros          Tamaño Usado  Disp Uso% Montado en
/dev/sda2              30G   24G  4,5G  85% /
udev                 1001M  472K 1001M   1% /dev

and in the /temp/kde-jago/ i have this:

Jago:/tmp/kde-jago # l
total 14339732
drwx------  2 jago users      36864 dic 31 19:15 ./
drwxrwxrwt 35 root root       20480 dic 31 19:15 ../
-rw-------  1 jago users          0 dic 31 19:05 dolphinAX7397.tmp
-rw-r--r--  1 jago users 2029751332 dic 31 19:14 dolphinAX7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:15 dolphincs7397.tmp
-rw-r--r--  1 jago users 1719646120 dic 31 19:27 dolphincs7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:05 dolphinDj7397.tmp
-rw-r--r--  1 jago users 2097235876 dic 31 19:14 dolphinDj7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:15 dolphineB7397.tmp
-rw-r--r--  1 jago users 1719629772 dic 31 19:27 dolphineB7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:15 dolphinfB7397.tmp
-rw-r--r--  1 jago users 1719613424 dic 31 19:27 dolphinfB7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:04 dolphinll7397.tmp
-rw-------  1 jago users          0 dic 31 19:15 dolphinsd7397.tmp
-rw-r--r--  1 jago users 1719613424 dic 31 19:27 dolphinsd7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:15 dolphinsH7397.tmp
-rw-r--r--  1 jago users 1717864188 dic 31 19:27 dolphinsH7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:05 dolphinSN7397.tmp
-rw-r--r--  1 jago users 1960419464 dic 31 19:13 dolphinSN7397.tmp.part
-rw-------  1 jago users          0 dic 31 19:04 dolphinVU7397.tmp

(Jago: is my user and machine name)

Samba status (smbstatus -b):

Jago:/tmp/kde-jago # smbstatus -b

Samba version 3.4.2-1.1.3.1-2229-SUSE-SL11.2
PID     Username      Group         Machine
-------------------------------------------------------------------
 <processes do not show up in anonymous mode>


Sometimes i have to stop samba or kill process, because even with samba stoped it doesn’t stop transfers and exit the process created neither.

Samba configs files:
Server:


# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2008-12-03
[global]
        workgroup = mi_casa
        netbios name = Servidor
        server string = PC Servidor
        comment = Servidor de Mi Casa

        # Permite el ingreso sin contraseña a la máquina y revisar sus carpetas compartidas desde Windows
        security = share
#       usershare allow guests = yes

#       printing = cups
#       printcap name = cups
#       printcap cache time = 750
#       cups options = raw
#       map to guest = Bad User
#       logon path = \\%L\profiles\.msprofile
#       logon home = \\%L\%U\.9xprofile
#       logon drive = P:
#       usershare allow guests = Yes
#       add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
#       domain logons = No
#       domain master = No

[Software]
        path = /mnt/Software
        comment = Repositorio de Softwares
        writable = yes
        guest ok = yes

Client (with oS11.2)


# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2009-10-27
[global]
        workgroup = mi_casa
        netbios name = Jago
        server string = Jago
        security = share
#       printcap name = cups
#       cups options = raw
#       logon path = \\%25L\profiles\.msprofile
#       logon home = \\%25L\%25U\.9xprofile
#       logon drive = P:
#       usershare allow guests = Yes
#       usershare max shares = 100
#       restrict anonymous = no
#       domain master = no
#       passdb backend = smbpasswd
#       wins support = yes
#       include = /etc/samba/dhcp.conf
#       socket options = TCP_NODELAY SO_RCVBUF=4096 SO_SNDBUF=4096
[Musica]
        comment = Musica
        path = /media/Musica
        guest ok = yes


Any idea?? Someone can help us to debug it to give more info please…

Thanks in advance =).

PD: With FTP transfers from my Server pc i got transfers rate up to 12MB/s, with samba only 6MB/s in my network of 100BaseT full duplex. Why?

I add information: when i use only Dolphin to browse the network, it start with the kdeinit4 bla bla bla process to use my network bandwidth. Only for use it.

If i click in Dolphin to appear in first plane on the screen it fire the kdeinit4 bla bla bla process… I kill them (stop samba doesn’t work)…

…and then double click in the folder that i want to browse and start again with the kdeinit4 bla bla bla… kill them…

…and then click on the file i want to transfer and i get the kdeinit4 bla bla bla… kill them…

…and then click on edit->copy and once again the kdeinit4 bla bla bla… kill them…

…and then i ctrl+tab to change the local folder and guess what… doesn’t appear the kdeinit4 bla bla bla :O… so then pasted the file and guess again what… it start to transfer the file at a 7.5MB/s (measured acording knotify)

…and it finished and still i have the kdeinit4 bla bla in memory… so i have closed dolphin and … cha chan… i got new kdeinit4 samba bla bla bla process… so i have to kill them…

¡¡HAPPY NEW YEAR FOR EVERYONE!! (and specially for those can answer this issue =P )

I’m glad I’m not the only one with this problem.

I found out a few more things this afternoon.

1.) This problem doesn’t affect konqueror.

2.) After browsing to the samba share with Dolphin, the copying process (to /tmp/kde-londy) starts just by hovering my mouse over a video. I don’t even have to click anything. Hovering over one video creates one copy of that file. When I first reported the problem, I had many copies because I was hovering over a bunch of video files.

3.) Upgrading kde to the STABLE or Factory repo doesn’t solve it.

4.) “killall kio_smb” stops the downloads

5.) I think it might be file-size related. The copying didn’t start with a video of 50MB or a 100MB pdf. My videos of 350MB and over all started copying just by hovering over it.

So, the workaround for me right now is to just use konqueror as my file browser.

Add: I browsed with dolphin over my network and nothing happen, i double clicked on a video file, opened and watched without problem with VLC, then closed… and it keep sending me data. =(.

Someone know how can i debug it to offer you more info?

Well, I don’t know if we’re having the same problem but my problem goes away if I remove the Information Panel in Dolphin.

Maybe when the preview is creating, it have to transfer the whole file to do that. That could be reasonably right, but i think that it doesn’t stop the transfer when change the file or the browse another folder or change windows… Maybe is the reason of transfers (copy) at 6MB/s, the another 6MB/s is used by dolphin to make the preview.

this is quite an annoying bug. You can vote it up here:

https://bugzilla.novell.com/show_bug.cgi?id=555933

or in the corresponding KDE bugtracker

https://bugs.kde.org/show_bug.cgi?id=211007

Glad to see others are having the same issue and it’s not just me

Having the same problem.
Particularly bad when trying to play a video over samba share, cause the bad behaviour is the same.

(by the way, anybody knows if with NFS there’s the same problem in the same use case ?)

There’s no problem with nfs. In fact it’s much better. With nfs the video starts playing immediately instead of downloading it first.