Re: assertion error "PRI(owl) >= priority" otp.c line 248

Rhialto <[email protected]>
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <[email protected]>
On Thu 11 Jul 2019 at 20:15:36 +0200, Rhialto wrote:
> Indeed, I can't reproduce it anymore now with this scenario. I'm pretty
> sure it is the same bug that happened "randomly" before.

but I did find some other scenario that does weird things :-(

It's not an OTP assertion failure but some sort of loop or deadlock or
something.

Scenario: start with fullscreen Xine ("F"), with open on top of that its
Panel window ("P) with its Navigator side-window ("N") with even more
DVD controls. In Xine's Panel you get that window if you click the N in
its bottom right. The problem does not occur without N.

Now, maybe first some focussing on N and P might be needed, or maybe it
is not required. Then with the mouse on F, hit the "f" key to switch
from fullscreen to a normal window.

Now ctwm freezes. F and N get un-painted, but F doesn't change and in
fact no other events seem to have any effect.

I have ctwm running in gdb and that shows nothing weird. But if I
interrupt it and get a stack trace, it is in a location where it ought
not be very long ever (NetBSD now ships with debugging symbols for all
system libraries and programs, so even within X libs there is useful
info):

(gdb) run --replace
Starting program: /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/build/ctwm --replace
load: 0.21  cmd: ctwm 1719 [select] 0.18u 0.22s 0% 3580k

Program received signal SIGINFO, Information request.
0x000076704223e28a in poll () from /usr/lib/libc.so.12
(gdb) bt
#0  0x000076704223e28a in poll () from /usr/lib/libc.so.12
#1  0x0000767041e18b91 in _xcb_conn_wait (c=c@entry=0x76704451f000, 
    cond=cond@entry=0x767044520128, vector=vector@entry=0x7f7fff5f9c78, 
    count=count@entry=0x7f7fff5f9c74)
    at /usr/xsrc/external/mit/libxcb/dist/src/xcb_conn.c:479
#2  0x0000767041e16517 in _xcb_out_send (c=c@entry=0x76704451f000, 
    vector=vector@entry=0x7f7fff5f9cf0, count=count@entry=3)
    at /usr/xsrc/external/mit/libxcb/dist/src/xcb_out.c:458
#3  0x0000767041e16588 in xcb_writev (c=c@entry=0x76704451f000, 
    vector=vector@entry=0x7f7fff5f9cf0, count=count@entry=3, 
    requests=requests@entry=819)
    at /usr/xsrc/external/mit/libxcb/dist/src/xcb_out.c:406
#4  0x0000767043e48f76 in _XSend (dpy=dpy@entry=0x76704451d000, data=data@entry=0x0, 
    size=size@entry=0) at /usr/xsrc/external/mit/libX11/dist/src/xcb_io.c:486
#5  0x0000767043e49272 in _XFlush (dpy=0x76704451d000)
    at /usr/xsrc/external/mit/libX11/dist/src/xcb_io.c:503
#6  0x0000767043e6da55 in _XGetRequest (dpy=dpy@entry=0x76704451d000, 
    type=type@entry=12 '\f', len=len@entry=12)
    at /usr/xsrc/external/mit/libX11/dist/src/XlibInt.c:1707
#7  0x0000767043e290b5 in XConfigureWindow (dpy=0x76704451d000, w=16777841, 
    mask=mask@entry=96, changes=changes@entry=0x7f7fff5f9e00)
    at /usr/xsrc/external/mit/libX11/dist/src/ReconfWin.c:48
#8  0x00000000004220d3 in InsertOwlAbove (owl=0x767044583a40, other_owl=0x767044583a10)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:483
#9  0x000000000042420d in OtpFocusWindowBE (oldprio=<optimized out>, 
    twm_win=0x767044540c00, twm_win=0x767044540c00)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:1675
#10 0x00000000004242b3 in OtpFocusWindow (twm_win=twm_win@entry=0x767044540c00)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:1718
#11 0x000000000042f8de in SetFocus (tmp_win=0x767044540c00, tim=<optimized out>)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/win_ops.c:171
#12 0x00000000004096b0 in HandleEnterNotify ()
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/event_handlers.c:3304
#13 0x0000000000408804 in DispatchEvent ()
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/event_core.c:331
#14 0x0000000000408aa8 in HandleEvents ()
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/event_core.c:203
#15 0x0000000000407eff in ctwm_main (argc=<optimized out>, argv=<optimized out>)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/ctwm_main.c:1055
#16 0x00000000004061ab in ___start ()
#17 0x00007670449ed000 in ?? ()
#18 0x0000000000000002 in ?? ()
#19 0x00007f7fff5fa838 in ?? ()
#20 0x00007f7fff5fa86e in ?? ()
#21 0x0000000000000000 in ?? ()
(gdb)

Maybe the XConfigureWindow() call has some impossible arguments that are
not caught in Xlib? It looks like a reply never arrives, or maybe there
is a loop of some kind. 

One time I caught it at

(gdb) run
Starting program: /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/build/ctwm 
load: 0.86  cmd: ctwm 2269 [0x421e16/0] 0.13u 0.09s 0% 3588k

Program received signal SIGINFO, Information request.
XFindContext (display=0x768b6991d000, rid=27264372, context=-1, 
    data=data@entry=0x7f7fff372c38)
    at /usr/xsrc/external/mit/libX11/dist/src/Context.c:252
252     /usr/xsrc/external/mit/libX11/dist/src/Context.c: No such file or directory.
(gdb) bt
#0  XFindContext (display=0x768b6991d000, rid=27264372, context=-1, 
    data=data@entry=0x7f7fff372c38)
    at /usr/xsrc/external/mit/libX11/dist/src/Context.c:252
#1  0x0000000000432cdc in GetTwmWindow (w=<optimized out>)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/win_utils.c:195
#2  0x0000000000421e8f in OwlEffectivePriority (owl=owl@entry=0x768b69983a40)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:1797
#3  0x0000000000422030 in InsertOwlAbove (owl=0x768b69983a10, other_owl=0x768b69983a40)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:458
#4  0x000000000042420d in OtpFocusWindowBE (oldprio=<optimized out>, 
    twm_win=0x768b69940c00, twm_win=0x768b69940c00)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:1675
#5  0x00000000004242b3 in OtpFocusWindow (twm_win=twm_win@entry=0x768b69940c00)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/otp.c:1718
#6  0x000000000042f8de in SetFocus (tmp_win=0x768b69940c00, tim=<optimized out>)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/win_ops.c:171
#7  0x00000000004096b0 in HandleEnterNotify ()
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/event_handlers.c:3304
#8  0x0000000000408804 in DispatchEvent ()
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/event_core.c:331
#9  0x0000000000408aa8 in HandleEvents ()
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/event_core.c:203
#10 0x0000000000407eff in ctwm_main (argc=<optimized out>, argv=<optimized out>)
    at /mnt/vol1/rhialto/cvs/other/ctwm/bzr/trunk/ctwm_main.c:1055
#11 0x00000000004061ab in ___start ()
#12 0x0000768b69d23000 in ?? ()
#13 0x0000000000000001 in ?? ()
#14 0x00007f7fff373690 in ?? ()
#15 0x0000000000000000 in ?? ()

so maybe that is a sign of a loop in ctwm indeed. It might be getting
confused while getting the OTP stack in order with now 3 windows that
have the wrong priority. (Maybe restacking needs to happen by first
removing all transients, then re-adding them all, instead of one by
one??)

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- "What good is a Ring of Power
\X/ rhialto/at/falu.nl      -- if you're unable...to Speak." - Agent Elrond
signature.asc (application/pgp-signature, 455 B)
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJdJ6cvAAoJEJmJxkVhw/vT3MkH/jINm65znAfm/YfwTvsEQZCi
LS767sRK6tWdXjuKrQJ2NV82bI8lt6pri/qVbmxPMWlG5acI5jiUR93WC7BTh6C2
lEKqp5o/J3ivbygeVjN56+V5lp/mYbfrH8j8w9XCBXbxFJNpZBtTnLDtBf1PkglK
i2ywj0IMYcY+aG3QtsUk1mXUzFJbUbseKKUvEmy9TU7qqS0OAAw7SyHWzUeyBrlR
MoG29itY+e+BmBotzdHC4gU+bY10xj6RezY2nhqr4WenY0kblMLuxH5xIr7HDnp1
dpil0oHdJI4QYTs9iV4AgpvxnY0nQydD+kqiurS61B+LIQawu12PRV1xFTDTwrk=
=mGgr
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.