Bug 4703 - PANIC: internal error when attempting to print from Win XP or 2K client
PANIC: internal error when attempting to print from Win XP or 2K client
Status: RESOLVED LATER
Product: Samba 3.0
Classification: Unclassified
Component: Printing
3.0.25a
x86 Linux
: P4 major
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-17 01:49 UTC by Geoff L. Kennedy
Modified: 2007-06-27 21:12 UTC (History)
1 user (show)

See Also:


Attachments
Patch (474 bytes, patch)
2007-06-18 02:38 UTC, Volker Lendecke
no flags Details
Raw packet dump (133.44 KB, application/octet-stream)
2007-06-27 09:16 UTC, Geoff L. Kennedy
no flags Details
Formatted (from raw data file using -vv option) packet dump (32.03 KB, text/plain)
2007-06-27 09:18 UTC, Geoff L. Kennedy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff L. Kennedy 2007-06-17 01:49:13 UTC
I have a printer share "lp" on my Samba server "mentalis".  The security level
is set to "share".

From the Windows system, mounting the shared directory works fine.  However, if
I try to print to \\mentalis\lp I get the following in the log file:

[2007/06/16 22:42:51, 0] smbd/negprot.c:reply_nt1(317)
  reply_nt1: smb signing is incompatible with share level security !
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   (Note: I *always* get the above message, even for file sharing, and
    regardless of what settings I use in the Windows security setup.)

[2007/06/16 22:42:51, 1] smbd/service.c:make_connection_snum(1033)
  192.168.160.198 (192.168.160.198) connect to service lp initially as user nobody (uid=99, gid=99) (pid 29245)
[2007/06/16 22:42:51, 0] lib/fault.c:fault_report(41)
  ===============================================================
[2007/06/16 22:42:51, 0] lib/fault.c:fault_report(42)
  INTERNAL ERROR: Signal 11 in pid 29245 (3.0.25a-3.fc7)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2007/06/16 22:42:51, 0] lib/fault.c:fault_report(44)
  
  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2007/06/16 22:42:51, 0] lib/fault.c:fault_report(45)
  ===============================================================
[2007/06/16 22:42:51, 0] lib/util.c:smb_panic(1654)
  PANIC (pid 29245): internal error
[2007/06/16 22:42:51, 0] lib/util.c:log_stack_trace(1758)
  BACKTRACE: 10 stack frames:
   #0 smbd(log_stack_trace+0x2d) [0x80242c3d]
   #1 smbd(smb_panic+0x5d) [0x80242d6d]
   #2 smbd [0x8022d75a]
   #3 [0xc3f420]
   #4 smbd(reply_printopen+0xc9) [0x800847e9]
   #5 smbd [0x800c4f10]
   #6 smbd(smbd_process+0x836) [0x800c5fa6]
   #7 smbd(main+0xbdd) [0x8031f28d]
   #8 /lib/libc.so.6(__libc_start_main+0xe0) [0x95af70]
   #9 smbd [0x8004a021]
[2007/06/16 22:42:51, 0] lib/fault.c:dump_core(181)
  dumping core in /var/log/samba/cores/smbd

   !!! There is no core dump produced for some reason.

   My smb.conf file looks like this (some values changed for privacy reasons):

# Global parameters
[global]
	workgroup = XXXXXXX
	server string = %h file server (Samba %v)
	netbios name = MENTALIS
	hosts allow = 192.168.xxx.
	security = share
	update encrypted = Yes
	log file = /var/log/samba/%m.log
	max log size = 50
	server signing = auto
	socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
	preferred master = No
	domain master = No
	dns proxy = No
	ldap ssl = no
	load printers = Yes
	printing = cups
	cups options = raw

[homes]
	comment = Home Directories
	read only = No
	browseable = No

[printers]
	comment = All Printers
	path = /var/spool/samba
	printable = Yes
	public = Yes
	guest ok = Yes
	writeable = No
	browseable = No

[lp]
	comment = Created by redhat-config-printer 0.6.x
	path = /var/spool/samba
	read only = No
	public = Yes
	guest ok = Yes
	printable = Yes
	printer name = lp
	share modes = No

[SharedArea]
	path = /home/private/Shared
	username = someuser
	read only = No
	guest ok = Yes

   Testparm does not give me any errors.

   The version I am running is the 3.0.25a which is included in Fedora 7.
Comment 1 Geoff L. Kennedy 2007-06-17 15:29:23 UTC

P.S.: I also get this message in smbd.log:

   [2007/06/16 22:42:31, 0] lib/util_tdb.c:tdb_log(662)
     tdb(/var/lib/samba/printing/lp.tdb): tdb_rec_read bad magic 0xd9fee666 at offset=35812
Comment 2 Volker Lendecke 2007-06-18 02:38:56 UTC
Created attachment 2767 [details]
Patch

Can you try the attached patch? The signing message you get has to do with your "server signing = auto", you should leave that at default.

Volker
Comment 3 Geoff L. Kennedy 2007-06-26 16:22:07 UTC
Sorry, Volker, I can't at this time.  I am using only the Samba binaries from the
Fedora 7 distribution.

I'm not that concerned about the signing issue too much, as I am able to access
the Linux shares from the Windoze machines.  It's the panic I get while trying
to print to my printer (lp) on my Linux server (mentalis).  I used to be able to do that in FC6, until I performed a couple of updates (FC6 update, then upgrade to F7, also updates on the Win machines).  I can't backtrack to say exactly at which point in the upgrade process that printing stopped working, unfortunately.

To me, this is a real show-stopper !

Thanks for the idea anyways, maybe someone else can try it and let us all know ?
Comment 4 Gerald (Jerry) Carter 2007-06-26 16:25:01 UTC
set 'disable spoolss = yes'  MS-RPC printing is not really 
supported when with share mode security although we should be crashing.
Comment 5 Volker Lendecke 2007-06-26 16:37:35 UTC
What do you want us to do here now? If you can't test a patch, you need to get someone from Fedora to get you updated RPMs.

Volker
Comment 6 Geoff L. Kennedy 2007-06-26 18:01:48 UTC
(In reply to comment #5)
> What do you want us to do here now? If you can't test a patch, you need to get
> someone from Fedora to get you updated RPMs.
> 
> Volker
> 

Sigh......it IS the latest.....

Name        : samba                        Relocations: (not relocatable)
Version     : 3.0.25a                           Vendor: Fedora Project
Release     : 3.fc7                         Build Date: Tue Jun  5 17:51:55 2007
Install Date: Tue Jun 26 14:45:24 2007      Build Host: xenbuilder1.fedora.redhat.com
Group       : System Environment/Daemons    Source RPM: samba-3.0.25a-3.fc7.src.rpm
Size        : 8100795                          License: GPL
Signature   : DSA/SHA1, Sat Jun  9 05:51:38 2007, Key ID b44269d04f2a6fd2
Packager    : Fedora Project
URL         : http://www.samba.org/
Summary     : The Samba Suite of programs

Is Fedora aware of your patch ?  Are Andrew Tridgeall et al aware of it ?
That is not MY responsibility.....

Since the version of Samba I am running is up to date, should/will there be a
3.0.25b release in the near future ?

Just for the "fun of it", I downgraded to whatever version the original FC6 used (3.0.23c I think) - same problem.

It looks more and more like M$ did something to SMB which broke "something".....I'll poke around a bit and see what I can find.
Comment 7 Geoff L. Kennedy 2007-06-26 18:05:32 UTC
(In reply to comment #4)
> set 'disable spoolss = yes'  MS-RPC printing is not really 
> supported when with share mode security although we should be crashing.
> 

Hi Jerry.....OK, then, what is the "preferred" security setting ?  I'm using
share since it seemed to be the only way I could print, etc., without having to log onto the server every time.  I'm the only user (this is a home setup) so I'm not too concerned with others accessing things on my systems.

Comment 8 Gerald (Jerry) Carter 2007-06-26 18:43:12 UTC
(In reply to comment #6)

> Sigh......it IS the latest.....
> 
...
> Is Fedora aware of your patch ?  Are Andrew Tridgeall et al 
> aware of it ? That is not MY responsibility.....

This may seem a bit blunt but....

Volker has been a part of the core team since about the time 
Tridge started hacking on Samba in the first place.  So whether 
Tridge knows about this patch or not is irrelevant.
Your comments could be considered extremely rude but I'll give 
you the benefit of the doubt.

Secondly, neither Volker nor I will check in untested patches like 
this.  So testing is YOUR responsibility unless you are like one
of many who expect much without giving anything back in return.

> Since the version of Samba I am running is up to date, should/will 
> there be a 3.0.25b release in the near future ?

We released 3.0.25b a few hours ago.  If you had tested this patch 
for us it might have made it in.  But as it stands, someone must 
verify the fix and since you have a reproducible test case, You 
are the most likely candidate.

You other option is to talk to Simo Sorce who maintains the 
RedHat/Fedora packages and is another Samba developer.  But he will 
also ask for assistance in verifying the patch.

PS: All the packaging files are in samba-3.0.X/packaging/RHEL so you 
can simply patch the source and rebuild the RPMS yourself.

Comment 9 Gerald (Jerry) Carter 2007-06-26 18:45:26 UTC
(In reply to comment #7)

> Hi Jerry.....OK, then, what is the "preferred" security setting 
> I'm using share since it seemed to be the only way I could 
> print, etc., without having to log onto the server every 
> time.  I'm the only user (this is a home setup) so
> I'm not too concerned with others accessing things on my systems.

Check the documentation on "map to guest" and "security = user".
The "disable spoolss" option will disable the async printer 
notification code path and may avoid the segv you are seeing
until we can find someone with a repro test case willing to test 
patches.

cheers, jerry

> 

Comment 10 Geoff L. Kennedy 2007-06-26 18:48:34 UTC
(In reply to comment #6)

> It looks more and more like M$ did something to SMB which broke
> "something".....I'll poke around a bit and see what I can find.

   Now I remember, the problem started when I did a Windows Update.....

   HOWEVER.....after re-installing Samba with the Fedora 7 version, printing
now works !!!!!!!  YAY !!!!

   I wish I knew what went wrong.....but methinks that this "bug" is no
longer an issue.  I'll exercise my setup for a few days before declaring it so.

   I am still getting the signing error message, but as I said earlier, it does not appear to be a problem for me.

   Thanks, Volker and Jerry, for your suggestions.  Discussion is always welcome.  :-)


Comment 11 Geoff L. Kennedy 2007-06-27 00:14:05 UTC
(In reply to comment #2)
> Can you try the attached patch? The signing message you get has to do with your
> "server signing = auto", you should leave that at default.

   OK....I managed to figure out how to apply the patch and rebuild from Fedora's source files (I've never done that before, so this is "new" to me).

   Unfortunately, it didn't seem to solve the problem, I'm still getting the message.

   Hope that helps......
Comment 12 Volker Lendecke 2007-06-27 03:54:32 UTC
Can you please upload a tcpdump of a client that triggers this patch? You can find some hints how to do sniffs under http://wiki.samba.org/index.php/Capture_Packets.

Volker
Comment 13 Geoff L. Kennedy 2007-06-27 09:16:48 UTC
Created attachment 2785 [details]
Raw packet dump
Comment 14 Geoff L. Kennedy 2007-06-27 09:18:09 UTC
Created attachment 2786 [details]
Formatted (from raw data file using -vv option) packet dump
Comment 15 Geoff L. Kennedy 2007-06-27 09:20:18 UTC
(In reply to comment #12)
> Can you please upload a tcpdump of a client that triggers this patch? You can
> find some hints how to do sniffs under
> http://wiki.samba.org/index.php/Capture_Packets.
> 
> Volker
> 

    Sure thing, I sent the info as attachments (comments 13 & 14).
Comment 16 Volker Lendecke 2007-06-27 14:25:53 UTC
Hmm. In this sniff the client perfectly correctly ends the connection. It does not show the crash. Can you get a sniff reproducing the crash and send the corresponding debug level 10 log of smbd?

Thanks,

Volker
Comment 17 Geoff L. Kennedy 2007-06-27 21:12:59 UTC
(In reply to comment #16)
> Hmm. In this sniff the client perfectly correctly ends the connection. It does
> not show the crash. Can you get a sniff reproducing the crash and send the
> corresponding debug level 10 log of smbd?
> 
> Thanks,
> 
> Volker
> 

   Hi Volker,

   I can't seem to be able to reproduce the problem at this time.  Jerry's
suggestion to disable spoolss doesn't seem to make any difference now.

   I'll try to dig into it further this weekend....it's a long weekend in
Canada, so...... :-)))))

   BTW - the sharing message still happens despite your suggested patch, and I
have confirmed that the patch was properly done to the source file which I
used to build my new RPMs.  Is it perhaps possible to have the patch kick out
something to syslog which could indicate if the code was actually called ?
Just a thought.......

   BTW2 - I must apologize for my "rant" the other day, this is my first foray
into bug reports, etc., especially for Open Source development.  I didn't do
my "homework" obviously.  I had no intention of treading on anybody's toes...
and it was not in any way way meant to be derogatory......thanks for your
understanding.