Re: [Samba] 3.6.10 file handle leak under ancient 32-bit kernel

2013-01-07 Thread starlight . 2013q1
Realized that the differences
between the 'config.h' files
is what really matters--attached
below with good/bad order in the
pairs.

Several likely enough culprits appear
in the list and I'm willing to dig around
the code.  Can anyone suggest which
#define is the most probable cause?

Thanks

   #define HAVE_ATTR_XATTR_H 1
 /* #undef HAVE_ATTR_XATTR_H */

 /* #undef HAVE_BROKEN_POSIX_FALLOCATE */
   #define HAVE_BROKEN_POSIX_FALLOCATE

   #define HAVE_FDOPENDIR 1
 /* #undef HAVE_FDOPENDIR */

   #define HAVE_INOTIFY 1
 /* #undef HAVE_INOTIFY */

   #define HAVE_INOTIFY_INIT 1
 /* #undef HAVE_INOTIFY_INIT */

   #define HAVE_KRB5_LOCATE_PLUGIN_H 1
 /* #undef HAVE_KRB5_LOCATE_PLUGIN_H */

   #define HAVE_LINUX_DQBLK_XFS_H 1
 /* #undef HAVE_LINUX_DQBLK_XFS_H */

   #define HAVE_LINUX_FALLOC_H 1
 /* #undef HAVE_LINUX_FALLOC_H */

   #define HAVE_LINUX_INOTIFY_H 1
 /* #undef HAVE_LINUX_INOTIFY_H */

   #define HAVE_LINUX_SPLICE 1
 /* #undef HAVE_LINUX_SPLICE */

 /* #undef HAVE_NFS_QUOTAS */
   #define HAVE_NFS_QUOTAS 1

   #define HAVE_SPLICE_DECL 1
 /* #undef HAVE_SPLICE_DECL */

   #define HAVE_SYS_INOTIFY_H 1
 /* #undef HAVE_SYS_INOTIFY_H */

 /* #undef HAVE_UT_UT_TV */
   #define HAVE_UT_UT_TV 1

   #define HAVE_XFS_QUOTAS 1
 /* #undef HAVE_XFS_QUOTAS */

   #define HAVE___NR_INOTIFY_INIT_DECL 1
 /* #undef HAVE___NR_INOTIFY_INIT_DECL */

   #define SIZEOF_LONG 8
   #define SIZEOF_LONG 4

   #define SIZEOF_SIZE_T 8
   #define SIZEOF_SIZE_T 4

   #define SIZEOF_SSIZE_T 8
   #define SIZEOF_SSIZE_T 4

   #define SIZEOF_TIME_T 8
 /* #undef SIZEOF_TIME_T */

   #define SIZEOF_VOID_P 8
   #define SIZEOF_VOID_P 4

   #define TIME_T_MAX 67768036191676799ll
 /* #undef TIME_T_MAX */
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] 3.6.10 file handle leak under ancient 32-bit kernel

2013-01-07 Thread starlight . 2013q1
Ah, and of course a 'strace'.

   http://binnacle.cx/file/smbd_file_leak_strace.txt

The leak appears related to the

open(log)

events where /var/log is opened and
scanned periodically.  See three
'open' calls without any matching
close.

Most of the /proc/###/fd entries
are for /var/log, but a couple are
for other files:


# ls -o /proc/15056/fd | sort -k8,8n
.
.
.
lr-x--  1 root 64 Jan  7 17:48 531 - /var/log
lr-x--  1 root 64 Jan  7 17:48 532 - /var/log
lr-x--  1 root 64 Jan  7 17:48 533 - /w
lr-x--  1 root 64 Jan  7 17:48 534 - /var/log
lr-x--  1 root 64 Jan  7 17:48 535 - /var/log
lr-x--  1 root 64 Jan  7 17:48 536 - /w/home
lr-x--  1 root 64 Jan  7 17:48 537 - /w/home/awle
lr-x--  1 root 64 Jan  7 17:48 538 - /w/home/awle
lr-x--  1 root 64 Jan  7 17:48 539 - /w/home/awle
lr-x--  1 root 64 Jan  7 17:48 540 - /var/log
lr-x--  1 root 64 Jan  7 17:48 541 - /var/log
lr-x--  1 root 64 Jan  7 17:48 542 - /var/log
.
.
.
lr-x--  1 root 64 Jan  7 17:48 572 - /var/log
lr-x--  1 root 64 Jan  7 17:48 573 - /var/log
lr-x--  1 root 64 Jan  7 17:48 574 - /var/log
lr-x--  1 root 64 Jan  7 17:49 575 - /var/log
l-wx--  1 root 64 Jan  7 17:49 576 - 
/usr/local/samba/var/clientlog/ciannait.log
lr-x--  1 root 64 Jan  7 17:49 577 - /var/log
lr-x--  1 root 64 Jan  7 17:49 578 - /var/log
lr-x--  1 root 64 Jan  7 17:49 579 - /var/log

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] 3.6.10 file handle leak under ancient 32-bit kernel

2013-01-07 Thread starlight . 2013q1
Looking at the good system:


open(log, O_RDONLY|O_DIRECTORY)   = 28
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(28, F_GETFL)  = 0x18000 (flags 
O_RDONLY|O_LARGEFILE|O_DIRECTORY)
fcntl(28, F_SETFD, FD_CLOEXEC)  = 0
getdents(28, /* 184 entries */, 32768)  = 5880
getdents(28, /* 0 entries */, 32768)= 0
close(28)   = 0

open(., O_RDONLY|O_DIRECTORY) = 28
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(28)   = 0

open(log, O_RDONLY|O_DIRECTORY)   = 28
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(28, F_GETFL)  = 0x18000 (flags 
O_RDONLY|O_LARGEFILE|O_DIRECTORY)
fcntl(28, F_SETFD, FD_CLOEXEC)  = 0
getdents(28, /* 184 entries */, 32768)  = 5880
getdents(28, /* 0 entries */, 32768)= 0
close(28)   = 0


Where on the bad system:

open(log, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 509
fstat64(509, {st_mode=S_IFDIR|0751, st_size=4096, ...}) = 0
fcntl64(509, F_SETFD, FD_CLOEXEC)   = 0
getdents64(509, /* 129 entries */, 4096) = 4072
getdents64(509, /* 46 entries */, 4096) = 1488
getdents64(509, /* 0 entries */, 4096)  = 0
close(509)  = 0

open(., O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 509
fstat64(509, {st_mode=S_IFDIR|0751, st_size=4096, ...}) = 0
close(509)  = 0

open(log, O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 509
fstat64(509, {st_mode=S_IFDIR|0751, st_size=4096, ...}) = 0

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba