[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Report of tsan first testing with libvirt(d)



On Fri, May 18, 2012 at 06:40:06PM +0800, Daniel Veillard wrote:
> On Fri, May 18, 2012 at 09:16:20AM +0100, Daniel P. Berrange wrote:
> > On Fri, May 18, 2012 at 11:55:05AM +0800, Daniel Veillard wrote:
> [...]
> > >   The other one raised is actually something I had initially found
> > > with the first run on libxml2 so it's relatively consistent:
> > 
> > Yay libxml2 is not thread safe !
> > 
> >       "The  function  rand() is not reentrant or thread-safe, since
> >        it uses hidden state that is modified on  each  call.   This
> >        might just be the seed value to be used by the next call, or
> >        it might be something  more  elaborate.   In  order  to  get
> >        reproducible  behavior in a threaded application, this state
> >        must be made explicit; this can be done using the  reentrant
> >        function rand_r()."
> > 
> > You should probably validate libxml2 against all the functions
> > have blacklisted for libvirt in Makefile.nonreentrant
> 
>   Actually I don't care about "reproducible behaviour" there, the
> goal is precisely to introduce some randomness in the execution.

NB You shouldn't equate 'non reproducible' with 'random'. If you
are corrupting the state of the random number generator, it is quite
possible you'll loose entropy and get non-random numbers instead,
which could even lead a security flaw depending on how the random
numbers are used.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]