printing problem on 2.2.8a and 3.0alpha24

jra at jra at
Fri May 23 19:37:28 GMT 2003

On Fri, May 23, 2003 at 03:28:57PM -0400, Joe Meslovich wrote:
> I have looked into the high CPU usage problem that I have been having on
> Solaris 2.6 running either 2.2.8a or 3.0. I'm not sure if I understand
> exactly how it works yet, so if I'm wrong please set me on the right track
> ;). Anyway the high cpu usage seems to be tied to locking the specific
> printer tdb after spawning the external lpq command. I see the process
> open the tbd database for a specific queue. Then it spawns the child that
> runs lpq. The child returns, and then the parent spins on a fcntl(29,
> F_SETLKW64, 0xEFFFE6B8) command. After spinning on the lock I see time()
> get called again three seconds after the last time() and it does a munmap
> of the filedes for that queue and moves on to the next one. It does the
> same thing for each queue it seems. I have something like 50 queues which
> means it takes on the order of 150 seconds to stat all the queues. Below
> is an excert of my truss of an affected process. Part of my problem is I
> don't fully understand what is supposed to happen to the tdb after the
> tmp file containing the lpq result is released.

Ah - Solaris, tdb, fcntl. This is a known bug in Solaris. Please ask 
Sun for the 'scalable fcntl locking patch' (sorry, can't remember the
Solaris patch number).

The CPU usage of Solaris without this patch is dreadful on systems using
fcntl locks.


More information about the samba-technical mailing list