Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-12 Thread Melchior FRANZ
* Robert Osfield -- Tuesday 10 February 2009:
 Any chance that FlightFear is modifying the
 ParticleSystem/ParticleSystemUpdate within the cull traversal?

No idea. Have to check with one of our osg experts.



 What happens we you try differnt threading models like
 CullDrawThreadPerContext, SingleThreaded and DrawThreadPerContext?

Will try later. For now I've recompiled everything with -O0, and
have run fgfs for hours, without crash. I don't really think that
the slightly changed compiler/linker flags have removed the cause
for the segfault, but the now much lower frame rate has probably
changed the timing such that it's now less likely to occur. I'll
continue the tests, and will give some more useful info about my
next crash (if any).

Of coursem, I agree that there was no more reason to delay the
2.8 release.  :-)

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-10 Thread Melchior FRANZ
Hey,

* Mathias Fröhlich -- Tuesday 10 February 2009:
 I can see no connection between the helgrind warning and a segfault.
 What helgrind tells you, is that there is a possible dealock situation 
 that can potentially happen due to that inverted lock order.
 But the effect of a deadlock is a hanging application or thread or
 something like that - not a segfault ...

Yes, that's what I even assumed. I was surprised to get a segfault
on the lock. But then again, a segfault on the lock, a reported
threading error there, ... and lack of knowledge about threading. ;-)



* Mathias Fröhlich -- Tuesday 10 February 2009:
 For the nvidia drivers on linux you need the --smc-check=all valgrind 
 argument. The thing appears to be that the nvidia drivers dynamically build 
 code on the cpu that is not tracked correctly by valgrind without that 
 argument

Oh, that's news to me. Thanks a lot. Will try. When I tried to explore
the core dump, I didn't get far. I had built with optimization, and
several variables were not accessible. Will rebuild everything with -O0
today and re-run valgrind --smc-check=all.



 Good luck ...

Thanks.  :-)

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi All,

I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
has been positive so far, so it looks like the code is pretty ready.
Do you agree/disagree that we are ready to tag?  Now is your last
opportunity to report a show stopper!

Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT today.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Paul Melis

Robert Osfield wrote:

Hi All,

I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
has been positive so far, so it looks like the code is pretty ready.
Do you agree/disagree that we are ready to tag?  Now is your last
opportunity to report a show stopper!
  

Did you see the message about rev 9722 not being in the branch yet?

Paul

Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT today.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

  


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
On Mon, Feb 9, 2009 at 2:10 PM, Paul Melis p...@science.uva.nl wrote:
 Did you see the message about rev 9722 not being in the branch yet?

It arrived just after I pressed send :-)

So yes have spotted it, currently waiting on the server.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Paul Melis

Robert Osfield wrote:

On Mon, Feb 9, 2009 at 2:10 PM, Paul Melis p...@science.uva.nl wrote:
  

Did you see the message about rev 9722 not being in the branch yet?



It arrived just after I pressed send :-)

So yes have spotted it, currently waiting on the server.
  

Good ;-)
BTW, you asked Stephan if he had committed it to the trunk, but I 
thought only you had permission to commit there?


Paul

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
Hi,

* Robert Osfield -- Monday 09 February 2009:
 Do you agree/disagree that we are ready to tag? 

you'll probably not be surprised if I say: I disagree.  :-)

I had reported a segfault and the diagnose output of valgrind/helgrind,
which affirms that there is a threading bug (maybe in the particles
code?). It's very likely that this is exactly the bug which causes
the segfaults.

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Sukender
Hi Robert,

I did not test many things but IMHO, and seeing what was posted on mailing 
lists, I agree to tag the 2.8.0.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Mon, 09 Feb 2009 15:08:40 +0100, Robert Osfield robert.osfi...@gmail.com a 
écrit:

 Hi All,

 I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
 has been positive so far, so it looks like the code is pretty ready.
 Do you agree/disagree that we are ready to tag?  Now is your last
 opportunity to report a show stopper!

 Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT today.

 Cheers,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Mathias Fröhlich

Hi Robert,

On Monday 09 February 2009 15:08, Robert Osfield wrote:
 I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
 has been positive so far, so it looks like the code is pretty ready.
 Do you agree/disagree that we are ready to tag?  Now is your last
 opportunity to report a show stopper!

 Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT
 today.

I successfully compiled today morning's 2.8 branch on solaris, hpux and two 
linux variants.

Looking forward to the release.

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi Melchior,

On Mon, Feb 9, 2009 at 2:24 PM, Melchior FRANZ melchior.fr...@gmail.com wrote:
 you'll probably not be surprised if I say: I disagree.  :-)

 I had reported a segfault and the diagnose output of valgrind/helgrind,
 which affirms that there is a threading bug (maybe in the particles
 code?). It's very likely that this is exactly the bug which causes
 the segfaults.

The segfault I saw with your example was because the example was
broken as the viewer wasn't ref counted, this wasn't an OSG bug.

I haven't had a chance to investigate the valgrind report though, have
you had a chance?  Has anyone else reproduce/investigated this issue?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Robert Osfield -- Monday 09 February 2009:
 The segfault I saw with your example was because the example was
 broken as the viewer wasn't ref counted, this wasn't an OSG bug.

But valgrind/helgrind reported a bug in *OSG*, in the same
area where FlightGear crashes. I didn't let it run over FlightGEar,
but over osgparticleeffects. No broken example involved
here. (Unless osgparticleeffects is broken, too, of course. :-)



 I haven't had a chance to investigate the valgrind report though, 
 have you had a chance?

I'm sorry. I know that patches are more welcomed than bug reports.
But it would probably have taken me many hours, if not days, to
understand how the code is supposed to work, before I could even
start to search for the bug. Time that I better spend on (OSS)
projects where I know the code (and that need as much bugfixing).

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Robert Osfield -- Monday 09 February 2009:
 I've just run valgrind and it generates a number of what it thinks are
 errors,

You are aware that I didn't use valgrind's standard tool mecheck,
but its threading checker helgrind?

  $ valgrind --tool=helgrind ./osgparticleeffects


  ==31276== Thread #1: lock order 0x58F499C before 0x58F494C violated
  ==31276== Thread #1: lock order 0x58F6A9C before 0x58F6AEC violated



 OpenThreads and osgParticle have not changed in any substantial way
 for quite some while, so these errors have likely been there for a
 long time.

Sure, it may well be that the broken threading is old and has caused
segfaults before.  :-P



 Do you get a crash in osgparticleeffects?  If so how quickly?

None. But OSG is a library. Whether examples crash or not is IMHO
not really relevant, *if* there are bugs in the lib. Sure, we can
just assume/pretend that helgrind is buggy and osg is bugfree.  ;-)

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Alberto Luaces
Hi Melchior,

El Lunes 09 Febrero 2009ES 16:34:45 Melchior FRANZ escribió:
 You are aware that I didn't use valgrind's standard tool mecheck,
 but its threading checker helgrind?

   $ valgrind --tool=helgrind ./osgparticleeffects
                     

   ==31276== Thread #1: lock order 0x58F499C before 0x58F494C violated
   ==31276== Thread #1: lock order 0x58F6A9C before 0x58F6AEC violated

Did you know that you can also attach a debugger so you can inspect directly 
every error reported by Valgrind? It is done adding --db-attach=yes to the 
command-line. Maybe the error could be more evident this way without having 
to dive into the code.

Just my 2 cents,

Alberto
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
HI Melchoir,

On Mon, Feb 9, 2009 at 3:34 PM, Melchior FRANZ melchior.fr...@gmail.com wrote:
 You are aware that I didn't use valgrind's standard tool mecheck,
 but its threading checker helgrind?

In my testing here I'm using the tool=helgrind

 Do you get a crash in osgparticleeffects?  If so how quickly?

 None. But OSG is a library. Whether examples crash or not is IMHO
 not really relevant, *if* there are bugs in the lib. Sure, we can
 just assume/pretend that helgrind is buggy and osg is bugfree.  ;-)

3rd party debugging tools aren't infaluable.  The can and do produce
false positives.  They can and do also miss real problems.   How much
we can rely upon valgraind/helgrind is not something I can vouch for
as this is the first time I'm attempted to use tool=helgrind.

If we get a one to one mapping between a crash site and the helgrind
warnings then we have something very tangible to go on.  Right now I
have an osgparticleeffects and osgviewer that doesn't crash, but have
a valgraind/helgrind suggesting errors, but it's rather unclear on how
to interpret those errors.  We don't have this one to one mapping.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi Alberto,

On Mon, Feb 9, 2009 at 3:54 PM, Alberto Luaces alua...@udc.es wrote:
 Did you know that you can also attach a debugger so you can inspect directly
 every error reported by Valgrind? It is done adding --db-attach=yes to the
 command-line. Maybe the error could be more evident this way without having
 to dive into the code.

Could you provide an example command line example of what you mean?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Alberto Luaces
Hi Robert,

El Lunes 09 Febrero 2009ES 16:56:40 Robert Osfield escribió:
 Hi Alberto,

 On Mon, Feb 9, 2009 at 3:54 PM, Alberto Luaces alua...@udc.es wrote:
  Did you know that you can also attach a debugger so you can inspect
  directly every error reported by Valgrind? It is done adding
  --db-attach=yes to the command-line. Maybe the error could be more
  evident this way without having to dive into the code.

 Could you provide an example command line example of what you mean?


Yes. By issuing 

valgrind --tool=helgrind --db-attach=yes osgparticleeffects

valgrind stops on every error it reports with the question:

 Attach to debugger ? --- [Return/N/n/Y/y/C/c]

if you answer yes, gdb is automatically attached and you can inspect thread's 
stacks. You can also quit the debugger without quitting the program and 
continue valgrind's run.

Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Alberto Luaces -- Monday 09 February 2009:
 Did you know that you can also attach a debugger 

Yes, of course. But the helgrind output already contained
*exact* line numbers where it found the locking order to
be wrong. There wasn't much point in staring at the lines.
Those by themselves aren't the bug, just the order in which
they are called. And for that I would have needed a lot
more (or any ;-) insight into the osg workings.

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
Hi,

* Robert Osfield -- Monday 09 February 2009:
 In my testing here I'm using the tool=helgrind

Oh, sorry then.



 3rd party debugging tools aren't infaluable. The can and do produce 
 false positives.

Yes, of course. But if I get a segfault in FlightGear which gdb
traces back to some lines of code in OSG, and then helgrind
points out a bug in pretty much exactly the same lines, then
my first assumption is not that helgrind is buggy. And helgrind's
report was IMHO very precise.



 How much we can rely upon valgraind/helgrind is not something
 I can vouch for as this is the first time I'm attempted to use
 tool=helgrind. 

Yeah, same here. I'm a total helgrind newbie. But still: segfault
and threading bug reported by two independent tools in the same
code.

But before I annoy the last person here, I stop bitching. Just
release OSG as it is. Maybe gdb and helgrind and FlightGear
get fixed and the problem goes away all by itself.   ;-)

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
HI Melchior,

On Mon, Feb 9, 2009 at 4:11 PM, Melchior FRANZ melchior.fr...@gmail.com wrote:
 3rd party debugging tools aren't infaluable. The can and do produce
 false positives.

 Yes, of course. But if I get a segfault in FlightGear which gdb
 traces back to some lines of code in OSG, and then helgrind
 points out a bug in pretty much exactly the same lines, then
 my first assumption is not that helgrind is buggy. And helgrind's
 report was IMHO very precise.

How easy is it to build FlightGear these days?  I was hoping to get it
up and running on my machine so I could you it as another test
platform for the OSG.

I don't want to spend several days chasing up stuff though... have my
own release to make...

 How much we can rely upon valgraind/helgrind is not something
 I can vouch for as this is the first time I'm attempted to use
 tool=helgrind.

 Yeah, same here. I'm a total helgrind newbie. But still: segfault
 and threading bug reported by two independent tools in the same
 code.

 But before I annoy the last person here, I stop bitching. Just
 release OSG as it is. Maybe gdb and helgrind and FlightGear
 get fixed and the problem goes away all by itself.   ;-)

As much as having bugs reported is annoying... if it's a real bug in
the OSG then I want to see it fixed.  A crash is enough to warrant
holding back the release.

At my end I do have the helgrind output that suggests a problem, but I
don't have a crash, which makes it a bit more difficult for me to
fully diagnose the problem and confirm a fix of the problem.  The
helgrind output is just a hint that somewhere in access of the
ReadWriteMutex there is an issue, it doesn't actually pinpoint the
actual failure mechanism.

I am current reviewing the ReadWriterMutex implementation, and think I
have a handle on a possible failure mechanism of the read and write
threads changing the locks/unlocks in an unsafe way.  I am looking
into ways of refactoring this class to fix the potential problems.
While it seems likely right now this this could be the cause of the
seg faults you are seeing, I can't say this for certain.  Also as I
can't reproduce the crash the best I can hope is the valigrind will
give the refactored code the all clear and FlighGear crash will be
solved - but I'll need others to test this for me as I don't have
FlightGear to test against.

Are you around for the rest of the day?  Can I push a testing question
of new code in your direction?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Robert Osfield -- Monday 09 February 2009:
 How easy is it to build FlightGear these days?

Shouldn't be too hard for you, as you probably have a lot of the
necessary components installed already (osg, libpng, libjpg, openal,
alut etc.)


So all you'll need is a decent scene graph lib:;-)

  $ svn co https://plib.svn.sourceforge.net/svnroot/plib/trunk plib


We still use some parts of that -- networking, joystick, GUI.
Then you need SimGear:

  $ cvs -d :pserver:cvsgu...@cvs.simgear.org:/var/cvs/SimGear-0.3 login
  CVS passwd: guest
  $ cvs -d :pserver:cvsgu...@cvs.simgear.org:/var/cvs/SimGear-0.3 co source


And FlightGear itself:

  $ cvs -d :pserver:cvsgu...@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
  CVS passwd: guest
  $ cvs -d :pserver:cvsgu...@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co 
source


It's the usual  ./autogen.sh  ./configure  make  sudo make install
everywhere, IIRC.



 At my end I do have the helgrind output that suggests a problem, but I
 don't have a crash, [...]

I cannot reproduce the crash every time either. Happens once in a
while, but *if* it happens, then the origin is always the same.
There's nothing fuzzy about it.



 I am looking into ways of refactoring this class to fix the potential
 problems.

That sounds much too dangerous shortly before a release. I'd rather
look into that afterwards. Crashes aren't nice, but messing up a
lib before a release is far worse.  :-)



 Are you around for the rest of the day?  Can I push a testing question
 of new code in your direction?

Yes, and sure. But note that I can't reproduce it with every fgfs run.
I'd have to run fgfs dozens of times and hope that it segfaults.

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi Melchior,

Thanks for the instructions on getting flight gear I'll have bash.

On Mon, Feb 9, 2009 at 5:00 PM, Melchior FRANZ melchior.fr...@gmail.com wrote:
 I am looking into ways of refactoring this class to fix the potential
 problems.

 That sounds much too dangerous shortly before a release. I'd rather
 look into that afterwards. Crashes aren't nice, but messing up a
 lib before a release is far worse.  :-)

I think we have three choices:

  1) Refactor OpenThreads::ReadWriteMutex to fix it.
  2) Refactor osgParticle::ParticleSystem to use a Mutex instead of a
ReadWriteMutext.
  3) Ignore it and fix it after the release.

There are pros and cons of each of these routes.  My preference would
be 1) fix the problem, but would fixing it also introduce the risk of
breaking it even more?  Solution 2) would introduce a performance
bottleneck.  Solution 3) isn't a solution :-)

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Robert Osfield -- Monday 09 February 2009:
 Thanks for the instructions on getting flight gear I'll have bash.

You'd also need the data. And ~2GB free disk space, though you could
leave most aircraft away, which saves a lot:

  $ cvs -d :pserver:cvsgu...@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
  CVS passwd: guest
  $ cvs -d :pserver:cvsgu...@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co data



I wrote that I can't reliably reproduce, but what I can do is put
lots of particle-using aircraft in the scenery, which should increase
the crashiness. Will try that now ...

m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Stefan Roettger

At my end I do have the helgrind output that suggests a problem, but I
don't have a crash, which makes it a bit more difficult for me to
fully diagnose the problem and confirm a fix of the problem.  The
helgrind output is just a hint that somewhere in access of the
ReadWriteMutex there is an issue, it doesn't actually pinpoint the
actual failure mechanism.


Just my 2 eurocents: We were using openthreads to lock a crew of  
worker threads which were accessing a shared file cache locked with a  
mutex. We got a crash every once in a while. To check for the problem  
we changed the code to use tbb (thread building blocks). After that it  
did not crash anymore. It is too long ago to recall the details (not  
much of a help to nail it down either, sorry :), but I would agree to  
point my finger to core openthreads and not valgrind/helgrind/ 
osgparticle etc.


Stefan

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
On Mon, Feb 9, 2009 at 5:16 PM, Robert Osfield robert.osfi...@gmail.com wrote:
 I think we have three choices:

  1) Refactor OpenThreads::ReadWriteMutex to fix it.
  2) Refactor osgParticle::ParticleSystem to use a Mutex instead of a
 ReadWriteMutext.
  3) Ignore it and fix it after the release.

 There are pros and cons of each of these routes.  My preference would
 be 1) fix the problem, but would fixing it also introduce the risk of
 breaking it even more?  Solution 2) would introduce a performance
 bottleneck.  Solution 3) isn't a solution :-)

Over dinner I reflected on the above options and feel that solution 2
is probably the most practical at this late stage in the release.  I
am now converting osgParticle::ParticleSystem across to all optional
compile of use of Mutex or ReadWriteMutex.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi Stefan,

On Mon, Feb 9, 2009 at 5:37 PM, Stefan Roettger ste...@stereofx.org wrote:
 Just my 2 eurocents: We were using openthreads to lock a crew of worker
 threads which were accessing a shared file cache locked with a mutex. We got
 a crash every once in a while. To check for the problem we changed the code
 to use tbb (thread building blocks). After that it did not crash anymore. It
 is too long ago to recall the details (not much of a help to nail it down
 either, sorry :), but I would agree to point my finger to core openthreads
 and not valgrind/helgrind/osgparticle etc.

Did you use an OpenThreads::Mutex or ReadWriteMutex in your shared
file cache?  As far as I know OpenThreads::Mutex is sound, but
ReadWriteMutex does look unsound as it stands.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi Melchoir et al.

On Mon, Feb 9, 2009 at 5:00 PM, Melchior FRANZ melchior.fr...@gmail.com wrote:
 Are you around for the rest of the day?  Can I push a testing question
 of new code in your direction?

 Yes, and sure. But note that I can't reproduce it with every fgfs run.
 I'd have to run fgfs dozens of times and hope that it segfaults.

I have now checked in my changes to osgParticle::ParticleSystem to
have an optional compile path for either the use of the
OpenThreads::ReadWriteMutex or a OpenThreads::Mutex, with the standard
Mutex now being the default.  An svn update to the OSG-2.8 branch will
get you these changes.

Changing to mutex solves the valigrind/helgrind warnings when you run
osgparticleeffects in SingleThreaded.  I still see helgrind errors if
run osgviewer cow.osg multi-threaded with lots of warnings in GL or
osgViewer.  I suspect most of these errors are benign though, the
design of osgViewer is that it can accomodate not completely guarded
data structures as the high level frame synchronisation of threads
should avoid most issues.

Could you test out these changes and let me know how you get on,

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Stefan Roettger

Did you use an OpenThreads::Mutex or ReadWriteMutex in your shared
file cache?  As far as I know OpenThreads::Mutex is sound, but
ReadWriteMutex does look unsound as it stands.


Could have been ReadWriteMutex, but not 100% sure. The only sure thing  
is that tbb fixed it.

Stefan

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Robert Osfield -- Monday 09 February 2009:
 An svn update to the OSG-2.8 branch will get you these changes.

OK. I updated and recompiled, and will now test fgfs intensively.
One evening won't be enough to confirm that the problem is fixed,
but the fact that helgrind no longer complains is a good sign.

I'll continue testing ... you can see me on our live-multiplayer
map as cptf:  http://mpmap01.flightgear.org/

Thanks for your efforts so far!

m.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread John Vidar Larring

Hi Robert,

It seems that the osgautocapture example has stopped working along the 
way. It seems that DatabasePager::getRequestsInProgress() returns zero 
even after the terrain model has started loading. Please, test to 
reproduce with the osgautocapture example:


./osgautocapture --window 0 0 1024 576 --camera 55 10 30 0 30 0 
--filename out.jpg terrain.ive


Best regards,
John Vidar

Robert Osfield wrote:

Hi All,

I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
has been positive so far, so it looks like the code is pretty ready.
Do you agree/disagree that we are ready to tag?  Now is your last
opportunity to report a show stopper!

Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT today.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
HI John,

Could you please look into, I have enough on my plate already.

Robert.

On Mon, Feb 9, 2009 at 9:29 PM, John Vidar Larring john_larr...@sil.org wrote:
 Hi Robert,

 It seems that the osgautocapture example has stopped working along the way.
 It seems that DatabasePager::getRequestsInProgress() returns zero even after
 the terrain model has started loading. Please, test to reproduce with the
 osgautocapture example:

 ./osgautocapture --window 0 0 1024 576 --camera 55 10 30 0 30 0
 --filename out.jpg terrain.ive

 Best regards,
 John Vidar

 Robert Osfield wrote:

 Hi All,

 I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
 has been positive so far, so it looks like the code is pretty ready.
 Do you agree/disagree that we are ready to tag?  Now is your last
 opportunity to report a show stopper!

 Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT
 today.

 Cheers,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
HI John,

I've finished the other tasks then had a look at this issue.  I was
able to track it down to an incorrect for loop end iterator value in
the DatabasePager::getRequestsInProgress().  This is now fixed and the
osgautocapture example works once more.

Robert.

On Mon, Feb 9, 2009 at 9:33 PM, Robert Osfield robert.osfi...@gmail.com wrote:
 HI John,

 Could you please look into, I have enough on my plate already.

 Robert.

 On Mon, Feb 9, 2009 at 9:29 PM, John Vidar Larring john_larr...@sil.org 
 wrote:
 Hi Robert,

 It seems that the osgautocapture example has stopped working along the way.
 It seems that DatabasePager::getRequestsInProgress() returns zero even after
 the terrain model has started loading. Please, test to reproduce with the
 osgautocapture example:

 ./osgautocapture --window 0 0 1024 576 --camera 55 10 30 0 30 0
 --filename out.jpg terrain.ive

 Best regards,
 John Vidar

 Robert Osfield wrote:

 Hi All,

 I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
 has been positive so far, so it looks like the code is pretty ready.
 Do you agree/disagree that we are ready to tag?  Now is your last
 opportunity to report a show stopper!

 Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT
 today.

 Cheers,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Melchior FRANZ
* Robert Osfield -- Monday 09 February 2009:
 An svn update to the OSG-2.8 branch will get you these changes.

Tried with that ...



 Changing to mutex solves the valigrind/helgrind warnings when you run
 osgparticleeffects in SingleThreaded.

Confirmed. However, in fgfs I got again a segfault with particles
and threading ...


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb67d16f0 (LWP 32467)]
osgParticle::ParticleSystemUpdater::traverse (this=0x96be668, n...@0x9843150) 
at /home/m/fgfs/osg/include/OpenThreads/ScopedLock:31
31  explicit ScopedLock(M m):m_lock(m) {m_lock.lock();}

Can't say more, as I had to throw the core file away (don't ask :-).
Now I'm helgrinding fgfs+osg, and after that I'll make another
fgfs run and will then explore the next core dump ...

m.



PS: the ParticleSystemUpdater is a beast!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Robert Osfield
Hi Melchoir,

On Mon, Feb 9, 2009 at 10:38 PM, Melchior FRANZ
melchior.fr...@gmail.com wrote:
 Confirmed. However, in fgfs I got again a segfault with particles
 and threading ...


 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0xb67d16f0 (LWP 32467)]
 osgParticle::ParticleSystemUpdater::traverse (this=0x96be668, n...@0x9843150) 
 at /home/m/fgfs/osg/include/OpenThreads/ScopedLock:31
 31  explicit ScopedLock(M m):m_lock(m) {m_lock.lock();}

 Can't say more, as I had to throw the core file away (don't ask :-).
 Now I'm helgrinding fgfs+osg, and after that I'll make another
 fgfs run and will then explore the next core dump ...

I've just reviewed the ParticleSystemUpdater code and it looks
correct.  Accessing mutex shouldn't just cause a crash.  The only time
I could see it causing a crash is if the mutex itself is deleted and
the pointer being used to access isn't dangling.   The
ParticleSystemUpdate has keeps ref_ptrParticleSystem to the list of
particle systems it's updating so dangling pointers shouldn't be an
issue.

Any chance that FlightFear is modifying the
ParticleSystem/ParticleSystemUpdate within the cull traversal?

What happens we you try differnt threading models like
CullDrawThreadPerContext, SingleThreaded and DrawThreadPerContext?

I'm turning in catch up with you in the morning.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Cedric Pinson

I tried on my application and everything seems good to me

Robert Osfield wrote:

Hi All,

I'm ready to tag the 2.8.0.  Feedback on the 2.8 branch and 2.8.0-rc2
has been positive so far, so it looks like the code is pretty ready.
Do you agree/disagree that we are ready to tag?  Now is your last
opportunity to report a show stopper!

Unless there is a show stopper reported I'll tag 2.8.0 at 1500hrs GMT today.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:morni...@plopbyte.net 
http://www.plopbyte.net


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Mathias Fröhlich

Hi,

On Monday 09 February 2009 23:38, Melchior FRANZ wrote:
 * Robert Osfield -- Monday 09 February 2009:
  An svn update to the OSG-2.8 branch will get you these changes.

 Tried with that ...

  Changing to mutex solves the valigrind/helgrind warnings when you run
  osgparticleeffects in SingleThreaded.

 Confirmed. However, in fgfs I got again a segfault with particles
 and threading ...

Melchior,
I can see no connection between the helgrind warning and a segfault. What 
helgrind tells you, is that there is a possible dealock situation that can 
potentially happen due to that inverted lock order.
But the effect of a deadlock is a hanging application or thread or something 
like that - not a segfault ...

 Can't say more, as I had to throw the core file away (don't ask :-).
 Now I'm helgrinding fgfs+osg, and after that I'll make another
 fgfs run and will then explore the next core dump ...
Good luck ...

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please give approval if you feel OpenSceneGraph-2.8 is ready ; -)

2009-02-09 Thread Mathias Fröhlich

An other sidenote regarding valgrind:

For the nvidia drivers on linux you need the --smc-check=all valgrind 
argument. The thing appears to be that the nvidia drivers dynamically build 
code on the cpu that is not tracked correctly by valgrind without that 
argument.

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org