xauth bus error

Jeremy Huddleston jeremyhu at berkeley.edu
Thu Jan 10 20:25:43 PST 2008


I've put together a summary of most of my debugging here: http://trac.macosforge.org/projects/xquartz/ticket/44

I've narrowed it down to one oddity, and I'm getting to a point where  
I want to take a break for a while... so I'll probably try working on  
this tomorrow unless someone else finishes up where I started... and  
hopefully someone with more experience with xauth will chime in (hence  
the CC to xorg@).

Basically, OSX's /etc/hosts file has three localhost entries:	localhost
::1             localhost
fe80::1%lo0	localhost

Commenting out that last one causes our problem to go away, but that's  
not good enough.  It should work!  So here's the main thing I noticed:

Doing xauth add localhost:0 before :0 causes two ipv6 xauth entries to  
be created for localhost and one ipv4 entry (presumably this is  
somehow one for each line in /etc/hosts as commenting out the last  
localhost line in /etc/hosts causes one less ipv6 entry).  If we did  
the add :0 before localhost:0, then the localhost:0 addition would add  
just one ipv4 entry and one ipv6 entry (even with the last /etc/hosts  
line present).

Then doing the 'xauth remove localhost:0', I noticed that we called  
remove_entry() attempting to remove the ipv6 entry twice (even though  
there was only one in the list when doing the :0 add before the  
localhost:0 add).  If we did the localhost:0 add first, there would be  
a second ipv6 entry to remove, so it wouldn't crash.

So... a few questions for someone on xorg at l.f.o who can hopefully help  
me out here:

1) Why is the second ipv6 entry being added at all?  It seems like it  
should only be added once.  So why is it behaving that way in one  
ordering of adds and not the other?

2) Why is remove_entry() being called a second time with the ipv6 auth  
removal even when there is only one matching auth in the list.   
Looking at iterdpy(), I don't see why that should be happening as it  
iterates over the same list being removed from.

On Jan 10, 2008, at 14:22, Jeremy Huddleston wrote:

> Ok, I can finally reproduce it (without /etc/hostconfig settings or / 
> etc/hosts settings) via:
> ~ $ xauth add :0 MIT-MAGIC-COOKIE-1 ce234f956a2ddef8eb2d94fb9bd6af81
> ~ $ xauth add localhost:0 MIT-MAGIC-COOKIE-1  
> ce234f956a2ddef8eb2d94fb9bd6af81
> ~ $ xauth remove localhost:0
> Bus error
> ---
> This works:
> ~ $ xauth add localhost:0 MIT-MAGIC-COOKIE-1  
> ce234f956a2ddef8eb2d94fb9bd6af81
> ~ $ xauth remove localhost:0
> ---
> And the sequence causing the bus error seems to work fine on linux.
> Thanks,
> Jeremy
> On Jan 10, 2008, at 13:56, John Koren wrote:
>> Just 'jnlt'. In my /etc/hosts I have '       localhost  
>> jnlt'.
>> -John
>> On Jan 10, 2008 1:42 PM, Jeremy Huddleston < jeremyhu at berkeley.edu>  
>> wrote:
>> BTW, what was the entry in /etc/hostconfig?  Was it a fully qualified
>> domain name? Or just 'jnlt'?
> _______________________________________________
> Xquartz-dev mailing list
> Xquartz-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/xquartz-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080110/26b3eba7/attachment.bin>

More information about the xorg mailing list