We're trying to track down a regression that occurs when using
Quicktime in conjunction with Netscape 4.72.  It works
on X 3.3.6, but fails on 4.1.0.

The failure behavior is that Netscape, while loading a
web page with Quicktime content, goes into a nearly
infinite spin loop, calling select() again and
again.  The socket it is calling select
on is connected to /tmp/.X11-unix/X0.

An strace of the app as it runs sheds some clues,
but I was hoping to ask for further help from
the experts.

Specifically, the behavior is that we see a
write() to the X socket which returns an
EAGAIN.  Now, when I run strace on other,
success, cases, I never see a write() return
EAGAIN (I only see writev return EAGAIN).  Shortly after
the write() occurs, the app goes into the
select() spin loop.

I was hoping to ask for help in several ways.
First, as a newbie to this list, please feel free to correct me.
If I should post elsewhere, or if there is a FM I should
go read; I will cheerfully go off and do more
homework.

Second, I was hoping to get help pinpointing
where in the source a write() to the
socket with a potentially buggy EAGAIN
handler might be, so I can see if I can
spot a bug.  To that end, I was hoping someone
could teach me how to decode the X protocol.

I have from the strace log the header of the
request written, but I don't know how to decode it;
again, I'd appreciate pointers to TFM or 
source code.

I have attached the relevant fragment of the
strace log; the write call in particular is
on line 5 (you can see the select() spin loop
starting at line 27).

Thanks for any help you can offer,

Jeremy
22:11:59.894949 writev(9, 
[{"H\2\226\f\10\7@\0030\7@\3\206\0\30\0\0\0\230\0\0\30@\3"..., 24}, 
{"\17\2\0\0gB\26\0\200M\7\0\202V\17\0\200Z\f\0\216a\0\0\227"..., 12864}], 2) = 12888
22:11:59.895374 gettimeofday({1013573519, 895422}, NULL) = 0
22:11:59.895478 gettimeofday({1013573519, 895510}, NULL) = 0
22:11:59.895581 ioctl(9, FIONREAD, [0]) = 0
22:11:59.895666 write(9, "<\2\2\0\22\7@\0037\7\4\0?\7@\3\237\4@\3\0\0\0\0;\3\5\0"..., 
72) = -1 EAGAIN (Resource temporarily unavailable)
22:11:59.895790 oldselect(10, [9], [9], NULL, {0, 0}) = 0 (Timeout)
22:11:59.895976 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
22:11:59.896065 gettimeofday({1013573519, 896096}, NULL) = 0
22:11:59.896141 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
22:11:59.896256 rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0
22:11:59.896363 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
22:11:59.896523 oldselect(10, [9], [9], NULL, {0, 0}) = 0 (Timeout)
22:11:59.896723 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
22:11:59.896810 gettimeofday({1013573519, 896840}, NULL) = 0
22:11:59.896885 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
22:11:59.896978 rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0
22:11:59.897076 oldselect(10, [9], [9], NULL, {86400, 0}) = 1 (out [9], left {86399, 
990000})
22:11:59.902300 gettimeofday({1013573519, 902353}, NULL) = 0
22:11:59.902406 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
22:11:59.902501 gettimeofday({1013573519, 902532}, NULL) = 0
22:11:59.902691 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
22:11:59.902788 gettimeofday({1013573519, 902821}, NULL) = 0
22:11:59.902867 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
22:11:59.902957 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
22:11:59.903037 gettimeofday({1013573519, 903066}, NULL) = 0
22:11:59.903110 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
22:11:59.903199 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.903488 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.903767 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.904043 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.904318 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.904593 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.904927 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.905207 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.905487 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.905763 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.906036 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.906315 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.906591 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.906864 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.907144 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.907420 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.907694 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.907972 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.908462 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.908750 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.909028 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.909304 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.909581 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.909858 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.910135 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.910411 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.910688 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.910964 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.911241 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.911517 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.911794 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.912070 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.912348 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.912625 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.912903 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.913179 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.913456 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.913733 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.914010 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.914287 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.914563 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.914840 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.915117 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.915393 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.915670 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.915946 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.916224 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.916500 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.916777 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.917053 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.917330 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.917606 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.917883 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.918196 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.918476 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.918756 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.919068 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.919348 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.919626 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.919905 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.920181 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.920459 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.920735 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.921012 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.921289 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.921568 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.921843 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.922120 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.922400 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.922673 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.922952 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.923229 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.923508 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.923784 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.924059 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.924336 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.924613 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.924891 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.925171 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.925444 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.925722 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.925999 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.926278 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.926554 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.926830 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.927109 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.927384 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.927663 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.927938 oldselect(10, [9], [9], NULL, {0, 0}) = 2 (in [9], out [9], left {0, 
0})
22:11:59.940626 --- SIGALRM (Alarm clock) ---
22:11:59.940721 gettimeofday({1013573519, 940761}, NULL) = 0
22:11:59.940811 sigreturn()             = ? (mask now [])
22:11:59.940927 ioctl(9, FIONREAD, [160]) = 0
22:11:59.941015 read(9, 
"\16fA+\237\4@\3\0\0>\10\360y\300\0104\371\377\277\233\331"..., 160) = 160
22:11:59.941149 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.941434 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})
22:11:59.941714 oldselect(10, [9], [9], NULL, {0, 0}) = 1 (out [9], left {0, 0})

Reply via email to