[VSDK] Macho PB 1.9.8

Totte Alm totte at code66.se
Sat Oct 4 09:21:59 CDT 2003


lördagen den 4 oktober 2003 kl 08.28 skrev Ruslan Zasukhin:

> on 10/3/03 10:51 PM, Totte Alm at totte at code66.se wrote:
>
> Hi Totte,
>
>> II have had a problem reported from time to time from my client that I
>> havent been able to pinoint,
>> but I was lucky to to get it.
>>
>> I have my shelltools tat I run form doing "multithreading" of  
>> Valentina
>> operations. I close the DB in the main app, fire a
>> subtask that does lenghty operantions like munching troough all  
>> records
>> with big operations, or printing many reports.
>>
>> Sometimes, one of those processs just STALL. The process goes down to
>> ZERO % CPU, but still live.
>>
>> I sampled one of those, and here is the result.
>>
>> # Report 0 - Timed Samples for ShellBundler (process 4863)
>> Stacks at 2003-10-03 21:47:38 +0200
>> Samples (displayed/total): 377/377
>> Call graph:
>>    377 Thread_6907
>>      377 start
>>        377 _start
>>          377 main
>>            377 RunBundler(BundleInfoRecord*)
>>              377 BUBundler(BundleInfoRecord*)
>>                377 StdBundler(BundleInfoRecord*)
>>                  377 MakeBundle(VDK_Cursor*, VDK_Cursor*,
>> BundleInfoRecord*)
>>                    377 FBL_IndexedTable::AddRecord(bool)
>>                      377 BF_STRING::AddToIndex(unsigned long,
>> FBL_FieldSorter*, char const*, bool)
>>                        377 FBL_SecondaryIndex::AddPair(unsigned long)
>>                          377 FBL_SecondaryIndex::Open()
>>                            377 FBL_SecondaryIndex::OpenFirstTime()
>>                              377 FBL_SecondaryIndex::BuildIndex()
>>                                377 FBL_Task::DoIndexing(FBL_Task*)
>>                                  377 FBL_IndexerTask::Run()
>>                                    377 pthread_mutex_lock
>>                                      377 semaphore_wait_trap
>>                                        377 semaphore_wait_trap
>>
>> looks like it freezed dead on a semaphore wait trap down in
>> FBL_IndexerTask::Run().
>>
>> Gives you any clues??
>
> Actually not many.
>
> It will be great if you will make some simple project that reproduce  
> this.
>
This is  rare problem,  happens a couple a times a week, its very  
irritating for the client as it just keeps "spinning" barberpole  
progressba, in my main app.


> Note, it start BuildIndex(), which did not exists.
Not exist?? Hm, its not in my code, so it must be in VSDK. Can it be a  
problem with cursors -> same table where I insert? But I MUST do it  
that way.

>

> In main app no freeze?
When I this running as a singlethreaded app (from terminal window),  
yes, hang. The task isnt a PThread "really", but run like a terminal  
tool using system();
>
> What difference between them?
nope. The same code, but there are 1000s of databases, and the larger  
the database is, the greater probability this happens.

The bundler process really walks from record 1 -> record n, using two  
cursors, comparing record cursor1 with cursors2+1, and if they match,  
creates a new record of th same kind in
the table. This is done by
MakeBundle(VDK_Cursor*, VDK_Cursor*, BundleInfoRecord*), which picks  
data from the two, and summary up shares etc.


>
> Main app also macho?

Yes
> Also use pthreads?
Not threaded ( as VDK 1.x isnt threadsafe, but we been there before  
havent we), so the threading is done this way (closing database, fire a  
too), the when tool done, it tells main app, and it reopens the  
database.

//Totte

>
>
> --  
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list go to:
> http://lists.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>
------------------------------------------------------------------------ 
-------------
sleep is a state of mind I have vague memories of.....



More information about the Valentina mailing list