Hi again

On Wed, Aug 22, 2007 at 01:13:29PM -0400, Yaroslav Halchenko wrote:
> > > yeah... what loop in vncserver would make it 100% busy waiting for the
> > > packet (data/lock/etc)? could you have a brief look? may be I could add
> > > more debugging printfs ;-)
> > Doh! Thought about wrong bug when answering. :)
> keeping too many open bugs handy? :)

Something like that, yes. :)
 
> > In general you are right that more debugging statements would be good.
> > An alternative aproach is to compile it with debugging symbols, run
> > it though gdb and then break it when it stalls.
> ;-) it is running with debug symbols... actually I've reported my
> attempts to see WTF attaching to it with gdb  whenever it stalls -just
> have a quick look at one of my previous reports at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431485

Good to know.

> > Something have gone wrong and we obviously have a busy loop somewhere.
> > Trying to do something and can not get out of that loop.
> 
> yeah... one of previous gdb attempts showed:

That is great information!

> > (gdb) bt
> > #0  0x00002b39af69cf12 in fork () from /lib/libc.so.6
> > #1  0x000000000043cd73 in Popen ()
> > #2  0x000000000043e864 in LoadAuthorization ()
> > #3  0x000000000043ea46 in CheckAuthorization ()
> > #4  0x0000000000439a25 in ClientAuthorized ()
> > #5  0x000000000041e396 in ProcEstablishConnection ()
> > #6  0x0000000000424672 in Dispatch ()
> > #7  0x000000000040b145 in main ()
> 
> But that was after I closed it and then was trying to reattach I
> guess... though I could be wrong... I should be more careful and do not
> detach it it halts and then try to gdb it I guess. I have limited
> experience though debugging multithreaded apps...

If this one is true then this is the problematic code:

In unix/xc/programs/Xserver/os/auth.c function LoadAuthorization
...
#if !defined(WIN32) && !defined(__UNIXOS2__)
    buf = xalloc (strlen(authorization_file) + 5);
    if (!buf)
        return -1;
    sprintf (buf, "cat %s", authorization_file);
    f = Popen (buf, "r");
    xfree (buf);
#else
...

This is part of the X server code. I assume that the authorization_file
is the .xauth file, but I have not checked.

There are two possibilities here. Either Popen is buggy, or
the authorization file string contain crap data. A print statement
can reveal this.

The Popen function is defined as:
#define Popen(a,b) popen(a,b)

and popen is part of stdlib.

However this may not be the true problem as you have reattached here.
Next time it would be good to know the backtrace. Maybe even check the
backtrace several times.

Thanks for all your help. Unfortunatly I do not get this problem myself
so I need your help to solve this problem.

Best regards,

// Ola

> -- 
> Yaroslav Halchenko
> Research Assistant, Psychology Department, Rutgers-Newark
> Student  Ph.D. @ CS Dept. NJIT
> Office: (973) 353-5440x263 | FWD: 82823 | Fax: (973) 353-1171
>         101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
> WWW:     http://www.linkedin.com/in/yarik        
> 

-- 
 --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering ----
/  [EMAIL PROTECTED]                   Annebergsslingan 37        \
|  [EMAIL PROTECTED]                   654 65 KARLSTAD            |
|  http://opalsys.net/               Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to