Rogue processes when using chess engines

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

titanD
Posts: 94
Joined: Sun Jun 29, 2014 5:41 pm

Rogue processes when using chess engines

Post by titanD »

Whether I use Arena or just polyglot I have rogue processes. Sometimes a half dozen instances of komodo running which I have to shut down in task manager.

This was also the case with Stockfish. And I'm going to guess with most if not all UCI engines.

What's the deal with this is this just some bullshit that has to be abided or am I doing something wrong? (aka doing nothing "wrong" but there's some annoying shit you have to know something specific to deal with?)
User avatar
Graham Banks
Posts: 46002
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Rogue processes when using chess engines

Post by Graham Banks »

Try the terminatehard=true parameter.
gbanksnz at gmail.com
titanD
Posts: 94
Joined: Sun Jun 29, 2014 5:41 pm

Re: Rogue processes when using chess engines

Post by titanD »

Graham Banks wrote:Try the terminatehard=true parameter.
Thanks but I'm more interested in knowing what causes this problem than some hack to get it to work like.. pretty much every other application I use works.
jefk
Posts: 1085
Joined: Sun Jul 25, 2010 10:07 pm
Location: the Netherlands
Full name: Jef Kaan

Re: Rogue processes when using chess engines

Post by jefk »

[quote="titanD"][quote="Graham Banks"]Try the terminatehard=true parameter.[/quote]

Thanks but I'm more interested in knowing what causes this problem than some hack to get it to work like.. pretty much every other application I use works.[/quote]

it's probably the Arena program (causing this). so you
might mail them about your findings.

When i'm using Aquarium the only thread which is
not stopped after the Idea is stopped is the (rather new) Nirvana
engine, other engines work fine. And yes, in computer chess
you learn to check now and then your threads with the
task manager :)

jef
titanD
Posts: 94
Joined: Sun Jun 29, 2014 5:41 pm

Re: Rogue processes when using chess engines

Post by titanD »

jefk wrote:it's probably the Arena program (causing this).
Nah bro. It happens with polyglot too

I refuse to believe it doesn't happen to most users as well.

This is occurring on a clean Win7x64 computer and my computer literacy and power user status would cause craters to form under my house if I didn't restrict my reiatsu, something you guys wouldn't even know about, given your low levels.

Image
User avatar
hgm
Posts: 28511
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Rogue processes when using chess engines

Post by hgm »

Which engines are these? Polyglot would relay "quit" to any engine before it exits. But if there are engines that ignore a "quit" command and just keep running, there is very little it can do. Windows does not support Linux-type signals that you can use to forcefully kill a rogue program in a reliable way.

When using an adapter like Polyglot there is always the danger that you make the GUI too aggressive in terminating the 'engine', so that it would kill the adapter before it can shut down the engine in the normal way (by sending "quit"). This could cause even properly functioning engines to hang. WinBoard has an option -delayAfterQuit to delay a given number ofmsec to prevent that situation.

Forcefully killing rogue engines on WinBoard has always been a problem. WinBoard uses the TerminateProcess API function for that, but things just do not seem to work as advertized, and the engines often seem to ignore it. There is a command-line utility "pv" that can be used to reliably kill processes by name, and when I run tournaments in WinBoard with engines that are prone to hanging I configure the -afterGame option to kill such engines. (IIRC "pv -f fmax.exe" would be the required command.) The problem is that this interferes with concurrency, as when multiple fmax.exe processes are running, it might kill the wrong one.
titanD
Posts: 94
Joined: Sun Jun 29, 2014 5:41 pm

Re: Rogue processes when using chess engines

Post by titanD »

Stockfish and Komodo. Latest versions of both and the previous versions leading up to them.
User avatar
hgm
Posts: 28511
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Rogue processes when using chess engines

Post by hgm »

One would expect those to be stable, and in particular always react to a "quit" command. Which suggests they somehow don't get it.

You could try to run with Polyglot logging on, so that we can examine the log for a case where this happens. Problem is that Polyglot logging is not very elaborate; it doesn't,for instance, contain a complete transcript of everything that went between engine and Polyglot.

An alternative is to use UCI2WB instead of Polyglot, with logging on. That would relay a complete transcript of the communication with the engine to the GUI, so that it would appear in the GUI log.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Rogue processes when using chess engines

Post by MikeGL »

Strange.

I suspect it is with Arena, I have a problem with Arena if I write
protect its folder. It will complain and won't load any types of UCI engines.

But I have not experienced multiple processes being spawned by stable and popular UCI engines like Stockfish, Critter, Rybka etc. I have XP Pro 32bit.
You can file a bug report to the engine author themselves.

No offense but real power users uses some Linux derivatives.
You can compile and mold your own lean kernel with Linux.

p.s. Some engines just act so strange I don't use them. Sting is one of them. WinXP with DEP on is complaining something about the Sting binary. Probably some overflow or some obscure bug which only Marek knows.
Modern Times
Posts: 3893
Joined: Thu Jun 07, 2012 11:02 pm

Re: Rogue processes when using chess engines

Post by Modern Times »

titanD wrote: I refuse to believe it doesn't happen to most users as well.
I've never seen or heard of this before with Komodo or Stockfish.