Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 12-10-2004
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
UUID patch for Ice 2.0.0

On all platforms except Windows, IceUtil::generateUUID() uses /dev/urandom to generate UUIDs.

Unfortunately concurrent reads to /dev/urandom on Linux (at least up to 2.6.9smp) can return the same value. I posted a test-case on the linux-kernel mailing list that you could use to check /dev/urandom on your OS:
http://www.uwsg.indiana.edu/hypermai...11.3/0875.html
http://www.uwsg.indiana.edu/hypermai...12.0/1541.html

This bug will be fixed in the next 2.6 release; however until everybody upgrades to a kernel with the fix (which won't be soon) a work-around in IceUtil::generateUUID() is necessary.

You can apply the attached patch on a 2.0.0 distribution as follows:
$ gunzip patch.gz
$ cd $ICE_HOME
$ patch -p0 <~/patch

It changes the generateUUID() implementation, and improves the UUID test.
On Windows, generateUUID() is using the Windows-provided UUID generator, so you don't need this patch.

Cheers,
Bernard
Attached Files
File Type: gz patch.gz (2.3 KB, 395 views)
Reply With Quote
  #2 (permalink)  
Old 02-04-2005
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
The underlying /dev/urandom bug is fixed in Linux 2.6.10:
http://www.kernel.org/pub/linux/kern...angeLog-2.6.10

Cheers,
Bernard
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Patch for Ice-3.1.0: icegridadmin application patch bug fix mpugach Patches 1 08-01-2006 07:26 AM
uuid.h not found Bruce Help Center 7 02-20-2003 09:57 AM


All times are GMT -4. The time now is 06:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.