Skip Menu |

This queue is for tickets about the SQLite_File CPAN distribution.

Report information
The Basics
Id: 122766
Status: resolved
Priority: 0/
Queue: SQLite_File

People
Owner: maj.fortinbras [...] gmail.com
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.1001
Fixed in: 0.1002



Subject: Possible file locking issue in test suite
On my FreeBSD smokers I see the following test failure: ... # Write a hash in 003 DBD::SQLite::db do failed: database is locked at /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001-HzMbbO/blib/lib/SQLite_File.pm line 326. DBD::SQLite::db do failed: database is locked at /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001-HzMbbO/blib/lib/SQLite_File.pm line 326. t/003_barry.t ..... Dubious, test returned 35 (wstat 8960, 0x2300) No subtests run # Read the hash in 004 SQLite_File: Can't open db file: No such file or directory at t/004_barry.t line 17. (in cleanup) Can't call method "commit" on an undefined value at /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001-HzMbbO/blib/lib/SQLite_File.pm line 802. t/004_barry.t ..... Dubious, test returned 2 (wstat 512, 0x200) No subtests run t/005_rt122654.t .. ok ... This does not happen on my linux smokers. The pattern looks familiar to me: a SQLite file locking issue, which only happens on freebsd systems (and probably also MacOSX, but I don't have a Mac right now for testing). Probably you create a temporary file using File::Temp, which does O_EXLOCK by default on *BSD systems. To fix this, you should pass EXLOCK=>0 when creating the temporary file. THis option is a no-op on linux systems, and prevents locking on *BSD systems.
Hey Slaven - Thanks for this-- I just pushed out v0.1001 that uses File::Temp as you suggest (also there is an ordering requirement for the tests that could cause missing file fails when tests are parallelized. I added rules for sequential processing.) We'll look over the next few days Mark On Fri Aug 11 02:23:05 2017, SREZIC wrote: Show quoted text
> On my FreeBSD smokers I see the following test failure: > > ... > # Write a hash in 003 > DBD::SQLite::db do failed: database is locked at > /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001- > HzMbbO/blib/lib/SQLite_File.pm line 326. > DBD::SQLite::db do failed: database is locked at > /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001- > HzMbbO/blib/lib/SQLite_File.pm line 326. > t/003_barry.t ..... > Dubious, test returned 35 (wstat 8960, 0x2300) > No subtests run > # Read the hash in 004 > SQLite_File: Can't open db file: No such file or directory at > t/004_barry.t line 17. > (in cleanup) Can't call method "commit" on an undefined value > at /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001- > HzMbbO/blib/lib/SQLite_File.pm line 802. > t/004_barry.t ..... > Dubious, test returned 2 (wstat 512, 0x200) > No subtests run > t/005_rt122654.t .. ok > ... > > This does not happen on my linux smokers. The pattern looks familiar > to me: a SQLite file locking issue, which only happens on freebsd > systems (and probably also MacOSX, but I don't have a Mac right now > for testing). Probably you create a temporary file using File::Temp, > which does O_EXLOCK by default on *BSD systems. To fix this, you > should pass EXLOCK=>0 when creating the temporary file. THis option is > a no-op on linux systems, and prevents locking on *BSD systems.
Sorry Slaven - didn't read all the way through. Will add the parameter to the File::Temp. MAJ On Fri Aug 11 12:08:12 2017, MAJENSEN wrote: Show quoted text
> Hey Slaven - > Thanks for this-- I just pushed out v0.1001 that uses File::Temp as > you suggest (also there is an ordering requirement for the tests that > could cause missing file fails when tests are parallelized. I added > rules for sequential processing.) > We'll look over the next few days > Mark > On Fri Aug 11 02:23:05 2017, SREZIC wrote:
> > On my FreeBSD smokers I see the following test failure: > > > > ... > > # Write a hash in 003 > > DBD::SQLite::db do failed: database is locked at > > /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001- > > HzMbbO/blib/lib/SQLite_File.pm line 326. > > DBD::SQLite::db do failed: database is locked at > > /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001- > > HzMbbO/blib/lib/SQLite_File.pm line 326. > > t/003_barry.t ..... > > Dubious, test returned 35 (wstat 8960, 0x2300) > > No subtests run > > # Read the hash in 004 > > SQLite_File: Can't open db file: No such file or directory at > > t/004_barry.t line 17. > > (in cleanup) Can't call method "commit" on an undefined value > > at /home/cpansand/.cpan/build/2017081106/SQLite_File-0.1001- > > HzMbbO/blib/lib/SQLite_File.pm line 802. > > t/004_barry.t ..... > > Dubious, test returned 2 (wstat 512, 0x200) > > No subtests run > > t/005_rt122654.t .. ok > > ... > > > > This does not happen on my linux smokers. The pattern looks familiar > > to me: a SQLite file locking issue, which only happens on freebsd > > systems (and probably also MacOSX, but I don't have a Mac right now > > for testing). Probably you create a temporary file using File::Temp, > > which does O_EXLOCK by default on *BSD systems. To fix this, you > > should pass EXLOCK=>0 when creating the temporary file. THis option > > is > > a no-op on linux systems, and prevents locking on *BSD systems.
Reproduced the fail on OSX. Added EXLOCK=>0 in t/003 and this did resolve the issue. Uploaded v0.1002 to PAUSE.