[Spice-devel] spice BSD/OSX client

Alexander Larsson alexl at redhat.com
Mon May 31 01:59:32 PDT 2010


On Sat, 2010-05-29 at 20:39 +0200, Attila Sukosd wrote:
> Hi guys,
> 
> I have spent the last day or two doing some porting so that spicec
> would use kqueue on bsd instead of epoll. I have disabled audio for
> now, but once the current version works as it should, I will do a port
> to CoreAudio aswell.

For the client, i'm not sure using kqueue is the best way. It seems like
a better idea to just move both linux and bsd to use regular poll. There
is no way we'll have enough file descriptors on the client side to get
any kind of scaling problems that epoll/kqueue are meant to solve, so we
just get portability complexity for no gain.

So, a better way forward is probably to drop both epoll and kqueue and
switch to a normal poll or select.

> I now have a working version, however I had to disable the shm stuff
> in order to get it to work since I have been getting the following
> error:
> 
> 1275161751 ERROR spice : x_error_handler: x error on display :0.0
> error (code 10)  BadAccess (attempt to access private resource denied)
> major 139 minor 1 request 139
> 
> Since the major code (139) is outside the 125? which is the standard
> codes in X, I guessed that 139 is an Xorg extension, 
> $ xdpyinfo -display :0 -queryExtensions |grep 139
>     MIT-SHM  (opcode: 139, base event: 76, base error: 145)
> 
> So my wild guess is that it tries to write outside the available
> buffer?
> Any help would be much appriciated!

No. A BadAccess is an xserver message is an error return from an X call,
saying some argument was wrong in some way related to access rights. My
immediate guess is that some access rights on the shared memory segment
was wrong.

To debug this, add a call to 
    XSynchronize (x_display, True);

in Platform::init() in client/x11/platform.cpp

Then you'll get the error on the actual X message that caused it and you
can figure out what happens in the debugger.



-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a one-legged day-dreaming barbarian on the run. She's an artistic psychic 
bodyguard with an incredible destiny. They fight crime! 



More information about the Spice-devel mailing list