gvfsd-smb memory leak

Bug #474021 reported by Peter Runge
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gvfs
Unknown
High
gvfs (Ubuntu)
Incomplete
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gvfs

Mounted an SMB share using gvfs-mount (also same effect when done through Places/Network menu item in Gnome). When copying large files from my hard disk to the network share using ~/.gvfs/[share] memory usage of the gvfsd-smb process becomes large (had over 4G at one point) which could be a memory leak. This is repeatable - I tried rebooting and the process grows again when doing the copy.

Ran valgrind with --leak-check=full over gvfsd-smb. Results attached - seems to indicate a leak in smbc_set_credentials_with_fallback call in /usr/lib/libsmbclient.so.0. Console out (redirected to file from a script) from gvfsd-smb execution has one line "smbc_set_credentials_with_fallback: allocation fail". Could this be a bug in libsmbclient instead of gvfs?

Running libsmbclient 2:3.4.0-3ubuntu5, gvfs 1.4.1-0ubuntu1 on Ubuntu 9.10. Never experienced this leak before when copying large files in 9.04, only after upgrading to 9.10.

Revision history for this message
Peter Runge (prunge) wrote :
Revision history for this message
Peter Runge (prunge) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in gvfs (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Revision history for this message
Peter Runge (prunge) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks for sending upstream. Could you run valgrind again though, but with gvfs-backends-dbgsym, libgvfscommon0-dbgsym, gvfs-dbgsym, libglib2.0-0-dbg, libc6-dbg and libsmbclient-dbgsym installed. The current valgrind log clearly shows a memory leak, but it's not obvious where this happens, due to the lack of symbols. It might be a samba issue

Changed in gvfs (Ubuntu):
status: New → Incomplete
Revision history for this message
Peter Runge (prunge) wrote :

Done.

Attached valgrind log with debug symbols.

Revision history for this message
Oded Arbel (oded-geek) wrote :

I had a problem today where I came back to my computer after not using it all the weekend (its the office workstation) and the gvfs-smb process was taking 5G of virtual and 2.5G of resident memory. I'm not sure if its the same problem. I used apport to report this, I hope it will attach some details when I submit this report.

Changed in gvfs:
status: Unknown → New
Revision history for this message
darking358 (gaowenyu1982) wrote :

when I upgrade to 10.04 from 9.10,found gvfsd eat a lot of memory,after umount network share and kill gvfsd,seem all will be ok

darking@darking-desktop:~/scripts/trunk$ gvfs-mount -l
Volume(0): cdrom0
  Type: GUnixVolume
Mount(0): fa -> file:///media/cnimg/fa
  Type: GUnixMount
Mount(1): fe -> file:///media/cnimg/fe
  Type: GUnixMount
Mount(2): fmg -> file:///media/cnimg/fmg
  Type: GUnixMount
Mount(3): fos -> file:///media/cnimg/fos
  Type: GUnixMount
darking@darking-desktop:~/scripts/trunk$ top

top - 10:35:09 up 1 day, 23:07, 3 users, load average: 3.94, 4.66, 4.51
Tasks: 262 total, 2 running, 260 sleeping, 0 stopped, 0 zombie
Cpu(s): 75.3%us, 24.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 2053668k total, 1904008k used, 149660k free, 26464k buffers
Swap: 2048276k total, 416928k used, 1631348k free, 130812k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22424 darking 20 0 1272m 1.2g 1868 S 0.7 58.8 7:31.46 gvfsd
 2123 darking 20 0 523m 277m 21m S 5.3 13.8 16:22.49 firefox-bin
 2091 darking 20 0 296m 54m 17m S 0.3 2.7 1:00.38 thunderbird-bin
  951 root 20 0 327m 22m 5620 S 0.0 1.1 5:49.14 Xorg
 1671 darking 20 0 64416 15m 9652 S 0.0 0.8 0:03.95 python
22529 darking 20 0 122m 15m 6268 S 4.0 0.8 78:38.13 x-session-mana

Changed in gvfs:
importance: Unknown → High
Changed in gvfs:
status: New → Incomplete
Changed in gvfs:
status: Incomplete → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.