|
From: Ken M. <ken...@sp...> - 2010-06-30 22:24:33
|
I tried that, but the problem persists (still getting occasional segfaults or aborts). On 30-Jun-10, at 2:19 PM, Jeff Hobbs wrote: > On 30/06/2010 1:46 PM, Ken Mackay wrote: >> I am trying to use thread pools to run jobs concurrently on OS X >> 10.6. The tclsh says that patchlevel is 8.5.7, and the Thread package >> is version 2.6.5. I had to patch the Thread package because >> tpool::create would always crash, due to a buffer being too small (I >> believe this is already patched in CVS - see http://sourceforge.net/ >> tracker/?func=detail&aid=2833864&group_id=10894&atid=110894). > > Can you try the latest CVS head or at least Thread 2.6.6 final? > There are several bugs I see patched (like race conditions and safe > obj handling) that should be tried before ruling them out as > possible fixes already. > > Jeff > >> Here is a simplified version of my code: >> >> package require Thread >> set pool [tpool::create -maxworkers 4] >> set joblist [list] >> >> foreach job<jobs to do> { >> lappend joblist [tpool::post $pool $job] >> } >> >> foreach job $joblist { >> tpool::wait $pool $job >> if {[catch {tpool::get $pool $job} m]} { >> puts "Error: $m" >> exit 1 >> } >> } >> >> while {[tpool::release $pool]} {} >> >> Usually everything works fine. However, occasionally the interpreter >> will crash in Tcl_FinalizeThread - either a segfault or an abort. Is >> there something I am doing wrong? I have crash dump output: > ... |