Bug 507156 - Uses 100% CPU and busy loops
Summary: Uses 100% CPU and busy loops
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openlierox
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-21 10:41 UTC by Ian Chapman
Modified: 2009-11-10 10:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-10 10:44:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ian Chapman 2009-06-21 10:41:03 UTC
Description of problem:

Essentially, after closing the main window, the openlierox process busy loops and sits using 100% CPU time, instead of exiting.


Version-Release number of selected component (if applicable):

openlierox-0.57-0.13.beta8.fc11.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Run a local game
2. Play for a few seconds
3. Quit the game. What the process with top
  
Actual results:

The process doesn't exit properly and busy loops. 

Expected results:

The game should exit correctly and not chew up CPU time.

Additional info:

During the game, even in local play you can see the following when running strace, which also causes the CPU to sit at 100%, despite the game not doing anything obvious:

select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\232%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\234%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\236%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\240%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\242%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\244%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
sendto(13, "\1\0\3\0\0\0"..., 6, 0, {sa_family=AF_INET, sin_port=htons(60308), sin_addr=inet_addr("127.0.0.1")}, 16) = 6                                                         
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\246%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, {0, 14000000}) = 0                                                                                                                                      
recvfrom(14, "\1\0\3\0\0\0"..., 4096, 0, {sa_family=AF_INET, sin_port=htons(23400), sin_addr=inet_addr("127.0.0.1")}, [16]) = 6                                                  
recvfrom(14, 0x8a4560, 4096, 0, 0x30ea808, 0x7fff76165678) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
sendto(14, "\3\0\1\0\0\0"..., 6, 0, {sa_family=AF_INET, sin_port=htons(23400), sin_addr=inet_addr("127.0.0.1")}, 16) = 6                                                         
recvfrom(13, "\3\0\1\0\0\0"..., 4096, 0, {sa_family=AF_INET, sin_port=htons(60308), sin_addr=inet_addr("127.0.0.1")}, [16]) = 6                                                  
recvfrom(13, 0x8a4560, 4096, 0, 0x2f492f8, 0x7fff761655c8) = -1 EAGAIN (Resource temporarily unavailable)                                                                        
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])                                                                                                     
writev(4, [{"\216\3\n\0\r\0\200\4\16\0\200\4\200\2\340\1\0\0\0\0\200\2\340\1\0\0\0\0\30\2\0\0\17"..., 44}, {NULL, 0}, {""..., 0}], 3) = 44                                       
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])                                                                                                           
read(4, "\1\1\250%\0\0\0\0Y\0\300\1\0\0\0\0\340\35\210\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 32                                                                                 
read(4, 0x2846eb4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
nanosleep({0, 1000000}, {0, 1000000})   = 0                                                                                                                                      
read(3, 0x283b034, 4096)                = -1 EAGAIN (Resource temporarily unavailable)                                                                                           
select(4, [3], NULL, NULL, {0, 0})      = 0 (Timeout)                                                                                                                            
nanosleep({0, 14000000}, ^C <unfinished ...>                                                                                                                                     
Process 5217 detached

Comment 1 Hans de Goede 2009-11-10 10:44:07 UTC
Sorry for the long silence, I cannot reproduce the hang on exit with F-12 (tried on various machines). So for this part this bug is: "Closed Current Release"

Please re-open if you still see this after updating to F-12.

As for the cpu usage during the game, unfortunately many games are programmed with busy loops causing them to chew up 100% cpu, although I agree this is less then ideal, I'm afraid I don't have the time to go and fix this.
So for this part this bug is: "Closed wontfix".


Note You need to log in before you can comment on or make changes to this bug.