Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: t/thread test 10 failure, reproduced more reliably
Date: Mar 11 2004 3:28PM
On Thu, 2004-03-11 at 02:09, Avis, Ed wrote:
> I tried DBD::Sybase-1.02.4 and test 10 in t/thread.t failed. I had
> seen this before but not been able to reproduce it. But now, it seems
> to be failing more often (though not in exactly the same way each
> The first time it printed
> Failed test (t/thread.t at line 54)
> # got: '425'
> # expected: '0'
> All the other tests passed. I reran 'make test' and it failed again,
> only this time with got: '425', expected: '197'. But a third 'make
> test' passed.
I got the same intermittent problem here, with perl 5.8.3 on Fedora Core
1, and a fairly fast Athlon box. I suspect that this is a bug in the
thread package rather than in DBD::Sybase as such.
This script does the following:
Start a thread that reads in all the rows from sysobjects, and then push
each of the object IDs to a queue.
Start n threads that read the queue, and fetch one row from sysobjects
using a where id = ? clause.
The test that fails gets the number of rows that were fetched from the
sysobjects table in the first place, and checks this against the number
of rows fetched in the parallel threads, and these two numbers should be
The error means that the count from the first query (select ... from
sysobjects, with no WHERE clause) doesn't get returned properly (i.e. it
gets set to 0).
I suspect a problem with perl's thread model because, AFAIK I use the
Michael Peppler Data Migrations, Inc.
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html