[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] 'Host not found' after OS upgrade



On 27 Dec 2013, at 13:44, adc <alberto.decampo@xxxxxxxxx> wrote:

> hi scott :-) 
> 
> it seems two things mix here -  
> calls to NetAddr:isLocal (actually matchLangIP) being broken, 
> and depending on the semi-random order of initClassTree, 
> the Startup sequence sometimes tripping over that, 
> leaving SC in mostly unusable state.
> 
> Reproducer for NetAddr:isLocal is trivial:
> // both of these returns the class NetAddr, not a boolean:
> Server.local.addr.isLocal; 
> Server.internal.addr.isLocal;

The first returns true for me, the second false as it's 0.0.0.0, but I thought the internal server is dead anyway, or?
> 
> Reproducer for the long error 
> 	resolve: Host not found (authoritative)
> 	ERROR: Non Boolean in test.

The Boolean test is a symptom of the unresolved host. I think I can solve that, but what is it that needs to be inited before isLocal is called? The fact that you get this even with your modification suggests a problem elsewhere, maybe in _GetHostByName

S.

> 
> is trickier:  it depends on the the semi-random order in which 
> Class.initClassTree inits classes. 
> Sometimes it hangs there directly when starting SC 3.7.0a, 
> sometimes after 5-10 recompiles while working on classes or 
> help files, after installing more quarks, but I have no simple reproducer. 
> 
> To track down where in the sequence it happens, 
> I've added a post to initClassTree to see the actual order;
> and that order does seem to change when you change classes, 
> install quarks etc.
> 
> 	*initClassTree { arg aClass;
> 		var implementsInitClass;
> 		// sometimes you need a class to be inited before another class
> 		// start the process: Class.initClassTree(Object)
> 		if(classesInited.isNil, { classesInited = IdentitySet.new });
> 		if(classesInited.includes(aClass).not, {
> 			if(aClass.isMetaClass.not and: { aClass.class.findMethod(\initClass).notNil }, {
> 				("-----> initClassTree: " + aClass + "...?").postln;
> 					aClass.initClass;
> 				("-----> initClassTree: " + aClass + "OK.").postln;
> 			});
> 
> 			classesInited.add(aClass);
> 			if(aClass.subclasses.notNil,{
> 				aClass.subclasses.do({ arg class; this.initClassTree(class); });
> 			});
> 		});
> 	}
> 
> thanks for taking that up! 
> 
> best, adc
> 
> 	
> 
> On 27/12/2013, at 12:37 , Scott Wilson <i@xxxxxxxxxxxxxx> wrote:
> 
>> I have an idea about this, but I don't see it myself. Can either of you suggest a reproducer?
>> 
>> S.
>> 
>> On 26 Dec 2013, at 21:47, adc <alberto.decampo@xxxxxxxxx> wrote:
>> 
>>> Hi, 
>>> 
>>> I am seeing this on OSX 10.8.5 as well, so it is not linux specific. 
>>> Logging out and logging back in seems to help, but it keeps coming 
>>> back after several recompiles. 
>>> 
>>> I tried overwriting the NetAddr:isLocal like this: 
>>> 
>>> 	*matchLangIP { |ipstring|
>>> 		^ipstring == "127.0.0.1";
>>> 	}
>>> 
>>> 	// *matchLangIP {|ipstring|
>>> 	// 	_MatchLangIP
>>> 	// }
>>> 
>>> but strangely, I still get the same error. 
>>> 
>>> best, adc
>>> 
>>> 
>>> On 26/12/2013, at 19:32 , Phil Thomson <supercollider@xxxxxxxxxxxxxx> wrote:
>>> 
>>>> On Wed, 25 Dec 2013 08:45:45 +0800
>>>> James Harkins <jamshark70@xxxxxxxxx> wrote:
>>>> 
>>>>> On Dec 25, 2013 4:12 AM, "Phil Thomson" <supercollider@xxxxxxxxxxxxxx>
>>>>> wrote:
>>>>>> compile done
>>>>>> resolve: Host not found (authoritative)
>>>>>> ERROR: Non Boolean in test.
>>>>>> RECEIVER:
>>>>>> class NetAddr (0x39fe700) {
>>>>> 
>>>>> I don't know the solution, but I think this is what's happening.
>>>>> 
>>>>> The test that's failing is here, in Server:
>>>>> 
>>>>> newScopeBufferAllocators {
>>>>>             if (isLocal)
>>>>> 
>>>>> The isLocal variable gets set in Server's init method: "isLocal =
>>>>> inProcess || { addr.isLocal };" which leads to NetAddr:
>>>>> 
>>>>> isLocal { ^this.class.matchLangIP(this.ip) }
>>>>> 
>>>>>     *matchLangIP {|ipstring|
>>>>>             _MatchLangIP
>>>>>     }
>>>>> 
>>>>> This primitive should return a boolean or throw a descriptive error,
>>>>> but instead, under this rare case, it simply returns the class
>>>>> itself, which is how NetAddr got into the "if" test.
>>>>> 
>>>>> If the SC code were fixed, though, you'd still have the "Host not
>>>>> found" problem, which depends on something in the OS. I'm afraid I
>>>>> haven't much time to look into that today, but I'm quite sure you'll
>>>>> have other problems with SC (maybe with networking in general)
>>>>> without dealing with this issue (and I don't believe it's an SC
>>>>> configuration problem).
>>>>> 
>>>>> hjh
>>>> 
>>>> Not sure what my next step is. Should I contact the CCRMA folks? Is
>>>> this an OS bug?
>>>> 
>>>> _______________________________________________
>>>> sc-users mailing list
>>>> 
>>>> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>>>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>>>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>>> 
>>> 
>>> _______________________________________________
>>> sc-users mailing list
>>> 
>>> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>> 
>> 
>> _______________________________________________
>> sc-users mailing list
>> 
>> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
> 
> 
> _______________________________________________
> sc-users mailing list
> 
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/