Edgewall Software

Opened 8 years ago

Last modified 8 years ago

#12310 closed defect

lots of test failures with pysqlite file db backend in some Windows environment — at Initial Version

Reported by: Christian Boos Owned by: Christian Boos
Priority: normal Milestone: 1.0.10
Component: database backend Version: 1.0dev
Severity: minor Keywords: appveyor sqlite rmtree
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

With Python 2.7.11 and sqlite3 2.6.0 (3.6.21), we get lots of errors like this one:

======================================================================
ERROR: test_author_full_name (trac.ticket.tests.notification.AttachmentNotificationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\trac\trac\ticket\tests\notification.py", line 1524, in tearDown
    shutil.rmtree(self.env.path)
  File "C:\Python27-x64\lib\shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "C:\Python27-x64\lib\shutil.py", line 250, in rmtree
    os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\appveyor\\appdata\\local\\temp\\1\\trac-tempenv-hjqqot\\test.db'

We see that using 32-bits or 64-bits Python 2.7.11.

However, the problem doesn't happen with Python 2.6.6 and sqlite3 2.4.1 (3.5.9) and it also never happens when the in-memory version of SQLite is used (obviously, as the problem is with test.db still opened at the time we do the rmtree).

Locally, I have these additional results:

  • reproduced with Python 2.7.9sl x86 (that's a Stackless python)
  • reproduced with Python 2.7.10 x64 and pysqlite 2.8.1 (3.7.5)
  • no errors with Python 2.6.5

Change History (1)

by Christian Boos, 8 years ago

one of the build logs showing the issue

Note: See TracTickets for help on using tickets.