[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope
Subject:    [Zope] Re: [Warning] Zope/ZEO clients: subprocesses can lead to
From:       Dieter Maurer <dieter () handshake ! de>
Date:       2004-06-27 18:27:03
Message-ID: 16607.4471.513392.166414 () gargle ! gargle ! HOWL
[Download RAW message or body]

ATTENTION: Crosspost -- Reply-To set to 'zope-dev@zope.org'

On Friday, I reported a bug that can cause non-deterministic message loss
and duplication of messages in forking applications
with an "asyncore" mainloop thread.

Unfortunately, the proposed workararound does not work for
various reasons (as you may already have recognized and reported):

 *  it modifies global variables without protection
    which is a receipe for desaster in a multi-threaded
    environment

 *  it resets state that is already activated.
    Therefore, it is not effective in preventing the main
    problem.

 *  when applied for "system", it blocks Zope
    until the the call returns which may be far too long.


I am working at another work around.
The main ideas is:

  *  Inform "asyncore" about the actor for which its mainloop
     should execute.

  *  When the actor is set, "asyncore" calls handlers only for
     this actor and does nothing otherwise.

The problem: what is an "actor"?

   The most natural choice would
   be the process, identified via its process id. However,
   under Linux, the process id may not identify the process but
   the thread. I am still looking for an adequate, platform
   independent "actor" definition.

-- 
Dieter
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic