Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 26 Jun 2002 22:24:02 +0200 (W. Europe Daylight Time)
From: Thomas Pfaff <tpfaff@gmx.net>
To: cygwin@cygwin.com
Subject: Re: cygwin-1.3.11-3 Problem with Privoxy (pthreads problem?)
In-Reply-To: <20020625155351.GA11650@redhat.com>
Message-ID: <Pine.WNT.4.44.0206262150540.-251967@thomas.kefrig-pfaff.de>
X-X-Sender: thomas@gw.kefrig-pfaff.de
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-AntiVirus: scanned for viruses by NGI Next Generation Internet (http://www.ngi.de/)



On Tue, 25 Jun 2002, Christopher Faylor wrote:

> On Tue, Jun 25, 2002 at 10:11:11AM -0500, D. N. Knisely wrote:
> >I don't think that multiple versions of cygwin1.dll is the problem.
> >Coincidentally, this system is a recent clean install of XP without too much
> >built-up crud.  I searched and found one extra copy (that came along with
> >xplanet), but that wasn't running.  Even after deleting it, the same problem
> >occurs:
> >
> >Jun 25 14:00:31 Privoxy(1628300860) Error: can't fork: No error
> >
> >Further inspection of privoxy suggests that whoever added CYGWIN hooks chose
> >to use threads rather than forking, so it is actually a Posix threads
> >problem.  When I disabled Posix thread use (which reverts to using fork), it
> >started working with 1.3.11.  Here is the code that no longer works; I have
> >no experience with Posix threads:
> >
> >#if defined(FEATURE_PTHREAD) && !defined(SELECTED_ONE_OPTION)
> >#define SELECTED_ONE_OPTION
> >         {
> >            pthread_t the_thread;
> >            pthread_attr_t attrs;
> >
> >            pthread_attr_init(&attrs);
> >            pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
> >            child_id = (pthread_create(&the_thread, &attrs,
> >               (void*)serve, csp) ? -1 : 0);
> >            pthread_attr_destroy(&attrs);
> >         }
> >#endif
> >
> >child_id is ending up as -1.  Did anything change in this area in 1.3.11?
>
> Yes, actually.  Nice catch!


I can't reproduce this error neither on NT4 nor on 98, therefore i think
this is a XP related problem.
Unfortunately the 1.3.11 DLL is missing a strace printf after
CreateThread, the only thing i can do is to send a test DLL (about 400k
gzipped). This dll can be copied to the privoxys sbin dir (or rename the
original cygwin1.dll and copy it to the /bin directory).
Start bash, change to the privoxys sbin directory and run

strace -m thread ./privoxy --no-daemon

Please reply if you can take the time and i will send you the test dll.

Thomas


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

