Printer queue problem (LPRng 3.4.2, Samba 1.9.18p4, Solaris 2.5.1/2.6)

Jeremy Allison jallison at
Tue Apr 14 19:06:54 GMT 1998

Owen L. Magee wrote:
> I've been having a problem with Win95 clients watching a printer queue on
> the Samba server (called labserv2).  labserv2 is a Solaris 2.5.1 machine
> running samba 1.9.18p4.  The printing system is LPRng 3.4.2.
> A user can watch the printer queue from a Win95 client machine.  However,
> when the printer queue gets backed up (usually about 12 jobs), the queue
> window locks.  The corresponding smbd process on labserv2 starts sucking
> up lots of CPU time.  Once you have about 10 clients doing this...well,
> things start slowing down pretty badly (although, to samba's credit, it
> is still very usable at a load average of 10 :) .
> I managed to reproduce this behavior on labserv1, which is currently
> unused.  labserv1 runs Solaris 2.6, samba 1.9.18p4, and LPRng 3.4.5.
> LPRng is set up so that the printers are served remotely from labserv2.
> Using a debug level of 10 and a single client watching a busy printer
> queue, I was able to capture debugging information.  At the end of this
> post is the debugging info that just loops over and over again, as fast
> as it can, on the spazzed smbd process.
> As far as I know, I never had this problem with samba 1.9.17p5 (and yes,
> we were using LPRng at the time).  This only started happening when I
> upgraded to samba 1.9.18.
> Does anybody have any clues?

Yes, I think this may be due to Samba not returning
*exactly* the right error code to Windows 95 when
Win95 requests the printer queue with a very small

Can you try applying the following patch to ipc.c
in Samba 1.9.18p4 and let me know if this fixes
the problem.

If so it'll be in the next patch release.


	Jeremy Allison,
	Samba Team.

--------------------cut here----------------------
--- /home/jallison/tmp/samba-1.9.18p4/source/ipc.c	Fri Mar 27 15:59:12
+++ ipc.c	Tue Apr 14 10:11:35 1998
@@ -280,8 +280,9 @@
   p->subcount = 0;
   p->curpos = p->format;
   if (i > n) {
+    p->neededlen = i;
     i = n = 0;
-    p->errcode = NERR_BufTooSmall;
+    p->errcode = ERROR_MORE_DATA;
     p->errcode = NERR_Success;
@@ -406,7 +407,7 @@
     p->usedlen += needed;
   else {
-    if (p->errcode == NERR_Success) p->errcode = NERR_BufTooSmall;
+    if (p->errcode == NERR_Success) p->errcode = ERROR_MORE_DATA;
   return 1;
--------------------end cut-----------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba mailing list