[Verse-dev] 64-bit problems

Emil Brink emil at obsession.se
Mon Oct 3 10:06:24 CEST 2005


Samuel Siltanen wrote:

Hi Samuel!

> I have been trying to use Verse in a 64-bit environment and got a 
> problem with encryption. Here is what I got after fetching the most 
> recent version of Verse from CVS, compiling it, and then running it:
> 
> % ./verse
> Verse Server r5p0 by Eskil Steenberg 
> <http://www.blender.org/modules/verse/>
> v_randgen.c: Failed to read 32 bytes of random data from /dev/urandom
> v_randgen.c: Failed to read 32 bytes of random data from /dev/urandom

Oh. What platform is this? The code that tries to generate random
numbers "good enough" for encryption assumes that all non-Windows plat-
forms have a /dev/urandom from which we can read random bits. It just
needs more porting attention to handle different platforms better.

> And then when I tried connecting the server with the vml-loader (which 
> gave a warning about casting pointer to integer of different size when 
> compiling vmlnode.c line 553)

Oh? I'm looking at the code, but I can't see an obvious cause of that
warning ... Are you running the latest CVS code, so that nothing has
moved around to make the line number shift? The line in my code reads:

ptype[pn] = o_method_param_type_from_string(xmlnode_attrib_get_value(list_data(piter), "type"));

Where ptype is

VNOParamType	ptype[64]

and the outermost function is declared like so:

extern VNOParamType	o_method_param_type_from_string(const char *str);

So I don't quite see why the compiler has a reason to complain. Of course,
it's Monday morning and there are a few nested calls there. :) Oh well, if
it runs correctly, I wouldn't worry, although it'd be nice to clean it
out of course.

 > I got the following lines at the server's end:
[unknown command, packet decode problems]
> Similar encryption errors can be seen later, so obviously there is 
> something wrong with the rsa-key generation on a 64-bit machine. The 
> main difference to 32-bit machines is that "long" and pointers are 
> 64-bit while "int" and other types are similar to 32-bit machines. Does 
> this cause the errors?

Actually, I don't think so. I get the very same error here on my 32-bit
machine, all the time. :/ That's not "on every run", but still very often,
several times a day typically.

We've not been able to pin this one down and fix it. All we know is that
it concerns the first command in a packet (as indicated by the offset and
previous-command byte). It is probably something with the encryption that
is not working 100%, but there seems to be no ill effects rather than it
being very annoying of course. I myself am still not familiar enough with
the low-level details of Verse's network code to be able to fix this in
an easy manner.

Further suggestions on what could possibly cause it are very welcome, and
we're sorry for the annoyance of course.

Regards,

/Emil


More information about the Verse-dev mailing list