Hi Marc, hi Volker, just a few additional remarks... Marc Hemberger wrote: > - Volker was talking about a system hang up because of a kind of deadlock in > the TMonitor::Select() call; > - You are talking about a potential clash of Root internal list because of the > not-thread-safe nature of these "global" lists. > > So, in my review, I would say, you are talking about two very different > things: ROOT system crash (as implied by your statement about long-living > applications over days) versus a TMonitor::Select() hang up (nothimg is > received by the file descriptor). Well, in fact I was talking about _several_ different aspects one should be aware if using ROOT TThreads and ROOT TSockets. Since I did not know Volkers problem exactly, I just gave general advice from my experience. > A never returning Select() might have several reasons, but "unsafe" lists in > ROOT should lead sooner or later but always to a system crash, as you > mentioned it correctly. I don't see how unprotected lists could produce a > deadlock. As mentioned in my previous mail, the TMonitor::Select in the current ROOT version 3.02 internally calls the TUnixSystem::DispatchOneEvent, which lets the system proceed until the fReady member of the TMonitor instance is set to the TSocket object that is ready to be read. Since the DispatchOneEvent() processes all the non threadsafe ROOT system lists, calling TMonitor::Select() simultaneously from different threads possibly _can_ produce a system crash. Therefore I would not do it. (By the way, what is TMonitor::Select in a thread good for if each thread can receive from his dedicated TSocket anyway?) However, Volkers problem of the never returning TMonitor::Select() in the interpreter mode has nothing to do with the general risk of a crash; I guess it stems from the fact that the TRint behaves different than the TApplication, so the effect of calling gSystem->InnerLoop() in the Select() is different as well...? Best regards, Joern -- ///////////////////////////////////////////////////////////////////// // Dr. J"orn Adamczewski (J.Adamczewski@gsi.de) // // GO4 project team Tel: +49-6159-71-2554 // // Datenverarbeitung & ExperimentElektronik FAX: +49-6159-71-2986 // // Ges. f. SchwerIonenforschung, Planckstr.1, D-64291 Darmstadt //
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:05 MET