Root slow at startup when NOT connected to the internet

Hi,
I’m experiencing some strange behavior when trying to start ROOT if no internet connection is available.
This is somehow the opposite that was reported in a previous post (/viewtopic.php?p=27484).

Whenever I try to launch ROOT if no net is available or I have restricted access to the net (e.g. a hotel network…), it can take up to ~30s. Here’s the output I get doing “time root”:

[andrea@Cerbero:~] time root -l -q
root [0]

real 0m32.146s
user 0m0.106s
sys 0m0.029s

I’m running ROOT 5.26 on a MacOSX10.6… Does anybody have an idea of what it could be?
Thanks in advance,
andrea

What is the result for the second call to “time root -l -q” ?

Rene

Actually it is (nearly) the same:

[andrea@Cerbero:~] time root -l -q
root [0]

real 0m32.148s
user 0m0.107s
sys 0m0.026s

andrea

Does anyone have any suggestion about this problem? It’s really annoying…
Thanks,
a.

Do you have a rootlogon.C file ?

Rene

Hi could you try:

To try to see what goes on during the wait use the dtruss command:

This should print all system calls made by the program, like strace on Linux.

Cheers, Fons.

If I do sudo dtruss -e root -l -q I get a number of lines which seem to not take long. The last few lines look as follos:

8 sigaction(0x2, 0x7FFF5FBFD7C0, 0x7FFF5FBFD8D0) = 0 0
3 sigaction(0x3, 0x7FFF5FBFD7C0, 0x7FFF5FBFD8C0) = 0 0
3 sigaction(0x1E, 0x7FFF5FBFD7C0, 0x7FFF5FBFD8B0) = 0 0
root [0]
32172211 wait4(0x29C0, 0x7FFF5FBFD90C, 0x2) = 10688 0

So it seems that the wait4 is making it wait (for much more than 4 seconds!)
Thanks if you have any suggestion.

Andrea

Is the command root.exe -b also slow?

Yes… :frowning:

so please do dtruss on “root.exe” and not “root” which is just a front-end program used to start root.exe.
Let me know.

Cheers, Fons.

Hi,
I’ve saved the whole output of dtruss on root.exe here:
cmsdoc.cern.ch/~abenagli/dtruss.txt

Cheers and thanks

a.

Hi,

does this trace represent:

If so why do I see all kind of analysis code at the end of the trace? if so can you check you ~/.rootlogon.C or ./.rootlogon.C as Rene asked, if not please run just with -b -q and you can see for yourself in the dtruss trace where it spents 30 seconds waiting.

Cheers, Fons.

That’s strange, indeed. I have un-aliased the root command before executing dtruss (for me, root stands for root -l rootLogon.C), and indeed, if I run root after un-aliasing, the rootLogon.C is not loaded at startup.

I don’t know why I see traces of that (and of other macros I runned yesterday) when executing dtruss…

And with this unaliasing do you still the same startup issue. On my Mac without network connection I have:

[code]$ time root.exe -b -q
ROOT 5.27/03 (trunk@33530, May 17 2010, 17:57:47 on macosx64)
root [0]

real 0m0.483s
user 0m0.093s
sys 0m0.024s[/code]

Cheers, Fons.

I don’t know if this can provide any insight, but it seems to me that it gets stuck during this process:

23749491 kevent(0x3, 0x0, 0x0) = -1 Err#4
(23749491 should be ~23 seconds…)

I haven’t got the slightest idea of what this could mean.
If it is clear to you what’s happening, I would be grateful, otherwise I’m starting to get used to the idea of not using root when I’m not in my office :wink:

(for the record, I have tried with pre-compiled binaries of different root releases (down to 5.10) and compiling the latest 5.27 from source, but the behavior is always the same).

Thanks again and sorry for the trouble,

cheers,
andrea

I am puzzled as I cannot reproduce this on any of my Macs without network connection. Also Google does not help. Could you pass by my office at CERN with the machine?

Cheers, Fons.

Hello, I’m facing the same problem on my mac. Actually, when is it rebooted and not connected to network root starts quickly. However, if I put the computer to sleep and then open it again (still no connection to network), Root starts very slowly. I have found out (using the process snapshot in the activity monitor) that it stops on TUnixSystem:GetHostByName(char const*). So obviously, it’s trying to get the IP address, but stops on a timeout.
How to fix this? Once I connect to network, all is fine. But today I did some work on a plane and airlines are still not always providing an internet connection :slight_smile:

Hi,

yes, somebody else reported a while back the same issue, which was then found to be a misconfigured hostname lookup when not connected to the network. Can you redo the experiment and tell me what is in /etc/resolv.conf and /etc/hosts when things hang?

Cheers, Fons.

Hi,

resolv.conf is automatically generated and in the case when the problem appears it does not exists as no network interface is connected. /etc contains just a symbolic link which points to non-existent file.
/etc/hosts :

Host Database

localhost is used to configure the loopback interface

when the system is booting. Do not change this entry.

127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
192.168.0.20 aussik
192.168.0.5 diskstation

I have tried to remove all four last lines, but it did not help.

Thanks,
Josef

Hi, I’m wondering if there was a resolution to these discussion as I’m having the same problems.
Thanks!
~Karen