spoolss_notify_cjobs()

Luke Kenneth Casson Leighton lkcl at samba.org
Tue Aug 15 08:07:38 GMT 2000


this is one of the reasons why the nt client runs threads.  the dce/rpc
service is *expected* to be threaded to match, one-for-one, the number of
threads that the client requests [a BIND_ALTER_CONTEXT PDU is sent for
each thread required].

consequently, a single-process implementation such as spoolssd, is going
to run into problems.

this will require some form of "emulation" of threads, to fix in a
portable manner.

chris frank, of linuxcare, described an "IO Queue" mechanism that is used
in VMS, that would be suitable, that he has formerly implemented [in a
kernel] that could be reimplemented with shared memory.  i suggested the
use of mmap'd tdb as a possible candidate to use.

although emulating a "queue" structure using a database is a bit of a
pain, as long as the number of entries in the "queue" are not exceeded by
the number of "worker threads" [in this case, each "thread" is actually a
process on the other side of the shared memory tdb], then the possibility
of an entry in the "queue" not being dealt with due to the "queue" not
having FILO properties does not occur.

also been talking to andrew about a possible diagnosis that lack of
threads in samba is causing a benchmark program where the NT SMB client
*is* threaded is causing similar "blocking" problems in the benchmark
program.



On Mon, 14 Aug 2000, Gerald Carter wrote:

> Heads up....
> 
> I found a bug in the HEAD branch printing code.  When 
> a remote printer in /etc/printcap is unavailable, trying 
> to browse the Printers folder on the Samba server.
> 
> The spoolss_notify_cjobs() (called as a result of
> api_spoolss_rfnpcnex()) forks and waits for the child
> to exit.  However, when the printer is unable (remote one 
> of course) the child hangs until it times out.
> 
> I'm working on the code, but if someone has a 
> quick fix....let me know.
> 
> 
> 
> 
> Cheers, jerry
> ----------------------------------------------------------------------
>    /\  Gerald (Jerry) Carter                     Professional Services
>  \/    http://www.valinux.com  VA Linux Systems    gcarter at valinux.com
>        http://www.samba.org       SAMBA Team           jerry at samba.org
>        http://www.eng.auburn.edu/~cartegw
> 
>        "...a hundred billion castaways looking for a home."
>                                 - Sting "Message in a Bottle" ( 1979 )
> 

<a href=" mailto:lkcl at samba.org" > Luke Kenneth Casson Leighton    </a>
<a href=" http://cb1.com/~lkcl"  > Samba and Network Development   </a>
<a href=" http://samba.org"      > Samba Web site                  </a>
 
ISBN1578701503 DCE/RPC over SMB: Samba and Windows NT Domain Internals





More information about the samba-technical mailing list