Bug 2220 - Print queues not emptying
Print queues not emptying
Status: RESOLVED WORKSFORME
Product: Samba 3.0
Classification: Unclassified
Component: Printing
3.0.10
x86 Linux
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-06 14:41 UTC by Misty Stanley-Jones
Modified: 2005-02-07 07:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Misty Stanley-Jones 2005-01-06 14:41:43 UTC
I hate to say it, but I did not have this problem under 3.0.9.  I upgraded to 
3.0.11pre1 last night.  This afternoon each of our printers has every one of 
its print jobs in the Windows print queue.  The jobs show in Cups as completed 
and are not in the Samba print spool at all.  I heard everyone complaining 
about the bug before and just assumed it had passed me by.  Well, it seems that 
I caught it with 3.0.11pre1.  I built from source, my only non-standard config 
option was --prefix.  Using LDAP backend, CUPS for printing.  Let me know if 
you need some more info.
Comment 1 Gerald (Jerry) Carter 2005-01-06 14:59:33 UTC
Hmmm...I already have one confirmation that this particular bug 
is fixed in 3.0.11pre1.  please attach a level 10 debug log
of the failure.  Thanks.
Comment 2 Misty Stanley-Jones 2005-01-06 15:11:41 UTC
I don't understand what I'm looking for.  You mean when I view the queue in 
Windows?  I haven't tried deleting the jobs from Windows or anything like 
that.... 
Comment 3 Gerald (Jerry) Carter 2005-01-07 06:36:07 UTC
Misty, at least give me the output from smbd -b and your smb.conf
Comment 4 Michael Arlt 2005-01-07 06:49:19 UTC
(In reply to comment #1)
> Hmmm...I already have one confirmation that this particular bug 
> is fixed in 3.0.11pre1.  please attach a level 10 debug log
> of the failure.  Thanks.

We have the same problem with 3.07 - how can we cleanup these old entries?
We found one hint: rm -f /var/lock/samba/printing/?*.tdb
So should we remove all <printer>.tab + .bak and printers.tdb + .bak? Will they 
be generated during restart of samba?
Comment 5 Misty Stanley-Jones 2005-01-07 06:52:57 UTC
oink:~ # smbd -b |more 
Build environment: 
   Built by:    root@oink 
   Built on:    Wed Jan  5 17:07:49 EST 2005 
   Built using: gcc 
   Build host:  Linux oink 2.6.5-7.111-default #1 Wed Oct 13 15:45:13 UTC 2004 
i686 i68 
6 i386 GNU/Linux 
   SRCDIR:      /root/samba-3.0.11pre1/source 
   BUILDDIR:    /root/samba-3.0.11pre1/source 
 
Paths: 
   SBINDIR: /usr/local/samba/sbin 
   BINDIR: /usr/local/samba/bin 
   SWATDIR: /usr/local/samba/swat 
   CONFIGFILE: /usr/local/samba/lib/smb.conf 
   LOGFILEBASE: /usr/local/samba/var 
   LMHOSTSFILE: /usr/local/samba/lib/lmhosts 
   LIBDIR: /usr/local/samba/lib 
   SHLIBEXT: so 
   LOCKDIR: /usr/local/samba/var/locks 
   PIDDIR: /usr/local/samba/var/locks 
   SMB_PASSWD_FILE: /usr/local/samba/private/smbpasswd 
   PRIVATE_DIR: /usr/local/samba/private 
 
 System Headers: 
   HAVE_SYS_CAPABILITY_H 
   HAVE_SYS_CDEFS_H 
   HAVE_SYS_FCNTL_H 
   HAVE_SYS_IOCTL_H 
   HAVE_SYS_IPC_H 
   HAVE_SYS_MMAN_H 
   HAVE_SYS_MOUNT_H 
   HAVE_SYS_PARAM_H 
   HAVE_SYS_QUOTA_H 
   HAVE_SYS_RESOURCE_H 
   HAVE_SYS_SELECT_H 
   HAVE_SYS_SHM_H 
   HAVE_SYS_SOCKET_H 
   HAVE_SYS_STATFS_H 
   HAVE_SYS_STATVFS_H 
   HAVE_SYS_STAT_H 
   HAVE_SYS_SYSCALL_H 
   HAVE_SYS_SYSLOG_H 
   HAVE_SYS_SYSMACROS_H 
   HAVE_SYS_TIME_H 
   HAVE_SYS_TYPES_H 
   HAVE_SYS_UNISTD_H 
   HAVE_SYS_VFS_H 
   HAVE_SYS_WAIT_H 
   HAVE_SYS_XATTR_H 
 
 Headers: 
   HAVE_ARPA_INET_H 
   HAVE_ASM_TYPES_H 
   HAVE_CTYPE_H 
   HAVE_DIRENT_H 
   HAVE_DLFCN_H 
   HAVE_EXECINFO_H 
   HAVE_FCNTL_H 
   HAVE_GLOB_H 
   HAVE_GRP_H 
   HAVE_INTTYPES_H 
   HAVE_LANGINFO_H 
   HAVE_LASTLOG_H 
   HAVE_LBER_H 
   HAVE_LDAP_H 
   HAVE_LIMITS_H 
   HAVE_LOCALE_H 
   HAVE_MEMORY_H 
   HAVE_MNTENT_H 
   HAVE_NETINET_IN_SYSTM_H 
   HAVE_NETINET_IP_H 
   HAVE_NETINET_TCP_H 
   HAVE_NET_IF_H 
   HAVE_NSS_H 
   HAVE_POLL_H 
   HAVE_RPCSVC_NIS_H 
   HAVE_RPCSVC_YPCLNT_H 
   HAVE_RPCSVC_YP_PROT_H 
   HAVE_RPC_RPC_H 
   HAVE_SECURITY_PAM_APPL_H 
   HAVE_SECURITY_PAM_MODULES_H 
   HAVE_SECURITY__PAM_MACROS_H 
   HAVE_SHADOW_H 
   HAVE_STDARG_H 
   HAVE_STDINT_H 
   HAVE_STDLIB_H 
   HAVE_STRINGS_H 
   HAVE_STRING_H 
   HAVE_STROPTS_H 
   HAVE_SYSCALL_H 
   HAVE_SYSLOG_H 
   HAVE_TERMIOS_H 
   HAVE_TERMIO_H 
   HAVE_UNISTD_H 
   HAVE_UTIME_H 
 
 UTMP Options: 
   HAVE_GETUTMPX 
   HAVE_UTMPX_H 
   HAVE_UTMP_H 
   HAVE_UT_UT_ADDR 
   HAVE_UT_UT_EXIT 
   HAVE_UT_UT_HOST 
   HAVE_UT_UT_ID 
   HAVE_UT_UT_NAME 
   HAVE_UT_UT_PID 
   HAVE_UT_UT_TIME 
   HAVE_UT_UT_TV 
   HAVE_UT_UT_TYPE 
   HAVE_UT_UT_USER 
   PUTUTLINE_RETURNS_UTMP 
   WITH_UTMP 
 
 HAVE_* Defines: 
   HAVE_ASPRINTF 
   HAVE_ASPRINTF_DECL 
   HAVE_ATEXIT 
   HAVE_BACKTRACE_SYMBOLS 
   HAVE_BER_SCANF 
   HAVE_C99_VSNPRINTF 
   HAVE_CHMOD 
   HAVE_CHOWN 
   HAVE_CHROOT 
   HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS 
   HAVE_CONNECT 
   HAVE_CREAT64 
   HAVE_CRYPT 
   HAVE_CUPS 
   HAVE_DEVICE_MAJOR_FN 
   HAVE_DEVICE_MINOR_FN 
   HAVE_DIRENT_D_OFF 
   HAVE_DLCLOSE 
   HAVE_DLERROR 
   HAVE_DLOPEN 
   HAVE_DLSYM 
   HAVE_DUP2 
   HAVE_ENDMNTENT 
   HAVE_ENDNETGRENT 
   HAVE_ERRNO_DECL 
   HAVE_EXECL 
   HAVE_EXPLICIT_LARGEFILE_SUPPORT 
   HAVE_FCHMOD 
   HAVE_FCHOWN 
   HAVE_FCNTL_LOCK 
   HAVE_FCVT 
   HAVE_FGETXATTR 
   HAVE_FLISTXATTR 
   HAVE_FOPEN64 
   HAVE_FREMOVEXATTR 
   HAVE_FSEEKO64 
   HAVE_FSETXATTR 
   HAVE_FSTAT 
   HAVE_FSTAT64 
   HAVE_FSYNC 
   HAVE_FTELLO64 
   HAVE_FTRUNCATE 
   HAVE_FTRUNCATE64 
   HAVE_FTRUNCATE_EXTEND 
   HAVE_FUNCTION_MACRO 
   HAVE_GETCWD 
   HAVE_GETDIRENTRIES 
   HAVE_GETGRENT 
   HAVE_GETGRNAM 
   HAVE_GETMNTENT 
   HAVE_GETNETGRENT 
   HAVE_GETRLIMIT 
   HAVE_GETSPNAM 
   HAVE_GETTIMEOFDAY_TZ 
   HAVE_GETXATTR 
   HAVE_GLOB 
   HAVE_GRANTPT 
   HAVE_ICONV 
   HAVE_IFACE_IFCONF 
   HAVE_IMMEDIATE_STRUCTURES 
   HAVE_INITGROUPS 
   HAVE_INNETGR 
   HAVE_KERNEL_CHANGE_NOTIFY 
   HAVE_KERNEL_OPLOCKS_LINUX 
   HAVE_KERNEL_SHARE_MODES 
   HAVE_LDAP 
   HAVE_LDAP_DOMAIN2HOSTLIST 
   HAVE_LDAP_INIT 
   HAVE_LDAP_INITIALIZE 
   HAVE_LDAP_SET_REBIND_PROC 
   HAVE_LGETXATTR 
   HAVE_LIBLBER 
   HAVE_LIBLDAP 
   HAVE_LIBPAM 
   HAVE_LIBRESOLV 
   HAVE_LINK 
   HAVE_LISTXATTR 
   HAVE_LLISTXATTR 
   HAVE_LLSEEK 
   HAVE_LONGLONG 
   HAVE_LREMOVEXATTR 
   HAVE_LSEEK64 
   HAVE_LSETXATTR 
   HAVE_LSTAT64 
   HAVE_MAKEDEV 
   HAVE_MEMMOVE 
   HAVE_MEMSET 
   HAVE_MKNOD 
   HAVE_MKTIME 
   HAVE_MMAP 
   HAVE_NATIVE_ICONV 
   HAVE_NL_LANGINFO 
   HAVE_NO_ACLS 
   HAVE_OPEN64 
   HAVE_PATHCONF 
   HAVE_PIPE 
   HAVE_POLL 
   HAVE_PREAD 
   HAVE_PREAD64 
   HAVE_PUTUTLINE 
   HAVE_PUTUTXLINE 
   HAVE_PWRITE 
   HAVE_PWRITE64 
   HAVE_RAND 
   HAVE_RANDOM 
   HAVE_READDIR64 
   HAVE_READLINK 
   HAVE_REALPATH 
   HAVE_REMOVEXATTR 
   HAVE_RENAME 
   HAVE_ROOT 
   HAVE_SECURE_MKSTEMP 
   HAVE_SELECT 
   HAVE_SENDFILE64 
   HAVE_SETBUFFER 
   HAVE_SETENV 
   HAVE_SETGROUPS 
   HAVE_SETLINEBUF 
   HAVE_SETLOCALE 
   HAVE_SETMNTENT 
   HAVE_SETNETGRENT 
   HAVE_SETPGID 
   HAVE_SETRESGID 
   HAVE_SETRESGID_DECL 
   HAVE_SETRESUID 
   HAVE_SETRESUID_DECL 
   HAVE_SETSID 
   HAVE_SETXATTR 
   HAVE_SHMGET 
   HAVE_SIGACTION 
   HAVE_SIGBLOCK 
   HAVE_SIGPROCMASK 
   HAVE_SIGSET 
   HAVE_SIG_ATOMIC_T_TYPE 
   HAVE_SNPRINTF 
   HAVE_SNPRINTF_DECL 
   HAVE_SOCKLEN_T_TYPE 
   HAVE_SRAND 
   HAVE_SRANDOM 
   HAVE_STAT64 
   HAVE_STAT_ST_BLKSIZE 
   HAVE_STAT_ST_BLOCKS 
   HAVE_STRCASECMP 
   HAVE_STRCHR 
   HAVE_STRDUP 
   HAVE_STRERROR 
   HAVE_STRFTIME 
   HAVE_STRNDUP 
   HAVE_STRNLEN 
   HAVE_STRPBRK 
   HAVE_STRTOUL 
   HAVE_STRUCT_DIRENT64 
   HAVE_STRUCT_FLOCK64 
   HAVE_STRUCT_STAT_ST_RDEV 
   HAVE_ST_RDEV 
   HAVE_SYMLINK 
   HAVE_SYSCALL 
   HAVE_SYSCONF 
   HAVE_SYSLOG 
   HAVE_TIMEGM 
   HAVE_UNIXSOCKET 
   HAVE_UPDWTMP 
   HAVE_UPDWTMPX 
   HAVE_USLEEP 
   HAVE_UTIMBUF 
   HAVE_UTIME 
   HAVE_UTIMES 
   HAVE_VASPRINTF 
   HAVE_VASPRINTF_DECL 
   HAVE_VA_COPY 
   HAVE_VOLATILE 
   HAVE_VSNPRINTF 
   HAVE_VSNPRINTF_DECL 
   HAVE_VSYSLOG 
   HAVE_WAITPID 
   HAVE_YP_GET_DEFAULT_DOMAIN 
   HAVE___CLOSE 
   HAVE___DUP2 
   HAVE___FCNTL 
   HAVE___FORK 
   HAVE___FSTAT 
   HAVE___FXSTAT 
   HAVE___LSEEK 
   HAVE___LSTAT 
   HAVE___LXSTAT 
   HAVE___OPEN 
   HAVE___OPEN64 
   HAVE___PREAD64 
   HAVE___PWRITE64 
   HAVE___READ 
   HAVE___STAT 
   HAVE___WRITE 
   HAVE___XSTAT 
 
 --with Options: 
   WITH_SENDFILE 
   WITH_UTMP 
   WITH_WINBIND 
 
 Build Options: 
   BROKEN_NISPLUS_INCLUDE_FILES 
   COMPILER_SUPPORTS_LL 
   DEFAULT_DISPLAY_CHARSET 
   DEFAULT_DOS_CHARSET 
   DEFAULT_UNIX_CHARSET 
   LDAP_SET_REBIND_PROC_ARGS 
   LINUX 
   LINUX_SENDFILE_API 
   PACKAGE_BUGREPORT 
   PACKAGE_NAME 
   PACKAGE_STRING 
   PACKAGE_TARNAME 
   PACKAGE_VERSION 
   REALPATH_TAKES_NULL 
   REPLACE_GETPASS 
   RETSIGTYPE 
   SEEKDIR_RETURNS_VOID 
   SIZEOF_INO_T 
   SIZEOF_INT 
   SIZEOF_LONG 
   SIZEOF_OFF_T 
   SIZEOF_SHORT 
   STAT_STATVFS64 
   STAT_ST_BLOCKSIZE 
   STDC_HEADERS 
   STRING_STATIC_MODULES 
   SYSCONF_SC_NGROUPS_MAX 
   TIME_WITH_SYS_TIME 
   USE_SETRESUID 
   WITH_SENDFILE 
   WITH_WINBIND 
   _FILE_OFFSET_BITS 
   _GNU_SOURCE 
   _LARGEFILE64_SOURCE 
   _POSIX_C_SOURCE 
   _POSIX_SOURCE 
   charset_CP437_init 
   charset_CP850_init 
   inline 
   offset_t 
   static_init_auth 
   static_init_charset 
   static_init_idmap 
   static_init_pdb 
   static_init_rpc 
   static_init_vfs 
   vfs_audit_init 
   vfs_cap_init 
   vfs_default_quota_init 
   vfs_expand_msdfs_init 
   vfs_extd_audit_init 
   vfs_fake_perms_init 
   vfs_full_audit_init 
   vfs_netatalk_init 
   vfs_readonly_init 
   vfs_recycle_init 
   vfs_shadow_copy_init 
 
Type sizes: 
   sizeof(char):    1 
   sizeof(int):     4 
   sizeof(long):    4 
   sizeof(uint8):   1 
   sizeof(uint16):  2 
   sizeof(uint32):  4 
   sizeof(short):   2 
   sizeof(void*):   4 
 
Builtin modules: 
    pdb_ldap pdb_smbpasswd pdb_tdbsam pdb_guest rpc_lsa rpc_reg rpc_lsa_ds 
rpc_wks rpc_ 
net rpc_dfs rpc_srv rpc_spoolss rpc_samr idmap_ldap idmap_tdb auth_rhosts 
auth_sam auth 
_unix auth_winbind auth_server auth_domain auth_builtin 
 
Comment 6 Misty Stanley-Jones 2005-01-07 06:56:33 UTC
[global] 
preexec = /bin/echo %u at %m connected to //%L/%S on %T >>/tmp/smblog 
workgroup = CORP 
netbios name = CORPSRV 
server string = Corp File Server 
security = user 
domain logons = yes 
username map = /usr/local/samba/lib/smbusers 
log file = /data/samba/log/%m.log 
log level =  5 
#max log size = 50 
debug timestamp = yes 
logon script = logon.bat 
logon path = \\%L\profiles\%U\%a 
logon drive = H: 
logon home = \\%L\%U 
time server = yes 
printing = cups 
printcap = cups 
printcap cache time = 60 
load printers = yes 
show add printer wizard = no 
force printername = yes 
wins support = yes 
os level = 100 
preferred master = yes 
domain master = yes 
remote announce = 192.168.2.255/CORP 
remote browse sync = 192.168.2.255 
name resolve order = bcast wins lmhosts host 
allow trusted domains = yes 
passdb backend = ldapsam:ldap://localhost 
ldap suffix = ou=CORP,dc=borkholder,dc=com 
ldap admin dn = cn=Manager,dc=borkholder,dc=com 
ldap group suffix = ou=Groups 
ldap user suffix = ou=People 
ldap machine suffix = ou=Computers 
ldap idmap suffix = ou=People 
ldap ssl = no 
ldap passwd sync = yes 
pam password change = yes 
add user script = /usr/local/sbin/smbldap-useradd -m "%u" 
ldap delete dn = No 
add machine script = /usr/local/sbin/smbldap-useradd -w "%m" 
add group script = /usr/local/sbin/smbldap-groupadd -p "%g" 
add user to group script = /usr/local/sbin/smbldap-groupmod -m "%u" "%g" 
delete user from group script = /usr/local/sbin/smbldap-groupmod -x "%u" "%g" 
set primary group script = /usr/local/sbin/smbldap-usermod -g "%g" "%u" 
admin users = root @"Domain Admins" 
printer admin = @"Domain Admins" 
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 
deadtime = 60 
 
include = /usr/local/samba/lib/printers.smb 
 
(and the printers.smb) 
[print$] 
comment = Printer Drivers Share 
path = /data/samba/drivers 
write list = root 
browseable = no 
 
[printers] 
comment = All Printers 
path = /data/samba/spool 
public = no 
guest ok = no 
writeable = no 
printable = yes 
browseable = yes 
create mode = 644 
 
## Specific printers that need extra permissions 
[acct_hp8500] 
copy = printers 
comment = "Accounting Color Laser Printer" 
path = /data/samba/spool/private 
public = no 
valid users = <list of some users and groups> 
browseable = yes 
create mode = 644 
 
[plotter] 
copy = printers 
comment = Engineering Plotter 
use client driver = yes 
browseable = yes 
public = no 
create mode = 644 
 
Comment 7 Misty Stanley-Jones 2005-01-07 08:27:37 UTC
I am able to "cancel" the jobs from within Windows.  However, the Printers 
folder on the server still shows the # of jobs being non-zero, even afterward.  
If I open the printer's individual queue it shows as empty.  I will need to 
delete the jobs periodically to ensure users' privacy. 
Comment 8 Misty Stanley-Jones 2005-01-10 08:38:34 UTC
More notes: 
 
1.  The number of jobs in the print summary (Start Menu / Settings / Printers) 
is different (older) than the number of jobs shown in the individual printer 
queue. 
 
2.  Some jobs lack the # of pages and date submitted in the individual print 
queues.  All of them show the date submitted and some show the # of pages when 
you right-click the print job and click Properties.  Others show the # of pages 
as 0. 
 
I have applied the patch submitted to the mailing list this morning to no 
avail: 
[Samba] [PATCH] printing patch update 
 
From:  
"Jerome Borsboom" <j.borsboom@erasmusmc.nl> 
 
 
To:  
samba@lists.samba.org 
 
 
Date:  
Today 09:15:56 
 
In reviewing the recent printing-3-0-10_v2 patch, I think I have  
found an omitted 'release_print_db'. The following patch  
corrects this. 
 
Regards, 
 
Jerome Borsboom 
 
--- samba-3.0.10/source/printing/printing.c     2005-01-10 15:07:27.060999122 
+0100 
+++ samba-3.0.10.new/source/printing/printing.c 2005-01-10 15:07:36.784464292 
+0100 
@@ -1077,6 +1077,7 @@ 
  
        if ( !print_cache_expired(sharename, False) ) { 
                DEBUG(5,("print_queue_update_internal: print cache for %s is 
still ok\n", sharename)); 
+               release_print_db( pdb ); 
                return; 
        } 
  
 
I also had failed to say my version of CUPS.  It is cups-1.1.20-108.13 from 
SuSE. 
Comment 9 Misty Stanley-Jones 2005-01-12 07:21:59 UTC
Tentatively I would say this is now fixed. 
 
I had applied the patch above and got no relief.  Yesterday I realized I did 
not remember restarting Samba after recompiling.  I did this, after deleting 
all the printing/*.tdb files by hand (even the one simply called .tdb that I 
did not know why it was there).  It seems to have fixed the problem.  Whether 
bouncing smbd or deleting the tdb files did the trick, I am not sure. 
Comment 10 Gerald (Jerry) Carter 2005-02-07 07:34:58 UTC
originally reported against 3.0.11pre1.  Moving back to version to 3.0.10 
to remove preX and rcX versions.