Zinc intermittently returning nil

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Zinc intermittently returning nil

Sean P. DeNigris
Administrator
The following all intermittently return nil. When I do the same thing in Safari, I always seem to get the correct answer (plain text).

(ZnEasy get: 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29') contents.

(ZnClient new get: 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29') contents.

(ZnUrl fromString: 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29') retrieveContents.

Even this returns nil intermittently (maybe less frequently, not sure):
client := ZnClient new.
client
        systemPolicy;
        url: 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29';
        accept: ZnMimeType textPlain.
       
client get contents.

Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Zinc intermittently returning nil

Schwab,Wilhelm K
I know *nothing* about Zinc, but my first thought is weak collections and how they are not thread safe (which they need to be) and are not self-repairing after finalization - they end up w/ retained nils.

Dolphin blazed the correct trail on this in the mid to late 90s.


________________________________________
From: [hidden email] [[hidden email]] on behalf of Sean P. DeNigris [[hidden email]]
Sent: Tuesday, June 26, 2012 11:33 PM
To: [hidden email]
Subject: [Pharo-project] Zinc intermittently returning nil

The following all intermittently return nil. When I do the same thing in
Safari, I always seem to get the correct answer (plain text).

(ZnEasy get:
'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
contents.

(ZnClient new get:
'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
contents.

(ZnUrl fromString:
'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
retrieveContents.

Even this returns nil intermittently (maybe less frequently, not sure):
client := ZnClient new.
client
        systemPolicy;
        url:
'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29';
        accept: ZnMimeType textPlain.

client get contents.

Sean

--
View this message in context: http://forum.world.st/Zinc-intermittently-returning-nil-tp4636820.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Zinc intermittently returning nil

Sven Van Caekenberghe
In reply to this post by Sean P. DeNigris
Yes, that is *very* strange (latest 2.0, latest VM).

Thanks a lot for reporting an intermittent bug, Sean ;-)

On 27 Jun 2012, at 05:33, Sean P. DeNigris wrote:

> The following all intermittently return nil. When I do the same thing in
> Safari, I always seem to get the correct answer (plain text).
>
> (ZnEasy get:
> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
> contents.
>
> (ZnClient new get:
> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
> contents.
>
> (ZnUrl fromString:
> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
> retrieveContents.
>
> Even this returns nil intermittently (maybe less frequently, not sure):
> client := ZnClient new.
> client
> systemPolicy;
> url:
> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29';
> accept: ZnMimeType textPlain.
>
> client get contents.
>
> Sean
>
> --
> View this message in context: http://forum.world.st/Zinc-intermittently-returning-nil-tp4636820.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Zinc intermittently returning nil

Sven Van Caekenberghe
This will be hard to debug. I known that sometimes there are odd failures using Zdc, but I can't put my finger on them. Any help would be greatly appreciated.

I just added an extra test to the Zinc-Zodiac functional test package:

---
Name: Zinc-Zodiac-SvenVanCaekenberghe.13
Author: SvenVanCaekenberghe
Time: 27 June 2012, 1:57:30.506 pm
UUID: dcc9a44f-f484-434f-bf7d-c44a1cb9c18e
Ancestors: Zinc-Zodiac-SvenVanCaekenberghe.12

added an HTTPS transfer stress test reading odd sized files from Amazon S3 in size between 2 KB and 100 KB checking the full contents to make sure the whole transfer was OK
---

Like all other tests, this one works for me, all the time. Here is the code:

testTransfers
        (Integer primesUpTo: 100) do: [ :each | | size client |
                size := 1024 * each + each.
                (client := ZnClient new)
                        https;
                        host: 's3-eu-west-1.amazonaws.com';
                        addPath: 'public-stfx-eu';
                        addPath: ('test-', size asString, '.txt');
                        get;
                        close.
                self assert: client isSuccess.
                self assert: client response contentType equals: ZnMimeType textPlain.
                self assert: client response contentLength equals: size.
                self
                        assert: client contents
                        equals: (self class generateTestData: size) ]

The test is 'special' because it actually tests the full contents of the response. It also uses odd sizes to try to stress test secure stream internal buffering and TLS framing issues, as well as interactions with the SSL pluging.

But your URL does indeed fail, sometimes. I need a reliable failure so that I can debug it manually ;-)

Sven

On 27 Jun 2012, at 09:00, Sven Van Caekenberghe wrote:

> Yes, that is *very* strange (latest 2.0, latest VM).
>
> Thanks a lot for reporting an intermittent bug, Sean ;-)
>
> On 27 Jun 2012, at 05:33, Sean P. DeNigris wrote:
>
>> The following all intermittently return nil. When I do the same thing in
>> Safari, I always seem to get the correct answer (plain text).
>>
>> (ZnEasy get:
>> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
>> contents.
>>
>> (ZnClient new get:
>> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
>> contents.
>>
>> (ZnUrl fromString:
>> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29')
>> retrieveContents.
>>
>> Even this returns nil intermittently (maybe less frequently, not sure):
>> client := ZnClient new.
>> client
>> systemPolicy;
>> url:
>> 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29';
>> accept: ZnMimeType textPlain.
>>
>> client get contents.
>>
>> Sean
>>
>> --
>> View this message in context: http://forum.world.st/Zinc-intermittently-returning-nil-tp4636820.html
>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Zinc intermittently returning nil

Sean P. DeNigris
Administrator
Sven Van Caekenberghe wrote
This will be hard to debug...
Thanks for digging in and finding that bug! http://code.google.com/p/pharo/issues/detail?id=6364 seems to fix it. The following returned the correct result through the whole loop

(1 to: 100) do: [ :e |
        Transcript
                show: e asString, ': ';
                show: (ZnEasy get: 'https://ci.lille.inria.fr/pharo/job/Pharo-2.0/lastSuccessfulBuild/api/xml?xpath=%2F%2A%2Fdescription%2Ftext%28%29') contents;
                cr ].
Cheers,
Sean