Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D91490FA for ; Wed, 23 May 2012 15:37:53 +0000 (UTC) Received: (qmail 81386 invoked by uid 500); 23 May 2012 15:37:53 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 81262 invoked by uid 500); 23 May 2012 15:37:52 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 81251 invoked by uid 99); 23 May 2012 15:37:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2012 15:37:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jlewis@silverhawk.net designates 209.85.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pb0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2012 15:37:46 +0000 Received: by pbbro12 with SMTP id ro12so12296371pbb.18 for ; Wed, 23 May 2012 08:37:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=Ufe0XesYjYBKazaEpy1PXFoKtU3K0S8jeuBpOLQk30o=; b=XGqXGztI7KKsMAp9THPE+Yjo/w3lH4DclPCcymgK108BaEPiPl6DVvf78rSo4xqn71 OBr/hOQg9abksH488sVsw9KwzvGDwxpz7vj0KzOOCepp+TUEY5x10gDhrRip969qAJwr wDFRn28eOIaOxgKWqJpKnoc3JXDJA0Pik2qwQNhGbcdnymVw1kTUMqoJxBZ3wWEnvEsV zXenzICiWW0zdh/uhMMxY0xUD0XjYnqtIs7IlFiHPSKAbrS1VVJhHjRGvERxDN38rj9p zDyskdbMq1xpdi5J802LeR8d1jNx4jFaXU1iXwTn6lsgWDTQWTBvV9cPSezlQzujdgd6 XovQ== Received: by 10.68.134.1 with SMTP id pg1mr758094pbb.1.1337787445205; Wed, 23 May 2012 08:37:25 -0700 (PDT) Received: from cyanide.overstock.com ([65.116.116.6]) by mx.google.com with ESMTPS id i1sm2183057pbv.49.2012.05.23.08.37.24 (version=SSLv3 cipher=OTHER); Wed, 23 May 2012 08:37:24 -0700 (PDT) Sender: Joe Lewis Date: Wed, 23 May 2012 09:37:35 -0600 From: jlewis To: modules-dev@httpd.apache.org Cc: bernhard.poechtrager@fabasoft.com Subject: Re: Module: Mod_Dialup (ap_mpm_register_timed_callback) Message-ID: <20120523093735.409b85f3@cyanide.overstock.com> In-Reply-To: <9121F635B3422848BC3C1D6DB9BD55CF3714A9@fabamailserver.fabagl.fabasoft.com> References: <9121F635B3422848BC3C1D6DB9BD55CF3708F6@fabamailserver.fabagl.fabasoft.com> <4FBBB353.4030104@joe-lewis.com> <9121F635B3422848BC3C1D6DB9BD55CF3714A9@fabamailserver.fabagl.fabasoft.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.8; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkreq8w6UZwsZxQTzO2xt5AD0/6EO+fZ8TONTovfNgFBiHDjRO39T3S6muzeraBsjomkGKC X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 23 May 2012 06:43:33 +0000 "P=C3=B6chtrager, Bernhard" wrote: > > -----Urspr=C3=BCngliche Nachricht----- > > Von: Joe Lewis [mailto:jlewis@silverhawk.net] Im Auftrag von Joe > > Lewis Gesendet: Dienstag, 22. Mai 2012 17:40 > > An: modules-dev@httpd.apache.org > > Betreff: Re: Module: Mod_Dialup (ap_mpm_register_timed_callback) > >=20 > >=20 > >=20 > > On 05/22/2012 12:27 AM, P=C3=B6chtrager, Bernhard wrote: > > > Hello > > > > > > I am trying to work with asynchronous requests. > > > With synchronous requests everything WORKS fine. > > > I write it like mod_dialup.c. > > > The result is that every second request is unsuccessful (The > > > Browser is > > loading the whole time). > > Bernhard; > >=20 > > Do you mean that the connection just appears to be loading? Does it > > timeout? Or does the page successfully load? > >=20 > > Do you see error messages? Are you logging anything to help debug > > this? Can you share things like - what you are trying to > > accomplish, code, etc? > >=20 > > Joe > >=20 >=20 > Thanks for your reply. > The "complete" explanation was in the first e-mail (apended at the > end). I write it again with more information. >=20 > I am trying to work with asynchronous requests. > With synchronous requests everything WORKS fine. > I write it like mod_dialup.c. > The result is that every second request is unsuccessful (The Browser > is loading the whole time). I put some logging-code into the > programm. The result ist that the first request works well. When I > make a second request the handler doesn't start at all. I get no > error and no logging-output. I even log the event.c file, but I get > nothing. The request is loading the whole time (I think until he > reachs the time-out). After I cancel the request I can make another > successful request. When I make another request I have the same > problem. I mean every second request is unsuccessful. I even looked > with Wireshark on the packages. When the problem appears he got only > a few packages. I think the problem is in the line " rv =3D > ap_queue_pop_something(worker_queue, &csd, &cs, &ptrans, &te);" in > the methode "static void *APR_THREAD_FUNC worker_thread(apr_thread_t > * thd, void *dummy)" in the event.c file. I think that the first > request isn't finished completely. >=20 > The relevant Code of the handler is (the change from sync to async): > ap_mpm_register_timed_callback(apr_time_from_msec(1000),callback,prr); > return SUSPENDED; >=20 > The callback method: > static void callback(void* data) > { > request_rec* prr =3D (request_rec*) data; > ap_finalize_request_protocol(prr); > ap_process_request_after_handler(prr); > } > Do you have any ideas? >=20 Since you are developing your own MPM, I'd suggest getting an strace (Linux) or something akin to truss (BSD). You need to find out exactly what your MPM is doing when the first request "finishes", and then when the second one starts up. strace will give you a LOT of information, and the more information you have, the better. Joe