Re: TThread and ROOT-5.08 (fwd)

From: Diego Faso <faso_at_to.infn.it>
Date: Tue, 7 Feb 2006 18:45:16 +0100 (MET)


Hello. Yes: the problem still occurs, even with the head version (i have just downloaded and compiled it). I tried to comment the lines in which threads are deleted, but I got the same error message while quitting root. I confirm that the problem does not occur with root-5.06/00. Thank you again, best regards.
Diego

On Tue, 7 Feb 2006, Constantin Loizides wrote:

> Hi Diego,
>
> I did not see anyone responding. Is this still an issue?
>
> I tried it today on my setup and it works without
> any errors reported. My setup however is quite
> different: FC4, x86_86, gcc v4.0 and root v5-08-00b.
>
> Regards,
> Constantin
>
> Diego Faso wrote:
> > Hello, I'm using TThread with root-5.08 on the following machine setup:
> >
> > Linux : Gentoo Base System version 1.12.0_pre13
> > gcc : gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
> > glibc : glibc-2.3.6-r2
> > kernel: 2.6.12-gentoo-r10; i686 Intel(R) Pentium(R) 4
> >
> > You can find my root configuration in the attached file "config.status".
> >
> > If I run the simple macro "TestConstructor.C" (see attachment) it runs
> > without problems, but I get the following message while quitting root:
> >
> > *** glibc detected *** double free or corruption (out): 0x406e2bc8 ***
> >
> > This problem does not occur with previous versions of root.
> >
> > The same problem occurs with the following configuration:
> > Linux : Gentoo Base System version 1.12.0_pre15
> > gcc : gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)
> > glibc : glibc-2.3.6-r2
> > kernel: 2.6.15-gentoo-r1; i686 Intel(R) Pentium(R) 4
> >
> > I will copy the complete output of the macro execution at the end of this
> > e-mail.
> >
> > Thank you for your support, cheers
> > Diego
> >
> >
> > _______________________________________________________________________
> >
> > localhost tests $ root TestConstructor.C++
> > *******************************************
> > * *
> > * W E L C O M E to R O O T *
> > * *
> > * Version 5.08/00 13 December 2005 *
> > * *
> > * You are welcome to visit our Web site *
> > * http://root.cern.ch *
> > * *
> > *******************************************
> >
> > FreeType Engine v2.1.9 used to render TrueType fonts.
> > Compiled on 17 January 2006 for linux with thread support.
> >
> > CINT/ROOT C/C++ Interpreter version 5.16.5, November 30 2005
> > Type ? for help. Commands must be C++ statements.
> > Enclose multiple statements between { }.
> > root [0]
> > Processing TestConstructor.C++...
> > Info in <TUnixSystem::ACLiC>: creating shared library
> > /home/finuda/sftw_test/TThread/tests/./TestConstructor
> > _C.so
> > Thread State
> > 1 my_thread_1:0xffffffff Idle
> > Execution should be in progress
> > Thread State
> > 1 my_thread_1:0x4002 Running
> > Hello from thread 1
> > clean_push_ret = 0
> > Custom cleanup (999) called
> > clean_pop_ret = 0
> > I'm thread 1: i = 0
> > I'm thread 1: i = 1
> > I'm thread 1: i = 2
> > I'm thread 1: i = 3
> > I'm thread 1: i = 4
> > I'm thread 1: i = 5
> > I'm thread 1: i = 6
> > I'm thread 1: i = 7
> > I'm thread 1: i = 8
> > I'm thread 1: i = 9
> > I'm thread 1: i = 10
> > I'm thread 1: i = 11
> > I'm thread 1: i = 12
> > I'm thread 1: i = 13
> > I'm thread 1: i = 14
> > I'm thread 1: i = 15
> > I'm thread 1: i = 16
> > I'm thread 1: i = 17
> > I'm thread 1: i = 18
> > I'm thread 1: i = 19
> > I'm thread 1: i = 20
> > I'm thread 1: i = 21
> > I'm thread 1: i = 22
> > I'm thread 1: i = 23
> > I'm thread 1: i = 24
> > I'm thread 1: i = 25
> > I'm thread 1: i = 26
> > I'm thread 1: i = 27
> > I'm thread 1: i = 28
> > I'm thread 1: i = 29
> > Bye bye from thread 1
> > Thread State
> > 1 my_thread_1:0x4002 Canceled
> > Now cleaning
> > Thread State
> > 1 my_thread_1:0x4002 Canceled
> > Now deleting
> > Bye bye...
> > root [1] .q
> > *** glibc detected *** double free or corruption (out): 0x406e2bc8 ***
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > //////////////////////////////////////////////////////////////
> > // TestConstructor() //
> > // Author: Diego Faso //
> > // This macro is a simple example of threads constructor //
> > // and id management //
> > // //
> > // Deletion and Cleaning-Up are also tested. //
> > //////////////////////////////////////////////////////////////
> >
> > #include <Riostream.h>
> > #include "TThread.h"
> >
> > void mycleanup1(void *arg){
> >
> > TThread::Printf("Custom cleanup (%d) called",(Int_t)arg);
> > }
> >
> > void *handle1(void *ptr){
> >
> > TThread::Printf("Hello from thread %d",(Int_t) ptr);
> >
> > Int_t clean_push_ret = TThread::CleanUpPush((void *)&mycleanup1,(void *)999);
> > TThread::Printf("clean_push_ret = %d",clean_push_ret);
> >
> > Bool_t PopUserFunc = 1; // true if you you want to pop out of the stack the user cleanup function
> > Int_t PopExe = -1;
> > PopExe = 1; // will execute (now) user cleanup function
> > //PopExe = 0; // will not execute user cleanup function
> >
> > if(PopUserFunc){ // pop user cleanup function out of stack (with/without executing it now)
> > Int_t clean_pop_ret = TThread::CleanUpPop(PopExe);
> > TThread::Printf("clean_pop_ret = %d",clean_pop_ret);
> > }
> > ///////////////////////////////////////////////////////////////////////////
> > // User cleanup method can be reloaded into the stack
> > /*
> > clean_push_ret = TThread::CleanUpPush((void *)&mycleanup1,(void *)999);
> > TThread::Printf("clean_push_ret = %d",clean_push_ret);
> > */
> > ///////////////////////////////////////////////////////////////////////////
> >
> > for(Int_t i=0;i<30;i++){
> > TThread::Printf("I'm thread %d: i = %d",ptr,i);
> > usleep(100000);
> > }
> > TThread::Printf("Bye bye from thread %d",ptr);
> >
> > return 0;
> > }
> >
> >
> > void TestConstructor(){
> > #ifdef __CINT__
> > cout << "This script can only be executed via ACliC:" << endl;
> > gApplication->Terminate();
> > return;
> > #endif
> >
> >
> > TThread *th1 = new TThread("my_thread_1",handle1,(void *)1);
> > TThread::Ps();
> >
> >
> > th1->Run();
> >
> > TThread::Printf("Execution should be in progress");
> > TThread::Ps();
> >
> > th1->Join(); // needed to make this macro work
> >
> > TThread::Ps();
> >
> > TThread::Printf("Now cleaning"); // not needed if the thread has already been cancelled (completed)
> > th1->CleanUp(); //
> > TThread::Ps();
> >
> > // Exit will terminate the calling thread
> > /*
> > TThread::Printf("Now exiting thread");
> > th1->Exit(); // will exit from application; NOTE: th1->Join() is needed
> > TThread::Ps();
> > */
> >
> > TThread::Printf("Now deleting");
> > TThread::Delete(th1);
> > delete th1; // not really needed
> > th1 = 0;
> > TThread::Printf("Bye bye...");
> >
> > }
> >
> >
> > ------------------------------------------------------------------------
> >
> > linux --enable-cern --with-cern-libdir=/cern/pro/lib --enable-asimage --enable-builtin-afterimage --enable-mathcore --enable-cintex --enable-reflex --enable-roofit --enable-soversion --enable-mysql --with-mysql-incdir=/usr/include/mysql --with-mysql-libdir=/usr/lib/mysql --enable-thread --with-thread-libdir=/usr/lib --disable-alien --disable-chirp --disable-pgsql --disable-dcache --disable-oracle --enable-opengl --with-opengl-incdir=/usr/include --with-opengl-libdir=/usr/lib
>
>
> --
> Tel: +1-617-8301823 (SkypeIn)
> Skype: loizides
> AOL: ConLoi / ICQ: 114824520
>

Received on Tue Feb 07 2006 - 18:45:37 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET