Text archives Help
- From: "Abe Stephens" <abestephens@gmail.com>
- To: "Solomon Boulos" <boulos@cs.utah.edu>
- Cc: "manta@sci.utah.edu" <manta@sci.utah.edu>
- Subject: Re: [Manta] dynbvh builder breaking on barrier wait?
- Date: Tue, 8 Apr 2008 12:16:34 -0600
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=H3xsHyn3+tvW1SGHXGJ+CaD5CkYpTdArfUa1iygVcK+ONK5ALOxinUprtQjg2k4JbE6/ToAk+HZuLQyF/JxXQMXAn/BMPjHmWRZ6+TfpY+Z7piUwu98L+li+P5NC+3QtDhsGHJQIiQASQej66qwk7DFIXhCs0QLtzcgN5eWXuAY=
It looks like pthread_getspecific returns null in certain cases instead of returning a pointer to (I think) the first thread in the program.
I seem to be able to get it to explode in both the DynBVH preprocess and the PinholeCamera preprocess:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000018
0x023f8929 in Manta::Thread::couldBlock (why=0x34b25fb "Barrier for preprocessing") at /Users/abe/Manta/Core/Thread/Thread.cc:370
370 Thread_private* p=Thread::self()->priv_;
1: thread_key = 267
(gdb) bt
#0 0x023f8929 in Manta::Thread::couldBlock (why=0x34b25fb "Barrier for preprocessing") at /Users/abe/Manta/Core/Thread/Thread.cc:370
#1 0x023fe378 in Manta::Barrier::wait (this=0x96009c, n=1) at Barrier_default.cc:89
#2 0x023aba94 in Manta::PreprocessContext::done (this=0xb0a47be0) at /Users/abe/Manta/Interface/Context.cc:35
#3 0x02297c0d in Manta::PinholeCamera::preprocess (this=0x3b4d820, context=@0xb0a47be0) at /Users/abe/Manta/Model/Cameras/PinholeCamera.cc:547
#4 0x033293cd in Manta::RTRT::doPreprocess (this=0x960000, proc=0, numProcs=1) at /Users/abe/Manta/Engine/Control/RTRT.cc:573
#5 0x0332ccc2 in Manta::RTRT::internalRenderLoop (this=0x960000, proc=0, lateComerFlag=false) at /Users/abe/Manta/Engine/Control/RTRT.cc:686
#6 0x0332e4ae in Manta::RTRT::Worker::run (this=0x3b1ec80) at /Users/abe/Manta/Engine/Control/RTRT.cc:115
#7 0x0346c1c0 in Manta::Thread::run_body (this=0x3bcb560) at /Users/abe/Manta/Core/Thread/Thread.cc:142
#8 0x03470c16 in Thread_run (t=0x3bcb560) at /Users/abe/Manta/Core/Thread/Thread_pthreads.cc:450
#9 0x034727d7 in run_threads (priv_v=0x3bcb1e0) at /Users/abe/Manta/Core/Thread/Thread_pthreads.cc:468
#10 0x9090fc55 in _pthread_start ()
#11 0x9090fb12 in thread_start ()
Around #4 it looks like this has something to do with the update graph stuff. Is there any strange threading stuff happening there?
Abe
On Tue, Apr 8, 2008 at 11:27 AM, Solomon Boulos <
boulos@cs.utah.edu> wrote:
I broke something on Linux a few days ago that I can't seem to reproduce depending on the system. With hex and taz not mounting /usr/sci/data it is even worse.
My guess is that the switch to partitionObjects is producing some bad behavior for the sweep build (to be clear, which BVH build are you using?) and that the crash in the barrier is a side affect.
Hi, Does anyone know what is going on with the DynBVH builder? It appears to be breaking while waiting at a barrier when there is only one thread:
(gdb) frame
#0 0x03e0e2f5 in Manta::Thread::couldBlock (why=0x34b25fb "Barrier for preprocessing") at /Users/abe/Manta/Core/Thread/Thread.cc:370
370 Thread_private* p=Thread::self()->priv_;
(gdb) p Thread::self()
$13 = (Manta::Thread *) 0x0
(gdb) bt
#0 0x03e0e2f5 in Manta::Thread::couldBlock (why=0x34b25fb "Barrier for preprocessing") at /Users/abe/Manta/Core/Thread/Thread.cc:370
#1 0x03e13f42 in Manta::Barrier::wait (this=0x96009c, n=1) at Barrier_default.cc:89
#2 0x03dc5114 in Manta::PreprocessContext::done (this=0xb0bc1be0) at /Users/abe/Manta/Interface/Context.cc:35
#3 0x03d66673 in Manta::Group::preprocess (this=0x3ba8e00, context=@0xb0bc1be0) at /Users/abe/Manta/Model/Groups/Group.cc:154
#4 0x022ab244 in Manta::DynBVH::preprocess (this=0x9b5600, context=@0xb0bc1be0) at /Users/abe/Manta/Model/Groups/DynBVH.cc:717
#5 0x03329253 in Manta::RTRT::doPreprocess (this=0x960000, proc=0, numProcs=1) at /Users/abe/Manta/Engine/Control/RTRT.cc:567
#6 0x0332ccc2 in Manta::RTRT::internalRenderLoop (this=0x960000, proc=0, lateComerFlag=false) at /Users/abe/Manta/Engine/Control/RTRT.cc:686
#7 0x0332e4ae in Manta::RTRT::Worker::run (this=0x3bae040) at /Users/abe/Manta/Engine/Control/RTRT.cc:115
#8 0x0346c1c0 in Manta::Thread::run_body (this=0x3bb01b0) at /Users/abe/Manta/Core/Thread/Thread.cc:142
#9 0x03470c16 in Thread_run (t=0x3bb01b0) at /Users/abe/Manta/Core/Thread/Thread_pthreads.cc:450
#10 0x034727d7 in run_threads (priv_v=0x3bb0c00) at /Users/abe/Manta/Core/Thread/Thread_pthreads.cc:468
#11 0x9090fc55 in _pthread_start ()
#12 0x9090fb12 in thread_start ()
(gdb)
If I modify PreprocessContext::done() to not call wait on the barrier if numProcs==1 then it works, but I'm curious is there is a better solution. I'm not really sure what the state of the parallel build stuff is at the moment.
Thanks-
Abe
Archive powered by MHonArc 2.6.16.