Bug 563668

Summary: pychess may leave orphan processes consuming nearly 100% CPU
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: pychessAssignee: Bruno Wolff III <bruno>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: airholm, alessandro.nazzani, ameya.gore, a.schapira, bruno, daniel.with, dijit, dkovalsk, Esotopia, geminic86, gonderici, gwen.gall, hectorvucetich, iavor.tachev, kent.perrier, kiran.telukunta, kt, linuxnow, michel, nobodie0, nuovodna, riverstank420, vishal.bele
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 21:48:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
terminal session showing that pychess orphans two processes on SIGTERM none

Description Steve Tyler 2010-02-10 20:24:48 UTC
Description of problem:
If pychess is killed with the "kill" command, it leaves two orphan processes that together consume nearly 100% of the CPU.

Version-Release number of selected component (if applicable):
pychess-0.10-0.1.20100203svn.fc12.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Remove .pychessconf and .pychess/
2. Start pychess from a terminal.
3. Start game, but don't make any moves.
4. From another terminal run "ps -ef | grep pychess" and note the PID of /usr/bin/pychess.
5. Run "kill <PID>".
6. Run "ps -ef | grep pychess" and note that two pychess processes are still running.
7. Run "top -c" to see that they are consuming nearly 100% of the CPU.
  
Actual results:
Two orphan processes are consuming nearly 100% of the CPU.
The other two processes are killed, as expected.

Expected results:
All child processes are killed.

Additional info:

Typing ctrl-C in the terminal running pychess results in all child processes being killed.

Comment 1 Steve Tyler 2010-02-10 22:35:34 UTC
Signal 6 may also leave the analyzer processes orphaned and consuming 100% of the CPU.

Bug 563714 -  [abrt] crash in pychess-0.10-0.1.20100203svn.fc12
...
Core was generated by `/usr/bin/python /usr/bin/pychess'.
Program terminated with signal 6, Aborted.
...

Comment 2 Thomas Spura 2010-02-14 16:45:07 UTC
You just kill the pychess process, but I'm unsure if this will ever happen.

When you start pychess from a terminal and abort it with ctrl-c, all childs are killed, and what do you want/expect more?

Comment 3 Thomas Spura 2010-02-14 16:45:22 UTC
*** Bug 563720 has been marked as a duplicate of this bug. ***

Comment 4 Steve Tyler 2010-02-14 21:45:30 UTC
Created attachment 394226 [details]
terminal session showing that pychess orphans two processes on SIGTERM

Procedure:

Start pychess from Applications:Games:PyChess.
Start game.

The attachment shows the pychess processes before and after sending it SIGTERM.

The orphaned processes are consuming nearly 100% of the CPU.

Comment 5 Steve Tyler 2010-02-14 22:07:20 UTC
(In reply to comment #2)
> You just kill the pychess process, but I'm unsure if this will ever happen.
> 
> When you start pychess from a terminal and abort it with ctrl-c, all childs are
> killed, and what do you want/expect more?    

If pychess is started from the GUI, and it is hung, it should be possible to kill it cleanly with SIGTERM. Ctrl-C from a terminal sends SIGINT.

Also, pychess cleans up one of its child processes on SIGTERM, but not the other two. That seems inconsistent.

I'm no expert on signals, so here is what GNU says: :-)

"The SIGTERM signal is a generic signal used to cause program termination. Unlike SIGKILL, this signal can be blocked, handled, and ignored. It is the normal way to politely ask a program to terminate.

The shell command kill generates SIGTERM by default."

24.2.2 Termination Signals
http://www.gnu.org/s/libc/manual/html_node/Termination-Signals.html#Termination-Signals

The "top" command also sends SIGTERM (15) by default.

See also "man 7 signal".

Comment 6 Esotopia 2010-04-10 12:46:02 UTC

Comment
-----
I was switching between two games.

Comment 7 nuovodna 2010-04-11 19:26:16 UTC

How to reproduce
-----
1. Start pyChess
2. Human vs PyChess Engine
3. After first move by pychess engine CPU load goes to 100%

Comment 8 Steve Tyler 2010-04-11 20:11:08 UTC
(In reply to comment #7)
> 
> How to reproduce
> -----
> 1. Start pyChess
> 2. Human vs PyChess Engine
> 3. After first move by pychess engine CPU load goes to 100%    

That problem was reported in:
Bug 562793 - pychess consumes 100% of the CPU when analyzers are enabled

Unfortunately, upstream couldn't be convinced that it is a problem:
http://code.google.com/p/pychess/issues/detail?id=526

A work-around is to disable the analyzers in
"Settings:Preferences:Computer Opponents"
and restart pychess.

Comment 9 David Webb 2010-06-05 16:05:49 UTC
Package: pychess-0.10-0.5.20100511hg.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. I have no idea.

Comment 10 Ameya Gore 2010-07-07 23:07:45 UTC
Package: pychess-0.10-0.5.20100511hg.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


Comment
-----
I rotetted the chess board.

Comment 11 David Kovalsky 2010-09-08 15:55:47 UTC
Package: pychess-0.10-0.7.20100815hg.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. Play a couple of games
2. Finally, get to a point in one of them where you're winning
3. Make a move, bang! (crash)

Comment 12 kent.perrier 2010-09-28 21:15:23 UTC
Package: pychess-0.10-0.7.20100815hg.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. I was just playing the game
2.
3.

Comment 13 anon 2010-10-03 20:33:27 UTC
Package: pychess-0.10-0.7.20100815hg.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. it crashes randomly..
2. and i dont know what causes it
3.

Comment 14 daniel.with 2010-10-04 06:33:22 UTC
Package: pychess-0.10-0.7.20100815hg.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. Offer to resign when near checkmate initiated by GNU chess (black), user (white-loser)
2. New Game option offered, board flips so that GNU chess (white), user (black)
3. GNU engine takes first move
4. Application freezes, user (black) cannot move.


Comment
-----
In order to play a new game, application had to be force quit and completely restarted.

Comment 15 Bug Zapper 2010-11-03 22:28:26 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 16 Kiran K Telukunta 2010-11-14 02:42:49 UTC
Package: pychess-0.10-0.7.20100815hg.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


Comment
-----
when I opened pyches program.

Comment 17 Joseph D. Wagner 2010-11-15 10:07:30 UTC
Package: pychess-0.10-0.7.20100815hg.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
Set AI to gnuchess instead of pychess.

Comment 18 Steve Tyler 2010-11-15 11:56:34 UTC
Bumping release to 14 per comment 16, comment 17.

If pychess is not going to be maintained, maybe it should be removed from Fedora.

Assigned To: 	Nobody's working on this, feel free to take it
https://bugzilla.redhat.com/show_activity.cgi?id=563668

Comment 19 Joseph D. Wagner 2010-11-15 12:55:12 UTC
I second it's removal.  It has a number of bugs that make it unstable, even by beta standards.

Bugzilla currently has 37 on pychess, mostly related to crashes, out-of-bounds indexes (which cause a crash), and runaway cpu (which cause it to be non-responsive as if it crashed).  The link provided in comment # 8 makes it clear that the upstream maintainers are either too overwhelmed or too inexperienced to deal with this massive undertaking.

IMHO, tracking bugs (and by extension maintaining packages) for pychess is more trouble than it's worth, especially with stable alternatives like glchess.

Just my two cents.

Comment 20 Thomas Spura 2010-11-15 14:16:09 UTC
Yes, that's why I orphaned pychess. It's better to use pychess from the upstream repository and report bugs directly there to improve pychess.

When that's done, it makes sense to get it back into fedora...

Anyone: Feel free to take it and try to improve it, without removing from fedora. ;)

Comment 21 Fedora Admin XMLRPC Client 2010-11-15 15:54:28 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 22 Michel Lind 2010-11-16 00:00:51 UTC
Filed upstream:
http://code.google.com/p/pychess/issues/detail?id=615

Comment 23 kendy 2010-11-24 11:39:43 UTC
Package: pychess-0.10-0.7.20100815hg.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. I opened pyChess, then it was opened
2. I have pushed "X" for close
3.I have a massage because crush pyChess

Comment 24 Roman 2010-11-25 10:57:36 UTC
Package: pychess-0.10-0.7.20100815hg.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
Запустил игру: Человек играет белыми. Поулчил сообщение о сбое

Comment 25 Steve Tyler 2010-11-25 18:41:45 UTC
(In reply to comment #24)
> Package: pychess-0.10-0.7.20100815hg.fc14
> Architecture: x86_64
> OS Release: Fedora release 14 (Laughlin)
> 
> 
> How to reproduce
> -----
> Запустил игру: Человек играет белыми. Поулчил сообщение о сбое

Start the game: Man plays white. Detected an error message
http://translate.google.com/

A newer version is in updates-testing:
$ sudo yum update pychess --enablerepo=updates-testing

Comment 26 David Webb 2010-11-29 18:30:41 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. win a game
2. click play rematch
3. freeeeeeeeeeeze

Comment 27 Steve Tyler 2010-11-29 20:11:23 UTC
(In reply to comment #26)
> Package: pychess-0.10-0.8.rc1.fc14
> Architecture: x86_64
> OS Release: Fedora release 14 (Laughlin)
> 
> 
> How to reproduce
> -----
> 1. win a game
> 2. click play rematch
> 3. freeeeeeeeeeeze

Thanks for reporting this.
How did you recover?

I could not reproduce this hang in F13 by clicking Play Rematch,
but pychess hung once while stepping backward and forward
through a game that I had finished.
pychess was running from the command line,
so I killed it with ctrl-\.
Unfortunately, that did not generate a core file,
and I have not reproduced it.

pychess-0.10-0.8.rc1.fc13.noarch

Comment 28 kt 2010-12-04 08:54:05 UTC
Package: pychess-0.10-0.3.20100214svn.fc12
Architecture: i686
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1.Game restart
2.
3.

Comment 29 kt 2010-12-05 13:19:57 UTC
Package: pychess-0.10-0.3.20100214svn.fc12
Architecture: i686
OS Release: Fedora release 12 (Constantine)


How to reproduce
-----
1.Game restart
2.
3.

Comment 30 Steve Tyler 2010-12-05 20:06:10 UTC
(In reply to comment #29)
> Package: pychess-0.10-0.3.20100214svn.fc12
> Architecture: i686
> OS Release: Fedora release 12 (Constantine)

KT: Thanks for your reports.
Fedora 12 is not supported anymore.
http://fedoraproject.org/wiki/Releases/12/Schedule

There is a newer version of pychess for Fedora 13 and Fedora 14.
http://fedoraproject.org/get-fedora

Comment 31 Al Schapira 2010-12-12 21:06:16 UTC
Package: pychess-0.10-0.8.rc1.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1.Clicked UNDO
2.
3.

Comment 32 Roman 2010-12-13 16:30:11 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. в теминале yum install openoffice-write openoffice-calc
2. запуск pychess, закрытие игры
3. зависла, получил сообщение об ошибке

Comment 33 Al Schapira 2010-12-25 03:18:38 UTC
Package: pychess-0.10-0.8.rc1.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1.?
2.
3.

Comment 34 Alessandro Nazzani 2011-01-13 09:22:21 UTC
Package: pychess-0.10-0.8.rc1.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
The crash seems random: it usually happens at the end of a game or when I click on rematch, but not always.

Comment 35 David Kovalsky 2011-01-16 13:51:52 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
See https://bugzilla.redhat.com/show_bug.cgi?id=669981#c0

Comment 36 Héctor Vucetich 2011-01-19 20:58:37 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against gnuchess
3. The window freezes


Comment
-----
Sometimes you can play a game against gnuchess. Attempt to start a new game produces the crash.

Comment 37 Héctor Vucetich 2011-02-08 23:32:08 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess
3. PyChess crashes


Comment
-----
The crash is sporadic.

Comment 38 Héctor Vucetich 2011-02-12 16:42:38 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess
3. PyChess crashes


Comment
-----
The crash is sporadic.

Comment 39 Héctor Vucetich 2011-02-12 22:44:32 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess  (using "Play Rematch)
3. PyChess crashes.


Comment
-----
The crash is sporadic.

Comment 40 Héctor Vucetich 2011-02-13 00:33:33 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess  (using "Play Rematch)
3. PyChess crashes.


Comment
-----
The crash is sporadic.

Comment 41 Héctor Vucetich 2011-02-19 18:16:56 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess  (using "Play Rematch)
3. PyChess crashes.


Comment
-----
The crash is sporadic.

Comment 42 Héctor Vucetich 2011-03-01 23:32:08 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess  (using "Play Rematch)
3. PyChess crashes.


Comment
-----
The crash is sporadic.

Comment 43 geminic86 2011-04-09 12:25:39 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1.Playing and opponent ask for 2 undo moves
2.then crash
3.

Comment 44 Héctor Vucetich 2011-04-21 21:51:29 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Play against PyChess and win
2. Start new game against PyChess  (using "Play Rematch)
3. PyChess crashes.


Comment
-----
The crash is sporadic.

Comment 45 Gwen 2011-05-24 18:04:34 UTC
Package: pychess-0.10-0.8.rc1.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. je ne me souviens plus très bien
2.
3.

Comment 46 Fedora Admin XMLRPC Client 2011-07-12 19:42:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 47 Bruno Wolff III 2011-09-03 18:39:28 UTC
I have a new test update with a number of post 0.10 upstream fixes. Please try it out and let me know if it fixes this issue and/or causes other issues. Thanks.
https://admin.fedoraproject.org/updates/pychess-0.10.rev2004-1.fc14?_csrf_token=0458b62279c19fbd2e7bd1d82762e6eff5891188

Comment 48 Fedora End Of Life 2012-08-16 21:48:24 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping