unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs enters in a loop with emacsclient -t
@ 2013-03-03  4:07 Ashish SHUKLA
  2013-03-03 16:02 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Ashish SHUKLA @ 2013-03-03  4:07 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 5349 bytes --]

Hi,

I'm running Emacs trunk r111924 on FreeBSD 9.1-RC3 (amd64). When I connect to
Emacs session using 'emacsclient -t', I noticed flicker in xterm. I truss-ed
Emacs process, and it seems like it's sending same stuff in a loop which seems
to be causing what I noticed:

#v+
poll({4/POLLIN 3/POLLIN 10/POLLIN|POLLPRI 12/POLLIN|POLLPRI 13/POLLIN|POLLPRI 14/POLLIN|POLLPRI},6,0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGALRM,0x0)               = 0 (0x0)
clock_gettime(0,{1362281900.802196331 })         = 0 (0x0)
ktimer_settime(0x3,0x0,0x7fffffffc450,0x0,0x1,0x0) = 0 (0x0)
sigprocmask(SIG_UNBLOCK,SIGALRM,0x0)             = 0 (0x0)
clock_gettime(0,{1362281900.802263790 })         = 0 (0x0)
clock_gettime(0,{1362281900.802284794 })         = 0 (0x0)
clock_gettime(0,{1362281900.802304151 })         = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGIO|SIGWINCH,0x0)        = 0 (0x0)
write(23,"\^[[50d\^[[38;5;252m\^[[48;5;17m"...,330) = 330 (0x14a)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
write(23,"_error\^[[39;49m\^[[38;5;252m\^["...,202) = 202 (0xca)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,1024) = 1024 (0x400)
write(23,"[39;49m\^[[38;5;252m\^[[48;5;17m"...,143) = 143 (0x8f)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
write(23,"49m\^[[38;5;84m\^[[48;5;17mservn"...,487) = 487 (0x1e7)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
write(23,"                                "...,258) = 258 (0x102)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,880) = 880 (0x370)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,765) = 765 (0x2fd)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,822) = 822 (0x336)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,957) = 957 (0x3bd)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,153) = 153 (0x99)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,937) = 937 (0x3a9)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,576) = 576 (0x240)
sigprocmask(SIG_BLOCK,SIGIO|SIGWINCH,0x0)        = 0 (0x0)
sigprocmask(SIG_UNBLOCK,SIGIO|SIGWINCH,0x0)      = 0 (0x0)
poll({3/POLLIN|POLLOUT},1,-1)                    = 1 (0x1)
writev(0x3,0x7fffffffc100,0x3,0x0,0x0,0x0)       = 160 (0xa0)
read(3,0x14c802c,4096)                           ERR#35 'Resource temporarily unavailable'
poll({4/POLLIN 3/POLLIN 10/POLLIN|POLLPRI 12/POLLIN|POLLPRI 13/POLLIN|POLLPRI 14/POLLIN|POLLPRI},6,0) = 0 (0x0)
SIGNAL 23 (SIGIO)
poll({7/POLLIN 15/POLLIN 18/POLLIN},3,-1)        = 0 (0x0)
sigreturn(0x7fffffffb970,0x7fffffffb970,0x14e7400,0x0,0xfffffffffffffbd0,0x0) = 0 (0x0)
pselect(0x18,0x7fffffffca90,0x7fffffffca10,0x0,0x7fffffffcb30,0x0) = 0 (0x0)
ioctl(23,FIONREAD,0xffffb45c)                    = 0 (0x0)
read(3,0x14c802c,4096)                           ERR#35 'Resource temporarily unavailable'
poll({4/POLLIN 3/POLLIN 10/POLLIN|POLLPRI 12/POLLIN|POLLPRI 13/POLLIN|POLLPRI 14/POLLIN|POLLPRI},6,0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGALRM,0x0)               = 0 (0x0)
clock_gettime(0,{1362281900.813027951 })         = 0 (0x0)
ktimer_settime(0x3,0x0,0x7fffffffc450,0x0,0x1,0x0) = 0 (0x0)
sigprocmask(SIG_UNBLOCK,SIGALRM,0x0)             = 0 (0x0)
clock_gettime(0,{1362281900.813095081 })         = 0 (0x0)
clock_gettime(0,{1362281900.813115837 })         = 0 (0x0)
clock_gettime(0,{1362281900.813135194 })         = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGIO|SIGWINCH,0x0)        = 0 (0x0)
write(23,"\^[[50d\^[[38;5;252m\^[[48;5;17m"...,330) = 330 (0x14a)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
write(23,"_error\^[[39;49m\^[[38;5;252m\^["...,202) = 202 (0xca)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,1024) = 1024 (0x400)
write(23,"[39;49m\^[[38;5;252m\^[[48;5;17m"...,143) = 143 (0x8f)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
write(23,"49m\^[[38;5;84m\^[[48;5;17mservn"...,487) = 487 (0x1e7)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
write(23,"                                "...,258) = 258 (0x102)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,880) = 880 (0x370)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,765) = 765 (0x2fd)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,822) = 822 (0x336)
write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,957) = 957 (0x3bd)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,153) = 153 (0x99)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,937) = 937 (0x3a9)
write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,576) = 576 (0x240)
#v-

The flicker stops, when I focus the X11 frame, and do some activity there, and
resumes when I focus back to xterm.

Following is configure options:

--localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-m17n-flt --with-libotf --with-imagemagick --with-gsettings --with-gconf --with-xim --with-sound --with-dbus --with-xml2 --with-gnutls --with-acl --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=amd64-portbld-freebsd9.1 CFLAGS='-fstack-protector -g' CPPFLAGS='-I/usr/local/include' LDFLAGS=' -L/usr/local/lib -Wl,-rpath=/usr/local/lib'

I'm wondering if anyone else has noticed it, or know of a fix to the problem.

Thanks
-- 
Ashish SHUKLA

“We've so many people in India, that we're able to route each network packet
manually.” (nobotz)

Sent from my Emacs

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emacs enters in a loop with emacsclient -t
  2013-03-03  4:07 Emacs enters in a loop with emacsclient -t Ashish SHUKLA
@ 2013-03-03 16:02 ` Eli Zaretskii
  2013-03-03 22:09   ` Ashish SHUKLA
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2013-03-03 16:02 UTC (permalink / raw)
  To: Ashish SHUKLA; +Cc: emacs-devel

> From: wahjava.ml@gmail.com (Ashish SHUKLA)
> Date: Sun, 03 Mar 2013 09:37:15 +0530
> 
> I'm running Emacs trunk r111924 on FreeBSD 9.1-RC3 (amd64). When I connect to
> Emacs session using 'emacsclient -t', I noticed flicker in xterm. I truss-ed
> Emacs process, and it seems like it's sending same stuff in a loop which seems
> to be causing what I noticed:

Thanks.

First, please post this to bug-gnu-emacs@gnu.org, using the Emacs
command report-emacs-bug.  That way, this issue and all the ensuing
discussions are recorded and tracked by the Emacs bug tracker.

And second, please accompany such data with snapshots of the Emacs
frame and description of what was displayed and which mode(s) were in
effect in the displayed windows, when you collected the truss data.
Without this information, the truss data is useless, as it doesn't
even say enough to understand which part(s) of the display are being
redrawn and cause the flicker.

> write(23,"\^[[50d\^[[38;5;252m\^[[48;5;17m"...,330) = 330 (0x14a)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
> write(23,"_error\^[[39;49m\^[[38;5;252m\^["...,202) = 202 (0xca)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,1024) = 1024 (0x400)
> write(23,"[39;49m\^[[38;5;252m\^[[48;5;17m"...,143) = 143 (0x8f)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
> write(23,"49m\^[[38;5;84m\^[[48;5;17mservn"...,487) = 487 (0x1e7)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
> write(23,"                                "...,258) = 258 (0x102)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,880) = 880 (0x370)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,765) = 765 (0x2fd)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,822) = 822 (0x336)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,957) = 957 (0x3bd)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,153) = 153 (0x99)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,937) = 937 (0x3a9)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,576) = 576 (0x240)

See, all I can say given this is that you use xterm-256, and here
Emacs is redrawing something like 11 lines with background color 17
and foreground color 252.  I see some small parts of text, like
"_error" and "servn", but that is not enough to understand what is
going on.

> write(23,"\^[[50d\^[[38;5;252m\^[[48;5;17m"...,330) = 330 (0x14a)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
> write(23,"_error\^[[39;49m\^[[38;5;252m\^["...,202) = 202 (0xca)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,1024) = 1024 (0x400)
> write(23,"[39;49m\^[[38;5;252m\^[[48;5;17m"...,143) = 143 (0x8f)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
> write(23,"49m\^[[38;5;84m\^[[48;5;17mservn"...,487) = 487 (0x1e7)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
> write(23,"                                "...,258) = 258 (0x102)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,880) = 880 (0x370)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,765) = 765 (0x2fd)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,822) = 822 (0x336)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,957) = 957 (0x3bd)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,153) = 153 (0x99)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,937) = 937 (0x3a9)
> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,576) = 576 (0x240)

Here the same stuff is being redrawn, some 13 milliseconds after the
previous redisplay.

That's all I can deduce from this data.  Maybe someone else can see
what I cannot.

> The flicker stops, when I focus the X11 frame, and do some activity there, and
> resumes when I focus back to xterm.

Was the stuff shown in the X11 frame related in any way to what was
shown in the xterm frame?  Like the same buffer, perhaps?

> I'm wondering if anyone else has noticed it, or know of a fix to the problem.

I think we are very far from understanding this problem, let alone
find a solution for it.  Providing the missing information (as a bug
report) would be a good first step forward.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emacs enters in a loop with emacsclient -t
  2013-03-03 16:02 ` Eli Zaretskii
@ 2013-03-03 22:09   ` Ashish SHUKLA
  0 siblings, 0 replies; 3+ messages in thread
From: Ashish SHUKLA @ 2013-03-03 22:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 5447 bytes --]

Hi,

On Sun, 03 Mar 2013 18:02:13 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> From: wahjava.ml@gmail.com (Ashish SHUKLA)
>> Date: Sun, 03 Mar 2013 09:37:15 +0530
>> 
>> I'm running Emacs trunk r111924 on FreeBSD 9.1-RC3 (amd64). When I connect to
>> Emacs session using 'emacsclient -t', I noticed flicker in xterm. I truss-ed
>> Emacs process, and it seems like it's sending same stuff in a loop which seems
>> to be causing what I noticed:

> Thanks.

> First, please post this to bug-gnu-emacs@gnu.org, using the Emacs
> command report-emacs-bug.  That way, this issue and all the ensuing
> discussions are recorded and tracked by the Emacs bug tracker.

I posted to list via M-x report-emacs-bug few hours ago, but it never showed
up, though it left my MTA.

#v+
Mar  3 19:20:21 arati postfix/smtp[31792]: B2235661: to=<bug-gnu-emacs@gnu.org>, relay=eggs.gnu.org[208.118.235.92]:25, delay=5.7, delays=0.24/0/2.2/3.3, dsn=2.0.0, status=sent (250 OK id=1UCESO-0003OD-Ej)
#v-

Anyways, in the debbug report, I mentioned following steps to reproduce with
emacs -Q:

1. Start Emacs: emacs -Q
2. Start Emacs server: M-x server-start
3. Start emacsclient: emacsclient -t
4. Do C-x C-f, and minibuffer prompt shows up.

And xterm window starts flickering, press C-g and it'll stop.

Now open any file in 'emacsclient', it'll work fine. Focus to X11 frame, and
focus back to xterm running 'emacsclient' session, and press any key. xterm
will start flickering again. Press C-g and it'll stop flickering.

> And second, please accompany such data with snapshots of the Emacs
> frame and description of what was displayed and which mode(s) were in
> effect in the displayed windows, when you collected the truss data.
> Without this information, the truss data is useless, as it doesn't
> even say enough to understand which part(s) of the display are being
> redrawn and cause the flicker.

Whole of the window frame is being redrawn, from menu-bar to minibuffer. And
this happens irrespective of what modes/buffers are active in tty/X11 frames.

>> write(23,"\^[[50d\^[[38;5;252m\^[[48;5;17m"...,330) = 330 (0x14a)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
>> write(23,"_error\^[[39;49m\^[[38;5;252m\^["...,202) = 202 (0xca)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,1024) = 1024 (0x400)
>> write(23,"[39;49m\^[[38;5;252m\^[[48;5;17m"...,143) = 143 (0x8f)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
>> write(23,"49m\^[[38;5;84m\^[[48;5;17mservn"...,487) = 487 (0x1e7)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
>> write(23,"                                "...,258) = 258 (0x102)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,880) = 880 (0x370)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,765) = 765 (0x2fd)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,822) = 822 (0x336)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,957) = 957 (0x3bd)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,153) = 153 (0x99)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,937) = 937 (0x3a9)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,576) = 576 (0x240)

> See, all I can say given this is that you use xterm-256, and here
> Emacs is redrawing something like 11 lines with background color 17
> and foreground color 252.  I see some small parts of text, like
> "_error" and "servn", but that is not enough to understand what is
> going on.

Right.

>> write(23,"\^[[50d\^[[38;5;252m\^[[48;5;17m"...,330) = 330 (0x14a)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
>> write(23,"_error\^[[39;49m\^[[38;5;252m\^["...,202) = 202 (0xca)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,1024) = 1024 (0x400)
>> write(23,"[39;49m\^[[38;5;252m\^[[48;5;17m"...,143) = 143 (0x8f)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
>> write(23,"49m\^[[38;5;84m\^[[48;5;17mservn"...,487) = 487 (0x1e7)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,1024) = 1024 (0x400)
>> write(23,"                                "...,258) = 258 (0x102)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,880) = 880 (0x370)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    h"...,765) = 765 (0x2fd)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,822) = 822 (0x336)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m    "...,957) = 957 (0x3bd)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,153) = 153 (0x99)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,937) = 937 (0x3a9)
>> write(23,"\n\^[[38;5;252m\^[[48;5;17m     "...,576) = 576 (0x240)

> Here the same stuff is being redrawn, some 13 milliseconds after the
> previous redisplay.

> That's all I can deduce from this data.  Maybe someone else can see
> what I cannot.

>> The flicker stops, when I focus the X11 frame, and do some activity there, and
>> resumes when I focus back to xterm.

> Was the stuff shown in the X11 frame related in any way to what was
> shown in the xterm frame?  Like the same buffer, perhaps?

Replied above.

Also this doesn't happen when emacs is started with '-nw'.

Let me know if you need more information.

Thanks
-- 
Ashish SHUKLA

“If tempted by something that feels "altruistic," examine your motives and root
out that self-deception. Then, if you still want to do it, wallow in it!”
(Robert A. Heinlein, 1973)

Sent from my Emacs

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-03 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03  4:07 Emacs enters in a loop with emacsclient -t Ashish SHUKLA
2013-03-03 16:02 ` Eli Zaretskii
2013-03-03 22:09   ` Ashish SHUKLA

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).