librelist archives

« back to archive

Mongrel stopping bug

Mongrel stopping bug

From:
Ciprian Dorin, Craciun
Date:
2010-11-04 @ 19:27
    Hello all!

    First congratulations to the authors of Mongrel2. (It's exactly
what the doctor ordered. :) I've been pondering of writing myself
something similar but in a combination of Erlang and RabbitMQ :) )

    Now to the point: while reading the Mongrel2 manual (very well
written!) and playing with the server I've hit the following possible
bug: if requesting reload (without actually modifying anything inside
the configuration database), and then requesting a stop, it seems that
the stop is ignored. (But after the actual reload happens the stop
works again.)

~~~~
cd ./tests # inside the sources folder after building it

m2sh version
# Mongrel2/1.4-561cb4b4a4

m2sh start -db ./config.sqlite -name test
# tracing info is written

m2sh reload -db ./config.sqlite -name test
# on the `m2sh start` console
# [INFO] (src/mongrel2.c:75) RELOAD REQUESTED, I'll do it on the next request.

m2sh stop -db ./config.sqlite -name test
# on the `m2sh start` console
# [INFO] (src/mongrel2.c:79) SIGINT CAUGHT AGAIN, ASSUMING MURDER.

# press Ctrl+C as many times as I want on the `m2sh start` console and
nothing happens except
^C[INFO] (src/mongrel2.c:79) SIGINT CAUGHT AGAIN, ASSUMING MURDER.

# go to browser and access the server on http://127.0.0.1:6767/
# [INFO] (src/mongrel2.c:304) Reload requested, will load
./config.sqlite from AC1F8236-5919-4696-9D40-0F38DE9E5861

m2sh stop -db ./config.sqlite -name test
# on the `m2sh start` console
# [INFO] (src/mongrel2.c:83) SHUTDOWN REQUESTED: GRACEFUL (SIGINT
again to EXIT NOW)
~~~~

    Hope this is helpful and once again great job!
    Ciprian.

Re: [mongrel2] Mongrel stopping bug

From:
Zed A. Shaw
Date:
2010-11-04 @ 19:48
On Thu, Nov 04, 2010 at 09:27:58PM +0200, Ciprian Dorin, Craciun wrote:
>     Hello all!
> 
>     First congratulations to the authors of Mongrel2. (It's exactly
> what the doctor ordered. :) I've been pondering of writing myself
> something similar but in a combination of Erlang and RabbitMQ :) )

Cool, glad you like it.

>     Now to the point: while reading the Mongrel2 manual (very well
> written!) and playing with the server I've hit the following possible
> bug: if requesting reload (without actually modifying anything inside
> the configuration database), and then requesting a stop, it seems that
> the stop is ignored. (But after the actual reload happens the stop
> works again.)

Hmm that could be a simple logic error since it's waiting for that one
next request.

Double check that you are NOT using zeromq 2.1 though.  That has
problems with restarts that we have to solve before moving to it.

If you're on 2.0.9 and you've got this but, then fill out a ticket for
us so we can work on it:

http://mongrel2.org/tktnew

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Mongrel stopping bug

From:
Ciprian Dorin, Craciun
Date:
2010-11-04 @ 19:59
On Thu, Nov 4, 2010 at 21:48, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
> On Thu, Nov 04, 2010 at 09:27:58PM +0200, Ciprian Dorin, Craciun wrote:
>>     Hello all!
>>
>>     First congratulations to the authors of Mongrel2. (It's exactly
>> what the doctor ordered. :) I've been pondering of writing myself
>> something similar but in a combination of Erlang and RabbitMQ :) )
>
> Cool, glad you like it.
>
>>     Now to the point: while reading the Mongrel2 manual (very well
>> written!) and playing with the server I've hit the following possible
>> bug: if requesting reload (without actually modifying anything inside
>> the configuration database), and then requesting a stop, it seems that
>> the stop is ignored. (But after the actual reload happens the stop
>> works again.)
>
> Hmm that could be a simple logic error since it's waiting for that one
> next request.
>
> Double check that you are NOT using zeromq 2.1 though.  That has
> problems with restarts that we have to solve before moving to it.

    It seems that I'm on zeromq 2.0.10 (from ArchLinux AUR
repository.) (This is reconfirmed by looking at the version at the
bottom of the man pages.) (But checking on the zeromq site I don't see
any 2.1 release. Is there a typo in your previous email?)


> If you're on 2.0.9 and you've got this but, then fill out a ticket for
> us so we can work on it:
>
> http://mongrel2.org/tktnew

    So in this case (zmq 2.0.10 and not 2.1) should I post the bug?


> --
> Zed A. Shaw
> http://zedshaw.com/

Re: [mongrel2] Mongrel stopping bug

From:
Zed A. Shaw
Date:
2010-11-04 @ 23:57
On Thu, Nov 04, 2010 at 09:59:23PM +0200, Ciprian Dorin, Craciun wrote:
>     So in this case (zmq 2.0.10 and not 2.1) should I post the bug?

Yep, go ahead, and use <verbatim></verbatim> to give your steps to
reproduce.

-- 
Zed A. Shaw
http://zedshaw.com/