Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-05-01 Thread Christian Perrier
Quoting Peter Cordes (pe...@cordes.ca):

  I didn't see any panics in the week I was running the leaky Debian
 binary package.  Maybe that was just random chance, since I have
 only seen 4 panics since Apr 14th, when I installed the self-compiled
 version.
 Sat Apr 18 14:04:32 2009
 Tue Apr 21 16:06:47 2009
 Fri Apr 24 17:39:27 2009
 Wed Apr 29 18:06:36 2009
 (So probably while samba was actually in use from one of the client
 machines, judging from the times.)
 
  Even if the binary package was ok, it's possible my build environment
 introduced a problem.  I built the packages on the same fully
 up-to-date Lenny that I'm running Samba on, though.  Using
 dpkg-buildpackage -us -uc -b,  IIRC.
 
  It's possible I would have seen those samba panics if I'd just
 compiled from source without applying the patch.
 
  My machine doesn't have enough memory to test for long with the leak
 happening, so I can't think of any great solutions.  I can install the
 -dbg package, though, and maybe get a useful backtrace.


Packages with the memory leak fix have been uploaded to
stable-proposed-updates yesterday. 

See http://wiki.debian.org/StableProposedUpdates for instructions
about how to use it, but please be aware that such packages have not
been officially accepted in stable, yet. They are planned for the next
stable point release.




signature.asc
Description: Digital signature


Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-04-30 Thread Peter Cordes
Christian Perrier bubu...@debian.org wrote:
 Quoting Peter Cordes (pe...@cordes.ca):
   I compiled Samba packages for myself with bug_520794.patch (thanks
  Christian).  I'll keep an eye on it to see if it's still leaking.
  ping me in a week if I forget to update this.

 Any news about this ?

 I wasn't subscribed to the bug (I thought that would happen
automatically after sending mail to n...@b.d.o), so I didn't get that
email.  I have subscribed now, though, so you can just reply to the bug.

 It doesn't leak memory anymore, but I'm seeing smbd panics every
few days.

Here's a sample from my /var/log/samba/log.smbd:
[2009/04/29 17:38:20,  0] printing/print_cups.c:cups_connect(68)
  Unable to connect to CUPS server localhost:631 - Connection refused
(these CUPS messages happen at this frequency all the time.  I guess
I should turn that off whatever wants it, since I don't run CUPS on
this machine.)
[2009/04/29 17:38:20,  0] printing/print_cups.c:cups_connect(68)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2009/04/29 17:50:29,  0] printing/print_cups.c:cups_connect(68)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2009/04/29 17:50:29,  0] printing/print_cups.c:cups_connect(68)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2009/04/29 18:03:17,  0] printing/print_cups.c:cups_connect(68)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2009/04/29 18:03:17,  0] printing/print_cups.c:cups_connect(68)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2009/04/29 18:06:28,  0] lib/util_tdb.c:tdb_wrap_log(886)
  tdb(/var/lib/samba/passdb.tdb): tdb_transaction_commit: failed to setup 
recovery data
[2009/04/29 18:06:28,  0] passdb/pdb_tdb.c:tdb_update_sam(1193)
  Could not commit transaction
[2009/04/29 18:06:28,  0] lib/util.c:smb_panic(1663)
  PANIC (pid 14712): transaction_cancel failed
[2009/04/29 18:06:28,  0] lib/util.c:log_stack_trace(1767)
  BACKTRACE: 0 stack frames:
[2009/04/29 18:06:28,  0] lib/util.c:smb_panic(1668)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 14712]
[2009/04/29 18:06:36,  0] lib/util.c:smb_panic(1676)
  smb_panic(): action returned status 0
[2009/04/29 18:06:36,  0] lib/fault.c:dump_core(201)
  dumping core in /var/log/samba/cores/smbd
[2009/04/29 18:06:38,  0] printing/print_cups.c:cups_connect(68)

 All the Samba crashes generate the same series of log file lines.
all with 0 stack frames of backtrace :(

The panic-action script sends email with this backtrace
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb79f06d0 (LWP 21277)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7eeb424 in __kernel_vsyscall ()
#0  0xb7eeb424 in __kernel_vsyscall ()
#1  0xb7b2d6f3 in waitpid () from /lib/i686/cmov/libc.so.6
#2  0xb7acb46b in ?? () from /lib/i686/cmov/libc.so.6
#3  0xb7cb74ad in system () from /lib/i686/cmov/libpthread.so.0
#4  0x08201ef9 in smb_panic ()
#5  0x081d3a5b in ?? ()
#6  0x084f2c97 in ?? ()
#7  0x0008 in ?? ()
#8  0x0852d3b9 in ?? ()
#9  0x0852dceb in ?? ()
#10 0x04a9 in ?? ()
#11 0x1db3b1f8 in ?? ()
#12 0xbfc055a8 in ?? ()
#13 0x081dfc3b in memcache_flush ()
#14 0x081d3a85 in ?? ()
#15 0x0003 in ?? ()
#16 0x091f9ad0 in ?? ()
#17 0xbfc055c8 in ?? ()
#18 0x081b46af in pdb_update_sam_account ()
Backtrace stopped: frame did not save the PC


My smb.conf is not very modern either.  It still uses security=share,
because I set it up that way 6 years ago, and haven't wanted to re-do
my Windows home network since then.  (file attached)

 It's not the parent daemon that panics, and Windows clients seem to
reconnect ok.  Anyway, my users haven't noticed any actual service
interruptions.

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(pe...@cor , des.ca)

The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces! -- Plautus, 200 BC
[global]

# Do something 

Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-04-24 Thread Christian Perrier
Quoting Massimiliano Ferrero (m.ferr...@midhgard.it):
 Christian Perrier ha scritto:
 Quoting Peter Cordes (pe...@cordes.ca):

   
  I compiled Samba packages for myself with bug_520794.patch (thanks
 Christian).  I'll keep an eye on it to see if it's still leaking.
 ping me in a week if I forget to update this.
 


 Any news about this ?
   
 I sent you a mail on 8/4, did you received that one? There was a memory  

It might have fallen up in s spam trap. Sorry for this.

 graph attached
 For me the patch has resolved the issue and there is no sign of  
 instability or any regression.
 I think the patch should be included in the next secutiry update.


Could you resend the mail with the graph to the BTS:
520...@bugs.debian.orgĀ ?

Many thanks in advance.




signature.asc
Description: Digital signature


Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-04-23 Thread Christian Perrier
Quoting Peter Cordes (pe...@cordes.ca):

  I was seeing memory leaks in Samba on my home server.  (simple setup
 with 1 win2k client.)  I was wondering why my machine was feeling
 slow, and I saw that smbd was using all my RAM:  300MB RSS,  600MB
 virtual size, on my 512MB PIII 500MHz.  And my small swap partition
 was mostly full.  This is after only a week of having Samba running,
 and this machine normally goes for months without reboots.  This is a
 showstopper bug for me, so I'm heavily in favour of updating stable.
 
  Are there configurations where it doesn't leak, or are modern servers
 supposed to have so much RAM and swap that it doesn't matter?  The
 latter is IMHO not a good enough argument to justify leaving it unfixed.
 
  I compiled Samba packages for myself with bug_520794.patch (thanks
 Christian).  I'll keep an eye on it to see if it's still leaking.
 ping me in a week if I forget to update this.


Any news about thisĀ ?




signature.asc
Description: Digital signature


Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-04-14 Thread Peter Cordes
On Mon, Mar 23, 2009 at 06:26:49PM +0100, Christian Perrier wrote:
 Quoting Massimiliano Ferrero (m.ferr...@midhgard.it):
 
  if you think it's necessary in the next days I could compile a modified  
  3.2.5-4 with Volker patch, test on this customer and verify that the  
  problem disappears.
 
 
 That would be even more convincing that this bug is worth fixing *and*
 not risky, which is important to decide whether or not we fix it for
 lenny (this is a matter of interpretation whether it's important
 enough to warrant an update to lenny and the (always non null though
 apparently very very low) risk that we could introduce other bugs with
 that fix.
 

 I was seeing memory leaks in Samba on my home server.  (simple setup
with 1 win2k client.)  I was wondering why my machine was feeling
slow, and I saw that smbd was using all my RAM:  300MB RSS,  600MB
virtual size, on my 512MB PIII 500MHz.  And my small swap partition
was mostly full.  This is after only a week of having Samba running,
and this machine normally goes for months without reboots.  This is a
showstopper bug for me, so I'm heavily in favour of updating stable.

 Are there configurations where it doesn't leak, or are modern servers
supposed to have so much RAM and swap that it doesn't matter?  The
latter is IMHO not a good enough argument to justify leaving it unfixed.

 I compiled Samba packages for myself with bug_520794.patch (thanks
Christian).  I'll keep an eye on it to see if it's still leaking.
ping me in a week if I forget to update this.

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(pe...@cor , des.ca)

The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces! -- Plautus, 200 BC


signature.asc
Description: Digital signature


Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-04-14 Thread Christian Perrier
Quoting Peter Cordes (pe...@cordes.ca):

  Are there configurations where it doesn't leak, or are modern servers
 supposed to have so much RAM and swap that it doesn't matter?  The

At least on my home server, it doesn't leak (genuine lenny server with
samba 2:3.2.5-4lenny2)

 latter is IMHO not a good enough argument to justify leaving it unfixed.

Of course.

 
  I compiled Samba packages for myself with bug_520794.patch (thanks
 Christian).  I'll keep an eye on it to see if it's still leaking.
 ping me in a week if I forget to update this.


Yes. Having confirmation that this patch fixes the memory leak would
definitely be a good argument to include it in an update for stable.




signature.asc
Description: Digital signature


Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-03-23 Thread Christian Perrier
tags 520794 patch
thanks

Quoting Volker Lendecke (volker.lende...@sernet.de):
 On Mon, Mar 23, 2009 at 07:10:51AM +0100, Christian Perrier wrote:
  Volker (Lendecke, CC'ed), you were the one fixing this. Do you have
  the patch you used handy somewhere so that we see if we can backport
  it to Debian's 3.2.5?
 
 http://git.samba.org/?p=samba.git;a=commitdiff;h=cc70e0f88328e3641008


OK, thanks Volker.

For reference in the Debian BTS, here's the patch that applies to
3.2.5 and could then be applied in the next point release.

Steve, any objection to include that one in the next point release?

Goal: fix memory leak in vfs_full_audit

Fixes: #520794

Status wrt upstream: Fixed in 3.2.8

Author: Volker Lendecke v...@samba.org

Index: lenny/source/modules/vfs_full_audit.c
===
--- lenny.orig/source/modules/vfs_full_audit.c
+++ lenny/source/modules/vfs_full_audit.c
@@ -701,6 +701,7 @@
 static char *audit_prefix(TALLOC_CTX *ctx, connection_struct *conn)
 {
 	char *prefix = NULL;
+	char *result;
 
 	prefix = talloc_strdup(ctx,
 			lp_parm_const_string(SNUM(conn), full_audit,
@@ -708,12 +709,14 @@
 	if (!prefix) {
 		return NULL;
 	}
-	return talloc_sub_advanced(ctx,
+	result = talloc_sub_advanced(ctx,
 			lp_servicename(SNUM(conn)), conn-user,
 			conn-connectpath, conn-gid,
 			get_current_username(),
 			current_user_info.domain,
 			prefix);
+	TALLOC_FREE(prefix);
+	return result;
 }
 
 static bool log_success(vfs_handle_struct *handle, vfs_op_type op)


signature.asc
Description: Digital signature


Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-03-23 Thread Steve Langasek
On Mon, Mar 23, 2009 at 11:22:10AM +0100, Christian Perrier wrote:
 tags 520794 patch
 thanks

 Quoting Volker Lendecke (volker.lende...@sernet.de):
  On Mon, Mar 23, 2009 at 07:10:51AM +0100, Christian Perrier wrote:
   Volker (Lendecke, CC'ed), you were the one fixing this. Do you have
   the patch you used handy somewhere so that we see if we can backport
   it to Debian's 3.2.5?

  http://git.samba.org/?p=samba.git;a=commitdiff;h=cc70e0f88328e3641008

 OK, thanks Volker.

 For reference in the Debian BTS, here's the patch that applies to
 3.2.5 and could then be applied in the next point release.

 Steve, any objection to include that one in the next point release?

I wouldn't have considered this critical enough to include in a stable
update, but if you want to do the work, I have no objections.

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#520794: [Pkg-samba-maint] Bug#520794: samba: smbd memory usage always increase - memory leak

2009-03-23 Thread Christian Perrier
Quoting Massimiliano Ferrero (m.ferr...@midhgard.it):

 if you think it's necessary in the next days I could compile a modified  
 3.2.5-4 with Volker patch, test on this customer and verify that the  
 problem disappears.


That would be even more convincing that this bug is worth fixing *and*
not risky, which is important to decide whether or not we fix it for
lenny (this is a matter of interpretation whether it's important
enough to warrant an update to lenny and the (always non null though
apparently very very low) risk that we could introduce other bugs with
that fix.






-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org