Re: [Xquartz-dev] Time Machine Backup Alert
Yeah, there's not much that we can do about that (that I'm aware of)...
Perhaps this is the "correct" behavior, but I found it disturbing to be suddenly taken from an Inkscape window on my root-screen to a Time Machine backup alert window (ie, I haven't backed up in ten days---bad) on my Desktop.
I find that several times a day my system switches from the X screen to the Apple screen for a fraction of a second - just long enough to lose a few keystrokes and turn "rm -rf /tmp/t" into "rm -rf /" (no, that hasn't really happened, but less drastic things have). Unfortunately it's too quick for me to be able to see any clue as to which program is causing it. -- Richard -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
Yes, this happen to me with about the same frequency. I think Jeremy is aware of the issue, and has promised a beer (or case of) to anyone who can figure it out. On Jan 6, 2009, at 10:35 AM, Richard Tobin wrote:
Yeah, there's not much that we can do about that (that I'm aware of)...
Perhaps this is the "correct" behavior, but I found it disturbing to be suddenly taken from an Inkscape window on my root-screen to a Time Machine backup alert window (ie, I haven't backed up in ten days---bad) on my Desktop.
I find that several times a day my system switches from the X screen to the Apple screen for a fraction of a second - just long enough to lose a few keystrokes and turn "rm -rf /tmp/t" into "rm -rf /" (no, that hasn't really happened, but less drastic things have).
Unfortunately it's too quick for me to be able to see any clue as to which program is causing it.
-- Richard
-- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
Richard Tobin <richard@inf.ed.ac.uk> writes:
I find that several times a day my system switches from the X screen to the Apple screen for a fraction of a second - just long enough to lose a few keystrokes and turn "rm -rf /tmp/t" into "rm -rf /" (no, that hasn't really happened, but less drastic things have).
I wonder whether this is the same momentary-loss-of-focus issue that I've been griping of for awhile. I don't use full-screen mode but the loss of a few keystrokes seems about the same. I've been able to correlate some of the events with iCal alarms (they consistently happen 1 minute before an iCal alarm is due) and I suspect that Time Machine wakeups may cause it too. regards, tom lane
On Tue, Jan 6, 2009 at 10:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
I wonder whether this is the same momentary-loss-of-focus issue that I've been griping of for awhile. I don't use full-screen mode but the loss of a few keystrokes seems about the same. I've been able to correlate some of the events with iCal alarms (they consistently happen 1 minute before an iCal alarm is due) and I suspect that Time Machine wakeups may cause it too.
Hi Tom -- nice to see you here -- it's a small planet! It may be the same issue, or it may be part of a more general issue, I suspect. I'm not receiving alerts from Time Machine (the external disk is not connected), and I have no alarms set in iCal, and I have not so far lost a keystroke, but I often lose pointer events when I draw in gimp. That shows as gaps in continuous lines. Sometimes, there's just a delay (the line remains continuous, but the rendering is delayed) but more often, it's a total loss of events -- sometimes up to 1/2-second's worth of stylus motion is not reported to gimp. That is not as disastrous as when your command is truncated to 'rm -rf /', but annoying nonetheless. I couldn't correlate that wit anything outside X11, but I often hear the disk head jolt at the same time when my stylus events are stolen. But it does seem to correlate with another annoying artifact we've been discussing. I don't have enough data to make any inference, but already 5 times during a short session, the drop-outs in stylus events were immediately followed by the 100%-CPU idling Christof and I reported earlier. This time I was able to sample it (attached). Unlike in rc3, in which I was not able to bring it back to normal once it got into that hot-idling mode, in 2.3.2.1, It resumes normal behavior after I transfer focus to it or do something in gimp (I have no other X11 clients running at the moment). In one instance, the act of sampling seemed to have flicked it back to normal -- which makes me wonder whether it is even possible to sample this condition accurately. Regards, --Gene
Hi Gene, Thanks for the samples. Unfortunately, your hunch seems to be correct in that the samples reveal a lot of X11 waiting patiently and not much activity. The only thing I can think of is that somehow the select, __semwait_signal, or mach_msg_trap is causing something to go awry in kernel space, but I'd expect other apps to show this and not just X11 if that was the case... have you seen this with other apps? Does it happen only when using your stylus? On Jan 7, 2009, at 12:25, Gene Selkov wrote:
On Tue, Jan 6, 2009 at 10:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
I wonder whether this is the same momentary-loss-of-focus issue that I've been griping of for awhile. I don't use full-screen mode but the loss of a few keystrokes seems about the same. I've been able to correlate some of the events with iCal alarms (they consistently happen 1 minute before an iCal alarm is due) and I suspect that Time Machine wakeups may cause it too.
Hi Tom -- nice to see you here -- it's a small planet!
It may be the same issue, or it may be part of a more general issue, I suspect. I'm not receiving alerts from Time Machine (the external disk is not connected), and I have no alarms set in iCal, and I have not so far lost a keystroke, but I often lose pointer events when I draw in gimp. That shows as gaps in continuous lines. Sometimes, there's just a delay (the line remains continuous, but the rendering is delayed) but more often, it's a total loss of events -- sometimes up to 1/2-second's worth of stylus motion is not reported to gimp. That is not as disastrous as when your command is truncated to 'rm -rf /', but annoying nonetheless.
I couldn't correlate that wit anything outside X11, but I often hear the disk head jolt at the same time when my stylus events are stolen.
But it does seem to correlate with another annoying artifact we've been discussing.
I don't have enough data to make any inference, but already 5 times during a short session, the drop-outs in stylus events were immediately followed by the 100%-CPU idling Christof and I reported earlier.
This time I was able to sample it (attached). Unlike in rc3, in which I was not able to bring it back to normal once it got into that hot-idling mode, in 2.3.2.1, It resumes normal behavior after I transfer focus to it or do something in gimp (I have no other X11 clients running at the moment). In one instance, the act of sampling seemed to have flicked it back to normal -- which makes me wonder whether it is even possible to sample this condition accurately.
Regards,
--Gene <X11.bin_19787.R8RAZQ.sample.txt><Sample of X11-1.txt>_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
Jeremy, Please pardon my ignorance, but if it is waiting patiently, why is the CPU time counted and the fan is blowing at full speed? I would understand if it were wating in its own loop, but this is a unix. Maybe we have found a bug in darwin?
have you seen this with other apps?
No, I haven't seen this with other apps, but I don't run too many. Other than firefox and emacs-app, I hardly use anything on this mac; occasionally I run Apple utilities, such as (now very useful) Activity Monitor. I mostly use this machine as a terminal and a drawing pad. I use it as a computer, too, but my computation does not involve GUI, so I cannot tell. Negative, based on whatever little I have seen.
Does it happen only when using your stylus?
No, it happens without the stylus attached. Gimp skips mouse events just as well. On the account of the lost events, I have just tried the stylus with Ink, and it works smoothly, even if I write extremely quickly. So I don't think the events are lost in the kernel space. I've made a couple more experiments since my last message. First, I tried to attach gdb to it, in the hope that I could stop it inside one of those crazy idle loops and get a meaningful backtrace. Guess what. It didn't do that with gdb attached. Almost as soon as I detached gdb, the same X11.bin went crazy again. While in gdb, I could work normally without any perceptible impediment, except gimp was missing the pointer events (from the stylus, as well as the mouse). Then I randomly fooled around with it, hoping to find a trigger for this behavior. 4 times in a row, it started at the same moment the screen timed out and turned off. I could hear the fan kick into high speed seconds later, and found that X11.bin was at 100% by logging in from another machine (without touching the keys). I had almost finished typing the announcement of this finding, when I noticed that the 5th screen time-out experiment turned out negative, and so did the 6th and the 7th. So seemed to be the 8th, but then I left for 30 minutes without touching it, and when I came back, X11.bin was again spinning the fan. So I am still not sure whether there is a reliable way to reproduce it, but statistically, this has been a likely sequence: 1. Start X11 2. Start gimp and do something in it. 3. Switch to another app for a while. Even transferring focus to Activity Monitor may be enough. Sometims it takes only 10-15 seconds to activate the fan; sometimes multiple minutes, and almost as often as not, nothing will happen during a very long time. 4. But if it does happen, any activity in gimp or any other X11 client brings it back to normal. Until it loses focus or until the screen turns off, in which case the high idle is likely to occur again. Returning to normal seems to be new in 2.3.2.1. In rc3 and rc4, I had to restart the machine (another fact suggestive of a kernel-space problem). By the way, when it does this, ps shows it as running (as does Activity Monitor): 35884 ?? R 20:49.98 /Applications/Utilities/X11.app/Contents/MacOS/X11.bin -psn_0_3273503 35897 ?? S 0:00.05 /usr/X11/bin/xterm 35898 ?? S 0:00.02 /bin/sh /usr/X11/bin/startx 35964 ?? S 0:00.01 /usr/X11/bin/xinit /usr/X11/lib/X11/xinit/xinitrc -- /usr/X11/bin/X :0 -nolisten tcp -auth /Users/selkovjr/.serverauth.35898 35968 ?? S 0:00.00 /usr/X11/bin/X :0 -nolisten tcp -auth /Users/selkovjr/.serverauth.35898 Attaching gdb as an anchor to lull it could be a fine hack, but it doesn't solve the event-skipping problem in gimp, which makes it useless as a drawing tool. That may very well be a bug in gimp, and I was going to set off in that direction, but Tom's observation of missing keystrokes made me think again. Is it possible that something is broken where all events are handled? Also, the same version of gimp and the same tablet work fine with the recent Xorg in linux. How much code does that isolate as suspect? Thanks, --Gene
Sorry for driving this thread away from where it started (we should probably continue under the 100% CPU heading), but this is just a supplement for my observations about triggers, so you has as complete a picture as possible. I was performing that trap sequence again, just to gauge how reliable it is. Scribbled in gimp Switched to Activity Monitor. Waited 5 minutes -- nothing happened The screen went blank and stayed blank for 40 minutes -- nothing happened I thought it was one of those failed experiments, and was about to start a new one. Then, I touch the key on the keyboard, the screen lights up, and the first thing I see is CPU load for X11.bin going from near 0 to 100% I've been bumbling around with this long enough to assert this was not random. The likelihood of coincidence was near zero, especially if you consider what happened next. Next, I began typing this message on another machine. The screen on the mac went blank again (I set it to turn itself off in 1 minute), and X11.bin continued to run 100%. I did not change focus -- Activity Monitor still has it -- I just woke up the streen, and now it turned itself off on its own, and could hear the fan and saw X11.bin at 100% from this other machine. Then, as I was about to finish what I was going to say about X11 going nuts with the screen turning on as well as turning off, I touched the key again and the screen lit up. X11 stopped spinning -- the effect I could so far achieve only by touching one of the X11 clients. I don't know if this makes the picture more clear or muddies it even further, but now it's a more complete picture. These machines have become as complex as all things in Nature. ... At this point, a friend sent a message to my skype on the mac (I heard a beep), making me touch the screen, which went blank a few minutes ago, and we're at 100% again. The trigger is not random. Access to it may be. ... many minutes and serveral screen-blanking cycels later, X11 is still running at 100%. I avoided touching it. So the conclusion for now is that the condition is stable, but can be disrupted by activity in X11. It can also be disrupted by other things (such as screen turning off or on). And it can also be precipitated by the same events, except for normal user events in X11, which only disrupt it. I don't know what to think. Must call it a day. --Gene
I just noticed the same loss-of-focus, and it was about a minute before an iCal reminder popped up. I think this might be at least somewhat related to applescripted events. A while ago I figured out that I was causing myself this problem with a background applescript I had running -- if I would "tell Finder" to do something, even if I didn't activate it first, the applescript engine (or Finder itself?) would steal the focus from my X11 window. I wonder if the iCal reminder stuff is applescript-driven? - Brian On Wed, Jan 7, 2009 at 3:25 PM, Gene Selkov selkovjr-at-......... |Xquartz-dev/personal| <...> wrote:
On Tue, Jan 6, 2009 at 10:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
I wonder whether this is the same momentary-loss-of-focus issue that I've been griping of for awhile. I don't use full-screen mode but the loss of a few keystrokes seems about the same. I've been able to correlate some of the events with iCal alarms (they consistently happen 1 minute before an iCal alarm is due) and I suspect that Time Machine wakeups may cause it too.
Hi Tom -- nice to see you here -- it's a small planet!
It may be the same issue, or it may be part of a more general issue, I suspect. I'm not receiving alerts from Time Machine (the external disk is not connected), and I have no alarms set in iCal, and I have not so far lost a keystroke, but I often lose pointer events when I draw in gimp. That shows as gaps in continuous lines. Sometimes, there's just a delay (the line remains continuous, but the rendering is delayed) but more often, it's a total loss of events -- sometimes up to 1/2-second's worth of stylus motion is not reported to gimp. That is not as disastrous as when your command is truncated to 'rm -rf /', but annoying nonetheless.
I couldn't correlate that wit anything outside X11, but I often hear the disk head jolt at the same time when my stylus events are stolen.
But it does seem to correlate with another annoying artifact we've been discussing.
I don't have enough data to make any inference, but already 5 times during a short session, the drop-outs in stylus events were immediately followed by the 100%-CPU idling Christof and I reported earlier.
This time I was able to sample it (attached). Unlike in rc3, in which I was not able to bring it back to normal once it got into that hot-idling mode, in 2.3.2.1, It resumes normal behavior after I transfer focus to it or do something in gimp (I have no other X11 clients running at the moment). In one instance, the act of sampling seemed to have flicked it back to normal -- which makes me wonder whether it is even possible to sample this condition accurately.
Regards,
--Gene
_______________________________________________ Xquartz-dev mailing list Xquartz-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev
participants (6)
-
Brian Bender
-
Gene Selkov
-
Jeremy Huddleston
-
Louis Zulli
-
Richard Tobin
-
Tom Lane