Oolite Bulletins

For information and discussion about Oolite.
It is currently Mon Dec 18, 2017 6:29 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Aug 04, 2009 6:46 am 
Offline
Dangerous
Dangerous
User avatar

Joined: Fri Jul 24, 2009 5:17 pm
Posts: 75
Location: 45.371747 N, 12.011885 E - Sol III
I found by change a black magic nasty behaviour.

Background information:

I sometimes need to stop oolite without closing the program (pause still eats CPU), I usually start oolite from the WindowMaker menu so I can't type ^Z and suspend it.

I tried to use STOP and CONT signals: first a grep on ps output to find the oolite pid, then a 'kill -s(STOP|CONT)' to that process to stop/restart the program.

Since I am lazy, I decided to write this small script
Code:
#!/bin/sh

kill -s STOP `ps -fu $LOGNAME | grep oolite | grep -v grep | awk '{ print $2 }'`
with a dual script that sends the CONT signal. Yes, I know, I should have written a single script either checking $0 or accepting an option for start and stop. But that's not the point.

The point is that it seems that there's a lock somewhere that cause oolite and X11 to deadlock. I thought it was due oolite log going to the console, but got the freeze with an oolite instance launched from the terminal.

The black magic is that if I find the pid with a grep
Code:
ps -fu saint | grep oolite
and then I type
Code:
kill -s STOP /the pid I got with the previous command/
everything works fine....

_________________
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.


Top
   
 Post subject:
PostPosted: Tue Aug 04, 2009 3:47 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Mon Jul 06, 2009 11:12 pm
Posts: 319
Location: Uncharted backwaters of the unfashionable end of the western spiral arm
Hm, in case there's something strange with using backquotes... have you tried using
Code:
killall -S STOP oolite
instead of the grep and awk?


Top
   
 Post subject:
PostPosted: Thu Aug 06, 2009 9:06 am 
Offline
Dangerous
Dangerous
User avatar

Joined: Fri Jul 24, 2009 5:17 pm
Posts: 75
Location: 45.371747 N, 12.011885 E - Sol III
Quote:
Hm, in case there's something strange with using backquotes... have you tried using
Code:
killall -S STOP oolite
instead of the grep and awk?
Not killall, but pkill yes, and does not freeze. BLACK MAGIC???!!!
Nope. If I substitute 'kill' with /bin/kill and DO NOT attempt to log kill execution, it does not freeze. If I try to log /bin/kill execution with something like >> file 2>>&1 ... freeze

pkill does not suffer of this problem. And that's enought for me, I have no resource to investigate this interesting magic anymore :(. Maybe in the forthcoming holidays...

_________________
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.


Top
   
 Post subject:
PostPosted: Thu Aug 06, 2009 1:33 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Mon Jul 06, 2009 11:12 pm
Posts: 319
Location: Uncharted backwaters of the unfashionable end of the western spiral arm
Maybe something wants input and stops because it isn't on an interactive session?


Top
   
 Post subject:
PostPosted: Thu Aug 06, 2009 1:42 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Fri Jul 24, 2009 5:17 pm
Posts: 75
Location: 45.371747 N, 12.011885 E - Sol III
Sounds more a deadlock. If I send a sigkill or sigcont to oolite (that is: if I kill the program or send it the "continue processing" signal) X11 unfreezes.

When i say that it freezes I mean that It does not listen to event, the mouse fozen on its tracks, and freezes all output, i.e. the little animations in the dock freeze still.

_________________
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited