[Samba] Samba 3.2.6 upgrade -> smbd panic in printing.

Jeremy Allison jra at samba.org
Tue Dec 30 23:05:30 GMT 2008


On Thu, Dec 18, 2008 at 09:45:13PM +0000, Jon Wilson wrote:
> Hi,
> 
> 
> (root at centos-vms04:~)# uname -a
> Linux centos-vms04 2.6.18-92.1.22.el5xen #1 SMP Tue Dec 16 13:08:49 EST 2008
> i686 i686 i386 GNU/Linux
> (root at centos-vms04:~)# rpm -qva | grep glibc
> glibc-common-2.5-24.el5_2.2
> glibc-2.5-24.el5_2.2
> (root at centos-vms04:~)# rpm -qva | grep cups
> gimp-print-cups-4.2.7-22
> cups-libs-1.2.4-11.18.el5_2.3
> gutenprint-cups-5.0.1-2.fc6
> cups-1.2.4-11.18.el5_2.3
> 
> 
> Openldap backend for full samba 3.2.6 domain. All clients are XP.
> 
> 
> Until a few hours ago I had done a yum upgrade but not rebooted, I have now
> rebooted and will monitor the system tomorrow and provide any info I can
> 
> I'm not sure what caused it - so I dont know if I can reproduce to be
> honest,
> 
> 
> Getting a lot of
> 
> ============
> 
> [2008/12/18 16:02:42,  2]
> rpc_server/srv_spoolss_nt.c:find_printer_index_by_hnd(273)
>   find_printer_index_by_hnd: Printer handle not found:
> find_printer_index_by_hnd: Printer handle not found: close_printer_handle:
> Invalid handle (OTHER:24426:29645)
> [2008/12/18 16:04:35,  2] smbd/sesssetup.c:setup_new_vc_session(1363)
>   setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all
> old resources.
> [2008/12/18 16:04:35,  2] smbd/sesssetup.c:setup_new_vc_session(1363)
>   setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all
> old resources.
> [2008/12/18 16:04:35,  2] lib/smbldap.c:smbldap_open_connection(796)
>   smbldap_open_connection: connection opened
> [2008/12/18 16:04:50,  0] lib/util_tdb.c:tdb_log(682)
>   tdb(/var/lib/samba/printing/IT2_HPCLJ4700N.tdb): tdb_reopen: open failed
> (No such file or directory)
> [2008/12/18 16:04:50,  0] lib/util.c:reinit_after_fork(1050)
>   tdb_reopen_all failed.
> [2008/12/18 16:04:50,  0] printing/print_cups.c:cups_pcap_load_async(392)
>   cups_pcap_load_async: reinit_after_fork() failed
> [2008/12/18 16:04:50,  0] lib/util.c:smb_panic(1663)
>   PANIC (pid 30719): cups_pcap_load_async: reinit_after_fork() failed
> [2008/12/18 16:04:50,  0] lib/util.c:log_stack_trace(1767)
>   BACKTRACE: 11 stack frames:
>    #0 smbd(log_stack_trace+0x2d) [0xcf0c2f]
>    #1 smbd(smb_panic+0x84) [0xcf0d71]
>    #2 smbd(cups_cache_reload+0x299) [0xcb7d2c]
>    #3 smbd(pcap_cache_reload+0x107) [0xcb4189]
>    #4 smbd(reload_printers+0x31) [0xf3b77a]
>    #5 smbd(check_reload+0x130) [0xb3d510]
>    #6 smbd [0xb3d55f]
>    #7 smbd(smbd_process+0xc92) [0xb3fa76]
>    #8 smbd(main+0x212c) [0xf3e0ec]
>    #9 /lib/i686/nosegneg/libc.so.6(__libc_start_main+0xdc) [0x4b5dec]
>    #10 smbd [0xac3061]
> [2008/12/18 16:04:50,  0] lib/fault.c:dump_core(201)
>   dumping core in /var/log/samba/cores/smbd
> [2008/12/18 16:04:50,  2] printing/print_cups.c:cups_async_callback(504)
>   cups_async_callback: failed to read a new printer list
> [2008/12/18 16:05:11,  0] lib/util_tdb.c:tdb_log(682)
>   tdb(/var/lib/samba/printing/Lib_HPLJ2300.tdb): tdb_reopen: file dev/inode
> has changed!
> [2008/12/18 16:05:11,  0] lib/util.c:reinit_after_fork(1050)
>   tdb_reopen_all failed.
> [2008/12/18 16:05:11,  0] printing/print_cups.c:cups_pcap_load_async(392)
>   cups_pcap_load_async: reinit_after_fork() failed
> [2008/12/18 16:05:11,  0] lib/util.c:smb_panic(1663)
>   PANIC (pid 30720): cups_pcap_load_async: reinit_after_fork() failed
> [2008/12/18 16:05:11,  0] lib/util.c:log_stack_trace(1767)
>   BACKTRACE: 11 stack frames:
>    #0 smbd(log_stack_trace+0x2d) [0xcf0c2f]
>    #1 smbd(smb_panic+0x84) [0xcf0d71]
>    #2 smbd(cups_cache_reload+0x299) [0xcb7d2c]
>    #3 smbd(pcap_cache_reload+0x107) [0xcb4189]
>    #4 smbd(reload_printers+0x31) [0xf3b77a]
>    #5 smbd(check_reload+0x130) [0xb3d510]
>    #6 smbd [0xb3d55f]
>    #7 smbd(smbd_process+0xc92) [0xb3fa76]
>    #8 smbd(main+0x212c) [0xf3e0ec]
>    #9 /lib/i686/nosegneg/libc.so.6(__libc_start_main+0xdc) [0x4b5dec]
>    #10 smbd [0xac3061]
> [2008/12/18 16:05:11,  0] lib/fault.c:dump_core(201)
>   dumping core in /var/log/samba/cores/smbd
> ============

Can you try the following patch please ?

I still can't see why a specific printing
tdb is not being found whilst still being flagged
as open, but none of the printing tdb's are used
at all in the asynchronous cups pcap handler
function so this should solve the problem.

Let me know asap and it'll make the next
release.

Thanks,

	Jeremy
-------------- next part --------------
diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c
index 1bb149c..f3eb73c 100644
--- a/source/printing/print_cups.c
+++ b/source/printing/print_cups.c
@@ -388,6 +388,8 @@ static bool cups_pcap_load_async(int *pfd)
 	}
 
 	/* Child. */
+	close_all_print_db();
+
 	if (!reinit_after_fork(smbd_messaging_context(), true)) {
 		DEBUG(0,("cups_pcap_load_async: reinit_after_fork() failed\n"));
 		smb_panic("cups_pcap_load_async: reinit_after_fork() failed");


More information about the samba mailing list