Bug 8763 - Crash when accessing printers
Crash when accessing printers
Status: NEW
Product: Samba 3.6
Classification: Unclassified
Component: Printing
3.6.3
All Linux
: P5 major
: ---
Assigned To: printing-maintainers
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-16 21:13 UTC by Johan Ymerson
Modified: 2013-01-18 15:57 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 Johan Ymerson 2012-02-16 21:13:37 UTC
I just upgraded to Samba 3.6.3 from 3.5.11, and started getting crashes when clients access the printers shared by this server.
Clients run both Windows XP and Windows 7.
SMB2 is not enabled.
There are Windows printer drivers (PPD only) installed on this server.

Here is the backtrace from the smb log:

[2012/02/16 21:35:53.862277,  0] lib/fault.c:51(fault_report)
  ===============================================================
[2012/02/16 21:35:53.862292,  0] lib/util.c:1117(smb_panic)
  PANIC (pid 11007): internal error
[2012/02/16 21:35:53.876694,  0] lib/util.c:1221(log_stack_trace)
  BACKTRACE: 27 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x1a) [0x7f893e7a18ba]
   #1 /usr/sbin/smbd(smb_panic+0x2d) [0x7f893e7a198d]
   #2 /usr/sbin/smbd(+0x418744) [0x7f893e792744]
   #3 /lib64/libc.so.6(+0x358d0) [0x7f893b37b8d0]
   #4 /usr/sbin/smbd(+0x2e080d) [0x7f893e65a80d]
   #5 /usr/sbin/smbd(+0x2e0b0a) [0x7f893e65ab0a]
   #6 /usr/sbin/smbd(_spoolss_GetPrinter+0x32f) [0x7f893e65b24f]
   #7 /usr/sbin/smbd(+0x2f7474) [0x7f893e671474]
   #8 /usr/sbin/smbd(+0x322bfe) [0x7f893e69cbfe]
   #9 /usr/sbin/smbd(process_complete_pdu+0xe6f) [0x7f893e69debf]
   #10 /usr/sbin/smbd(process_incoming_data+0x128) [0x7f893e69f5b8]
   #11 /usr/sbin/smbd(np_write_send+0x151) [0x7f893e69fa51]
   #12 /usr/sbin/smbd(+0x1173e9) [0x7f893e4913e9]
   #13 /usr/sbin/smbd(+0x1178db) [0x7f893e4918db]
   #14 /usr/sbin/smbd(reply_trans+0x5ea) [0x7f893e49272a]
   #15 /usr/sbin/smbd(+0x17fcc6) [0x7f893e4f9cc6]
   #16 /usr/sbin/smbd(+0x1800db) [0x7f893e4fa0db]
   #17 /usr/sbin/smbd(+0x1804f5) [0x7f893e4fa4f5]
   #18 /usr/sbin/smbd(run_events_poll+0x379) [0x7f893e7b03b9]
   #19 /usr/sbin/smbd(smbd_process+0x87d) [0x7f893e4f821d]
   #20 /usr/sbin/smbd(+0x69970f) [0x7f893ea1370f]
   #21 /usr/sbin/smbd(run_events_poll+0x379) [0x7f893e7b03b9]
   #22 /usr/sbin/smbd(+0x43685f) [0x7f893e7b085f]
   #23 /usr/sbin/smbd(_tevent_loop_once+0x90) [0x7f893e7b0be0]
   #24 /usr/sbin/smbd(main+0xf9b) [0x7f893ea14b7b]
   #25 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f893b3680ed]
   #26 /usr/sbin/smbd(+0xfdec9) [0x7f893e477ec9]
[2012/02/16 21:35:53.876918,  0] lib/fault.c:372(dump_core)
  dumping core in /var/log/samba/cores/smbd

Additionally, I get a lot of these messages in the log:
[2012/02/16 21:35:56.430970,  0] rpc_server/spoolss/srv_spoolss_nt.c:1748(_spoolss_OpenPrinterEx)
  _spoolss_OpenPrinterEx: Cannot open a printer handle for printer \\printers
[2012/02/16 21:35:57.431934,  0] rpc_server/spoolss/srv_spoolss_nt.c:1748(_spoolss_OpenPrinterEx)
  _spoolss_OpenPrinterEx: Cannot open a printer handle for printer \\printers
[2012/02/16 21:35:58.431006,  0] rpc_server/spoolss/srv_spoolss_nt.c:1748(_spoolss_OpenPrinterEx)
  _spoolss_OpenPrinterEx: Cannot open a printer handle for printer \\printers

"printers" is a netbios and dns alias for this server.

After downgrading to 3.5.11 again, everything works.
Comment 1 Andreas Schneider 2012-02-17 09:05:06 UTC
Hello Johan,

thanks for your report, could you please install debug packages and send the backtrace again. The following howto should help you to provide the required information we need to identify the problem you discovered:



Providing Samba log files
==========================

Provide all log files from '/var/log/samba/' directory and the tdb files from
'/var/lib/samba' and the configuration file '/etc/samba/smb.conf'. Post the
output of 'rpm -qi samba' or 'rpm -qi samba-<subpackage>' too. We need that
information to reconstruct what happened.

If winbind for logging in is part of the problem please provide
'/etc/security/pam_winbind.conf' and if you have enabled debug in
'pam_winbind.conf' Ä/var/log/messages' is requried too.

More detailed description about different Samba components can be found blow
this section.

Testing daemons (winbind, smb, nmb)
====================================

1. Stop all running Samba processes (winbind, smb, nmb)

2. Remove all log files from /var/log/samba/

    With this approach we ensure to have the start date of the testing in the
    log files.

3. Edit /etc/samba/smb.conf and set the following variables in the in the
   [general] section of the config:

     debug level = 10
     debug pid = Yes
     max log size = 0

    Instead of setting a global debug level in smb.conf it's also visible to
    use

     smbcontrol <damon_name> debug 10

    to increase the debug level of the Samba daemon in question to 10 at run
    time.

    If winbind is part of the scenario please set

     debug = yes

    in /etc/security/pam_winbind.conf

4. Start the processes again (winbind, smb, nmb)

5. Reproduce the error and note the time when you start any test. If a problem
   occurs while testing note the time (use date on the system you perform the
   tests on to get a time fitting to the log files).

Attach the log files from '/var/log/samba/' and the tdb files from
'/var/lib/samba/' to the bug. If possible, remove the tdb files and provide clean
files. Therefore it's best to bond them to one compressed tar archive. The
relevant parts of '/var/log/messages' could be interesting too.
Comment 2 Björn Jacke 2012-08-17 08:07:24 UTC
Johan, what's the status here, can you give some of the requested information on this?
Comment 3 Andreas Schneider 2012-10-11 13:09:28 UTC
Ping!
Comment 4 Johan Ymerson 2012-10-11 18:31:00 UTC
Sorry for the long delay, I have been on paternity leave for the past 8 months :-)

I just upgraded to 3.6.8 and verified that the problem is still there, and it is. I will try to get the debug info tomorrow.
Comment 5 Paweł Wnuk 2012-11-05 22:04:05 UTC
I had same problem. The bug is not in samba - the real reason is that some times a Windows Client has a "ghost port" configured, that's been lost or misconfigured. The clear evidence is that the Windows system is asking the server for a printer without the printer name. 

The sollution is simple: go to the Printers and Faxes control panel, remove the offending printer and add it again.
Comment 6 Andreas Schneider 2013-01-18 15:57:16 UTC
Ping!