From ROOT import gROOT


looking at the subject is easy to see that my talking about pyROOT; it works for most of the things unfortunately when I try to exit (from an execution of a py or directly from the python prompt) it stalls and CPU usage for python raises to 90%.

The most easy way to test my situation is from python prompt;

just doing

from ROOT import TFile

and then ctrl-D to exit, it does what i described previously.
As i told you, in general all the scripts are executed well… it just not exits!

I am using AMD64 + ROOT 4.02/00 + python2.3 on a Mandrake64 10.1
and just as last point, the same environment worked few weeks ago using a Mandrake10.0 + ROOT 4.00/08

any hints or patches?


well, I’ve been trying for a while, but am unable to reproduce this problem. Also, there
is AFAIK nothing in PyROOT that executes on exit (the cleanup handler for ROOT is
the only thing, but that doesn’t run after just “from ROOT import TFile”).

Could you please do:

 $ gdb python
 (gdb) run
 >>>  from ROOT import TFile
 >>> ^D

and then break (^C) when you experience the problem? Then, on the gdb prompt, run
the “where” command to get a traceback to see which function is eating the CPU


thanks :slight_smile:

below you can find the attachement with your request.
whereGDBPython.txt (16.1 KB)

Thanks for the traceback.

[quote]#0 0x0000002a9605cd91 in mallopt () from /lib64/tls/
#1 0x0000002a9605c72c in mallopt () from /lib64/tls/
#2 0x0000002a9605a799 in malloc () from /lib64/tls/
#3 0x0000002a95c49d9a in operator new () from /usr/lib64/
#4 0x0000002a95c49eb9 in operator new[] () from /usr/lib64/
#5 0x0000002a96c1ea56 in TStorage::Alloc () from /opt/root/lib/
#6 0x0000002a96c63a6c in TOrdCollection::Init () from /opt/root/lib/
#7 0x0000002a96c63b0f in TOrdCollection::Delete () from /opt/root/lib/
#8 0x0000002a96be2e15 in TEnv::~TEnv () from /opt/root/lib/
#9 0x0000002a96c67e84 in TCint::~TCint () from /opt/root/lib/
#10 0x0000002a96c178ca in TROOT::~TROOT () from /opt/root/lib/
#11 0x0000002a96020d65 in exit () from /lib64/tls/
#12 0x0000002a9600c4c1 in __libc_start_main () from /lib64/tls/
#13 0x000000000040081a in _start ()

Well, I’d be surprised if python would be the cause of the problem: it’s routines
are in C and (should) have all run at this point. Also, looking at the ROOT code
that is traced above, it all seems to be fast (unless you have a monstruous number
of environment variables?).

Me puzzled. I’ll poke around a bit more later, but can’t promise a solution.


ok… give me a call if you have some news :slight_smile:
Meanwhile don’t worry I will check on my machine just the root scripts reserving the py for the production system machine (not a usual 32bit machine). Perhaps you could find usefull also this information: i ran the same script with the same system i described to you but it was a Mandrake64 10.0, meanwhile now i am using a Mandrake64 10.1 (i like mandrake but the 10.1 is getting me crazy…)