Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-16 Thread Andy Bradford
Thus said Warren Young on Tue, 15 Nov 2016 08:30:56 -0700:

> I'd  suggest that  if  you're  going to  use  ``fossil  server'' on  a
> permanent basis  that you select  a much less troublesome  port number
> and use the -P option to force it.

It can also be stored as a setting:

$ fossil set http-port
http-port(local)  9000

Andy
-- 
TAI64 timestamp: 4000582c78f7


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-15 Thread Warren Young
On Nov 15, 2016, at 12:09 AM, J. Cameron Cooper  wrote:
> 
> after reinstalling [crtmpserver] today I don't see the issue anymore.

It could have been a firewall issue, then, with the package’s post-install 
script restoring the proper port 8080 firewall rule, which also allows Fossil 
through as a side-benefit.

I’d suggest that if you’re going to use “fossil server” on a permanent basis 
that you select a much less troublesome port number and use the -P option to 
force it.

Here’s my wrapper script for starting Fossil as a server, which deals with that 
and several other common issues:



#!/bin/sh
OLDPID=`pgrep fossil`
if [ -n "$OLDPID" ]
then
echo "Killing old Fossil instance (PID $OLDPID) first..."
kill $OLDPID

typeset -i i=1
while kill -0 $OLDPID > /dev/null 2>&1 && [ $i -lt 30 ]
do
if [ $i -eq 1 ]
then
echo -n "Waiting for it to die..."
else
echo -n .
fi
sleep '0.1s'
i=i+1
done
echo
fi

fossil server -P 3691 --repolist /museum > /dev/null &
echo Fossil server running, PID $!.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-14 Thread J. Cameron Cooper
>
> On Nov 14, 2016, at 12:32 AM, J. Cameron Cooper  wrote:
> >
> > I've been happily using fossil for quite a few years now, but I recently had
> > an unusual symptom develop on one of my machines. I think it's a bug, but I
> > have no idea how to add a ticket on the main site, so I'll drop it here.
>
> This is the correct place to report such things.  The Fossil project’s ticket
> tracker is not publicly writable to avoid ticket spam.
>
> > I found the command 'fossil server' caused fossil to spin with 100% cpu 
> > usage
> > (for at least hours, so I'm guessing it's indefinite) when it tried to 
> > listen
> > on the default port if that port was already occupied by 'crtmpserver'. (For
> > most occupants of a port fossil prints out a message about the conflict and
> > exits, but for 'crtmpserver' it just sits and spins as described. Perhaps
> > 'crtmpserver' is poorly behaved?)
>
> The OS’s network stack doesn’t consult the program already bound to the TCP
> port in order to figure out what it should do when another program comes along
> and tries to bind to the same port.  All of the logic it uses to decide what 
> to
> do is part of the network stack and related code, such as the firewall and
> security subsystems of the kernel.
>
> Therefore, this problem cannot be specific to crtmpserver, or to Fossil.
>
> > crtmpserver may have just started running on 8080 via an update; dunno why
> > else I suddenly encountered this.
>
> 8080 is a very popular default port number to use for anything that speaks
> HTTP, as both Fossil and crtmpserver do.  (RTMP can be encapsulated within
> HTTP.)
>
> > OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on 
> > 1.27
> > (the distro version). The 1.35 version prints "Listening for HTTP requests 
> > on
> > TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves similarly.
>
> I’m confused.  Are you saying that it says "Listening for HTTP requests on TCP
> port 8080” and then pegs the CPU, and doesn’t respond?  And that it does this
> even though crtmpserver is already bound to port 8080?
>
>
Yes.


> If Fossil isn’t running, and you try to connect to http://localhost:8080 from 
> a
> browser on the Fossil/crtmpserver machine, what do you get in the browser when
> Fossil isn’t running?  Does that change after you start Fossil?
>
>
Browser reports no response in either case; if I open up a telnet session
directly I see the same thing: no response to anything.

I can’t replicate your problem here on a CentOS 7 box.  I’ve started a random
> program here on port 8080, then started Fossil, and it correctly failed to 
> bind
> to port 8080 and moved on to 8081.
>
>
I also saw this behavior; running two Fossil servers on 8081, the second
reports the conflict and shuts down.


> What do you get from strace if you run Fossil underneath it while crtmpserver
> is running, causing Fossil to hit 100% CPU?
>
>
Hm. I uninstalled crtmpserver yesterday to deal with the problem and after
reinstalling it today I don't see the issue anymore. Fossil correctly
detects the used socket like normal. And crtmpserver responds on 8080,
appropriately as a web server, which it didn't before. (I didn't know what
it was using the port for, since I don't actually use it.) It must've
gotten into some odd state. So, can't provide any further info. Sorry.

Thanks for you time. Guess we'll just call it "transient".

On Mon, Nov 14, 2016 at 1:32 AM, J. Cameron Cooper 
wrote:

> I've been happily using fossil for quite a few years now, but I recently
> had an unusual symptom develop on one of my machines. I think it's a bug,
> but I have no idea how to add a ticket on the main site, so I'll drop it
> here.
>
> I found the command 'fossil server' caused fossil to spin with 100% cpu
> usage (for at least hours, so I'm guessing it's indefinite) when it tried
> to listen on the default port if that port was already occupied by
> 'crtmpserver'. (For most occupants of a port fossil prints out a message
> about the conflict and exits, but for 'crtmpserver' it just sits and spins
> as described. Perhaps 'crtmpserver' is poorly behaved?)
>
> It's not a popular package, but perhaps the condition may be exercised by
> other daemons as well, so I thought it worth reporting. crtmpserver may
> have just started running on 8080 via an update; dunno why else I suddenly
> encountered this.
>
> OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on
> 1.27 (the distro version). The 1.35 version prints "Listening for HTTP
> requests on TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves
> similarly.
>
> --
> J Cameron Cooper
>



-- 
J Cameron Cooper
jccoo...@gmail.com
jccoo...@cooperdigital.com 
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-14 Thread Warren Young
On Nov 14, 2016, at 12:32 AM, J. Cameron Cooper  wrote:
> 
> I've been happily using fossil for quite a few years now, but I recently had 
> an unusual symptom develop on one of my machines. I think it's a bug, but I 
> have no idea how to add a ticket on the main site, so I'll drop it here.

This is the correct place to report such things.  The Fossil project’s ticket 
tracker is not publicly writable to avoid ticket spam.

> I found the command 'fossil server' caused fossil to spin with 100% cpu usage 
> (for at least hours, so I'm guessing it's indefinite) when it tried to listen 
> on the default port if that port was already occupied by 'crtmpserver'. (For 
> most occupants of a port fossil prints out a message about the conflict and 
> exits, but for 'crtmpserver' it just sits and spins as described. Perhaps 
> 'crtmpserver' is poorly behaved?)

The OS’s network stack doesn’t consult the program already bound to the TCP 
port in order to figure out what it should do when another program comes along 
and tries to bind to the same port.  All of the logic it uses to decide what to 
do is part of the network stack and related code, such as the firewall and 
security subsystems of the kernel.

Therefore, this problem cannot be specific to crtmpserver, or to Fossil.

> crtmpserver may have just started running on 8080 via an update; dunno why 
> else I suddenly encountered this.

8080 is a very popular default port number to use for anything that speaks 
HTTP, as both Fossil and crtmpserver do.  (RTMP can be encapsulated within 
HTTP.)

> OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on 1.27 
> (the distro version). The 1.35 version prints "Listening for HTTP requests on 
> TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves similarly.

I’m confused.  Are you saying that it says "Listening for HTTP requests on TCP 
port 8080” and then pegs the CPU, and doesn’t respond?  And that it does this 
even though crtmpserver is already bound to port 8080?

If Fossil isn’t running, and you try to connect to http://localhost:8080 from a 
browser on the Fossil/crtmpserver machine, what do you get in the browser when 
Fossil isn’t running?  Does that change after you start Fossil?

I can’t replicate your problem here on a CentOS 7 box.  I’ve started a random 
program here on port 8080, then started Fossil, and it correctly failed to bind 
to port 8080 and moved on to 8081.

What do you get from strace if you run Fossil underneath it while crtmpserver 
is running, causing Fossil to hit 100% CPU?
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] 'fossil server' unresponsive with high CPU usage

2016-11-13 Thread J. Cameron Cooper
I've been happily using fossil for quite a few years now, but I recently
had an unusual symptom develop on one of my machines. I think it's a bug,
but I have no idea how to add a ticket on the main site, so I'll drop it
here.

I found the command 'fossil server' caused fossil to spin with 100% cpu
usage (for at least hours, so I'm guessing it's indefinite) when it tried
to listen on the default port if that port was already occupied by
'crtmpserver'. (For most occupants of a port fossil prints out a message
about the conflict and exits, but for 'crtmpserver' it just sits and spins
as described. Perhaps 'crtmpserver' is poorly behaved?)

It's not a popular package, but perhaps the condition may be exercised by
other daemons as well, so I thought it worth reporting. crtmpserver may
have just started running on 8080 via an update; dunno why else I suddenly
encountered this.

OS is Linux Mint 17.3. Fossil version is 1.35, though the same occurs on
1.27 (the distro version). The 1.35 version prints "Listening for HTTP
requests on TCP port 8080"; the 1.27 prints nothing. 'fossil ui' behaves
similarly.

-- 
J Cameron Cooper
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users