Root slow at startup when NOT connected to the internet

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

Hi I am also experiencing this type of problem. Anyone has ever fixed it?

time root -l -q
root [0]

real 0m32.797s
user 0m0.069s
sys 0m0.037s

Thank you

Hi,

what version of OSX are you running? If OSX, try:

sudo dtruss $ROOTSYS/bin/root.exe

to see where it is waiting. It might give you a hint of what is misconfigured.

Cheers, Fons.

[quote=“rdm”]

what version of OSX are you running? If OSX, try:

sudo dtruss $ROOTSYS/bin/root.exe

to see where it is waiting. It might give you a hint of what is misconfigured.

Cheers, Fons.[/quote]

Hi,

sw_vers
ProductName: Mac OS X
ProductVersion: 10.6.8
BuildVersion: 10K549

uname -a
Darwin tesla.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64

output of your command is in the attached file.

Thank you so much for helping out.
start_root.txt (205 KB)

The problem is sorted (for me at least).

I had to change the name of the computer. If you go to System Preference -> Sharing and type the same name on the Computer Name as for example,
tesla

then match it with command via terminal:
sudo scutil --set HostName tesla.local

when these two are different, root hangs at startup.

I hope this helps.