Skip Menu |
 

This queue is for tickets about the CHI CPAN distribution.

Report information
The Basics
Id: 79132
Status: resolved
Priority: 0/
Queue: CHI

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.55
Fixed in: (no value)



Subject: Concurrency tests
Download (untitled) / with headers
text/plain 143b
Does CHI::Test include tests for locking to verify that that two processes running set() at the same time leave the cache in the correct state?
Subject: Re: [rt.cpan.org #79132] Concurrency tests
Date: Thu, 23 Aug 2012 18:07:51 -0700
To: bug-CHI [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Download (untitled) / with headers
text/plain 967b
I just added test_multiple_processes: https://github.com/jonswar/perl-chi/blob/master/lib/CHI/t/Driver.pm#L1919 It was in some old versions of CHI but I couldn't get it to work reliably. Works for me now. I haven't yet been able to make it fail, though - I need to write a dumb driver that leaves a wide race condition open. Let me know if it works for you. And feel free to augment it as you think necessary. Jon On Aug 22, 2012, at 3:34 AM, Nigel Horne via RT wrote: Show quoted text
> Wed Aug 22 06:34:56 2012: Request 79132 was acted upon. > Transaction: Ticket created by NHORNE > Queue: CHI > Subject: Concurrency tests > Broken in: 0.55 > Severity: Normal > Owner: Nobody > Requestors: NHORNE@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=79132 > > > > Does CHI::Test include tests for locking to verify that that two > processes running set() at the same time leave the cache in the correct > state?
Subject: Re: [rt.cpan.org #79132] Concurrency tests
Date: Fri, 24 Aug 2012 08:31:22 +0100
To: bug-CHI [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Download (untitled) / with headers
text/plain 456b
On 24/08/12 02:08, Jonathan Swartz via RT wrote: Show quoted text
Thanks so much for this. I get # Failed test 'got invalid value 'I}[Em=V\#>... It is too early for me to tell if this is a problem in CHI::Driver::SharedMem or with the testing framework. I am investigating. -Nigel
Subject: Re: [rt.cpan.org #79132] Concurrency tests
Date: Fri, 24 Aug 2012 05:21:48 -0700
To: bug-CHI [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Download (untitled) / with headers
text/plain 460b
Show quoted text
> Thanks so much for this. I get > > # Failed test 'got invalid value 'I}[Em=V\#>... > > It is too early for me to tell if this is a problem in > CHI::Driver::SharedMem or with the testing framework. I am investigating.
Ok. It might make it easier to diagnose to replace line 1947 $values[$p] = random_string(10000); with $values[$p] = scalar($p x 10000); so that you'll be storing strings like "11111….", "22222…", etc. Let me know.
Subject: Re: [rt.cpan.org #79132] Concurrency tests
Date: Thu, 30 Aug 2012 20:10:02 +0100
To: bug-CHI [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Download (untitled) / with headers
text/plain 752b
On 24/08/12 13:22, Jonathan Swartz via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=79132> >
>> Thanks so much for this. I get >> >> # Failed test 'got invalid value 'I}[Em=V\#>... >> >> It is too early for me to tell if this is a problem in >> CHI::Driver::SharedMem or with the testing framework. I am investigating.
> Ok. It might make it easier to diagnose to replace line 1947 > > $values[$p] = random_string(10000); > > with > > $values[$p] = scalar($p x 10000); > > so that you'll be storing strings like "11111….", "22222…", etc. > > Let me know.
Thanks - the message is now clearer - though I'm no closer to finding out what's wrong. Your code looks fine as does mine. I'm still investigating. -Nigel
Download smime.p7s
application/pkcs7-signature 4.3k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #79132] Concurrency tests
Date: Thu, 30 Aug 2012 22:09:33 +0100
To: bug-CHI [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Download (untitled) / with headers
text/plain 353b
Found it - yeah!! I've fixed the locking code in my driver and it now passes your new concurrency tests. I'll be rolling out a new version tomorrow. I suggest you add the concurrency testing to the next realease of CHI since it works well. The only thing is I'm not sure why it only happens when AUTHOR_TESTING=1. Thanks for your help. -Nigel
Download smime.p7s
application/pkcs7-signature 4.3k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #79132] Concurrency tests
Date: Thu, 30 Aug 2012 14:59:38 -0700
To: bug-CHI [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Download (untitled) / with headers
text/plain 664b
That's great! I don't want this test to be run by end users - too much opportunity for unpredictable failures. Jon On Aug 30, 2012, at 2:09 PM, njh@bandsman.co.uk via RT wrote: Show quoted text
> Queue: CHI > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=79132 > > > Found it - yeah!! I've fixed the locking code in my driver and it now > passes your new concurrency tests. I'll be rolling out a new version > tomorrow. > > I suggest you add the concurrency testing to the next realease of CHI > since it works well. The only thing is I'm not sure why it only happens > when AUTHOR_TESTING=1. > > Thanks for your help. > > -Nigel > > > <smime.p7s>


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.