Fedora 17 x11 loops in doupdate()

Help
2012-12-15
2013-04-25
  • Help! 

    Everything worked fine in Fedora 13.  The library is installed with my home directory as root and my home directory is unchanged over the install.

    The loop is in the process that talks to X11.  The poll has input data available, but Xt ignores it and loops.  Any ideas?

    #0  0xb77d4424 in __kernel_vsyscall ()
    #1  0x4f9c5ee2 in __GI___poll (fds=fds@entry=0x9305140, nfds=nfds@entry=1, timeout=0)
        at ../sysdeps/unix/sysv/linux/poll.c:83
    #2  0x43ba9581 in IoWait (wt=<optimized out>, wf=<optimized out>) at NextEvent.c:359
    #3  _XtWaitForSomething (app=app@entry=0x92e7000, ignoreEvents=ignoreEvents@entry=1 '\001',
        ignoreTimers=ignoreTimers@entry=1 '\001', ignoreInputs=ignoreInputs@entry=0 '\000',
        ignoreSignals=ignoreSignals@entry=1 '\001', block=block@entry=0 '\000', drop_lock=0 '\000',
        drop_lock@entry=1 '\001', howlong=howlong@entry=0x0) at NextEvent.c:627
    #4  0x43baac80 in XtAppProcessEvent (app=app@entry=0x92e7000, mask=mask@entry=15)
        at NextEvent.c:1344
    #5  0x43b9ec90 in XtAppMainLoop (app=0x92e7000) at Event.c:1554
    #6  0xb77c81cd in XCursesSetupX (argc=7, argv=0xbfe1ee84) at ./x11.c:3209
    #7  0xb77c1aa1 in XCursesInitscr (argc=13, argv=0xbfe1ee84) at ./pdcx11.c:259
    #8  0xb77c092f in PDC_scr_open (argc=13, argv=0xbfe1ee84) at ./pdcscrn.c:33
    #9  0xb77b70c2 in Xinitscr (argc=13, argv=0xbfe1ee84) at ../pdcurses/initscr.c:120
    #10 0x0806469b in PDCsetup (argc=13, argv=0xbfe1ee84, geo=0x807121c) at pdc.c:33
    #11 0x0804c040 in setup (argc=13, argv=0xbfe1ee84) at curs.c:41
    #12 0x0804b56b in main (argc=13, argv=0xbfe1ee84) at cdlist.c:102

    (gdb) step
    478                 if (fdlp->revents) {
    (gdb)
    479                     if (fdlp->revents & (XPOLL_READ|POLLHUP|POLLERR)
    (gdb)
    481                         && !(fdlp->revents & POLLNVAL)
    (gdb)
    485                     if (fdlp->revents & XPOLL_WRITE)
    (gdb) print fdlp->revents
    $4 = 65
    (gdb) step

    65 means normal data input available.

    And then it does XtWaitForSomething ignoring this event, but the poll ends immediately.

     
  • Thanks, William, just what the doctor ordered.  Added usleep(100000) (a tenth of a second).  This is sufficient on an atom processor, albeit unloaded.

     
  • I suggest grabbing the changes from CVS rather than inserting sleep. Unless those don't work for you?

     
  • They do work.  Though I must admit I don't understand how.  Thanks.