Skip Menu |

This queue is for tickets about the Dancer2-Session-DatabasePlugin CPAN distribution.

Report information
The Basics
Id: 125670
Status: resolved
Priority: 0/
Queue: Dancer2-Session-DatabasePlugin

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

Bug Information
Severity: (no value)
Broken in: 1.0001
Fixed in: (no value)

Attachments
Dancer2-Session-DatabasePlugin-1.0003.tar.gz



Subject: DBD::SQLite::db do failed: database is locked
The test suite fails on my FreeBSD smokers: ... DBD::SQLite::db do failed: database is locked at t/Dancer2-Session-DatabasePlugin.t line 161. [Test::Session:66183] error @2018-06-24 01:00:31> Route exception: DBD::SQLite::db do failed: database is locked at t/Dancer2-Session-DatabasePlugin.t line 161. in /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Core/App.pm l. 1473 # Failed test 'Should get a 200' # at t/Dancer2-Session-DatabasePlugin.t line 44. # got: 500 # expected: 200 DBD::SQLite::db prepare failed: database is locked at /home/cpansand/.cpan/build/2018062400/Dancer2-Session-DatabasePlugin-1.0001-2/blib/lib/Dancer2/Session/DatabasePlugin.pm line 250. [Test::Session:66183] error @2018-06-24 01:00:31> Route exception: Unable to create a new session: DBD::SQLite::db prepare failed: database is locked at /home/cpansand/.cpan/build/2018062400/Dancer2-Session-DatabasePlugin-1.0001-2/blib/lib/Dancer2/Session/DatabasePlugin.pm line 250. at /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Core/App.pm line 455. in /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Core/App.pm l. 1473 # Failed test 'Should get a 200' # at t/Dancer2-Session-DatabasePlugin.t line 58. # got: 500 # expected: 200 # Failed test 'Should have a cookie!' # at t/Dancer2-Session-DatabasePlugin.t line 59. # Failed test 'Should have more than 0 statement handles' # at t/Dancer2-Session-DatabasePlugin.t line 60. # '0' # > # '0' # Failed test 'Should have a cookie!' # at t/Dancer2-Session-DatabasePlugin.t line 67. # Failed test at t/Dancer2-Session-DatabasePlugin.t line 68. # got: '' # expected: 'I am a little teapot.' # Failed test 'Should have more than 0 statement handles' # at t/Dancer2-Session-DatabasePlugin.t line 69. # '0' # > # '0' [Test::Session:66183] debug @2018-06-24 01:00:31> Database connection went away, reconnecting in /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Plugin.pm l. 543 DBD::SQLite::db selectall_arrayref failed: database is locked at t/Dancer2-Session-DatabasePlugin.t line 76. DBD::SQLite::db selectall_arrayref failed: database is locked at t/Dancer2-Session-DatabasePlugin.t line 76. # Looks like your test exited with 35 just after 22. t/Dancer2-Session-DatabasePlugin.t .. Dubious, test returned 35 (wstat 8960, 0x2300) Failed 7/22 subtests ... The problem is caused by both tempfile() (only on BSD systems) and sqlite setting a lock on the database file. This can be fixed by setting EXLOCK => 0: our $DB; our $FH; BEGIN { ($FH,$DB)=tempfile(EXLOCK=>0); } See also https://rt.cpan.org/Ticket/Display.html?id=123959 for a discussion about EXLOCK in File::Temp.
On 2018-06-24 02:03:35, SREZIC wrote: Show quoted text
> The test suite fails on my FreeBSD smokers: > > ... > DBD::SQLite::db do failed: database is locked at t/Dancer2-Session- > DatabasePlugin.t line 161. > [Test::Session:66183] error @2018-06-24 01:00:31> Route exception: > DBD::SQLite::db do failed: database is locked at t/Dancer2-Session- > DatabasePlugin.t line 161. in > /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Core/App.pm l. 1473 > > # Failed test 'Should get a 200' > # at t/Dancer2-Session-DatabasePlugin.t line 44. > # got: 500 > # expected: 200 > DBD::SQLite::db prepare failed: database is locked at > /home/cpansand/.cpan/build/2018062400/Dancer2-Session-DatabasePlugin- > 1.0001-2/blib/lib/Dancer2/Session/DatabasePlugin.pm line 250. > [Test::Session:66183] error @2018-06-24 01:00:31> Route exception: > Unable to create a new session: DBD::SQLite::db prepare failed: > database is locked at /home/cpansand/.cpan/build/2018062400/Dancer2- > Session-DatabasePlugin-1.0001- > 2/blib/lib/Dancer2/Session/DatabasePlugin.pm line 250. > at /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Core/App.pm line > 455. in /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Core/App.pm l. > 1473 > > # Failed test 'Should get a 200' > # at t/Dancer2-Session-DatabasePlugin.t line 58. > # got: 500 > # expected: 200 > > # Failed test 'Should have a cookie!' > # at t/Dancer2-Session-DatabasePlugin.t line 59. > > # Failed test 'Should have more than 0 statement handles' > # at t/Dancer2-Session-DatabasePlugin.t line 60. > # '0' > # > > # '0' > > # Failed test 'Should have a cookie!' > # at t/Dancer2-Session-DatabasePlugin.t line 67. > > # Failed test at t/Dancer2-Session-DatabasePlugin.t line 68. > # got: '' > # expected: 'I am a little teapot.' > > # Failed test 'Should have more than 0 statement handles' > # at t/Dancer2-Session-DatabasePlugin.t line 69. > # '0' > # > > # '0' > [Test::Session:66183] debug @2018-06-24 01:00:31> Database connection > went away, reconnecting in > /usr/perl5.26.0p/lib/site_perl/5.26.0/Dancer2/Plugin.pm l. 543 > DBD::SQLite::db selectall_arrayref failed: database is locked at > t/Dancer2-Session-DatabasePlugin.t line 76. > DBD::SQLite::db selectall_arrayref failed: database is locked at > t/Dancer2-Session-DatabasePlugin.t line 76. > # Looks like your test exited with 35 just after 22. > t/Dancer2-Session-DatabasePlugin.t .. > Dubious, test returned 35 (wstat 8960, 0x2300) > Failed 7/22 subtests > ... > > > The problem is caused by both tempfile() (only on BSD systems) and > sqlite setting a lock on the database file. This can be fixed by > setting EXLOCK => 0: > > our $DB; > our $FH; > BEGIN { > ($FH,$DB)=tempfile(EXLOCK=>0); > } > > > See also https://rt.cpan.org/Ticket/Display.html?id=123959 for a > discussion about EXLOCK in File::Temp.
Actually it is possible to get PASSes with FreeBSD, but only if DBD::SQLite is not installed and the problematic test is effectively skipped.
Looks like something is wring with your DBD::Sqlite, I have disabled the unit tests by default in version 1.0002 and up.
Subject: Dancer2-Session-DatabasePlugin-1.0003.tar.gz

Message body not shown because it is not plain text.

On 2018-06-24 11:32:14, AKALINUX wrote: Show quoted text
> Looks like something is wring with your DBD::Sqlite, I have disabled > the unit tests by default in version 1.0002 and up.
Maybe you missed the last paragraph in the original report where I already explained the reason for the problem and proposed a solution.