#1396 closed defect (fixed)

writing an incident flogfile (via foolscap 0.6.0/1) tries to use characters not valid in a Windows filename (':')

Reported by: davidsarah Owned by: somebody
Priority: major Milestone: 1.10.0
Component: code Version: 1.8.2
Keywords: windows error incident logging foolscap regression Cc:
Launchpad Bug:

Description (last modified by daira)

While reporting the incident in #1395 on a Windows platform, the following error occurred:

[Failure instance: Traceback: <type 'exceptions.IOError'>:
[Errno 22] invalid mode ('wb') or filename:
u'C:\\tahoeclient\\logs\\incidents\\incident-2011-05-05--18:33:34Z-w2qn32q.flog'

The problem (or at least one problem) is that ':' is not valid in a Windows filename. This MSDN article documents the Windows filename validity rules.

Presumably we don't have any test of writing an incident flogfile. This may mean that incident reporting has always been broken on Windows (unless the flogfile naming changed?) A change to flogfile naming in foolscap 0.6.0 apparently caused this bug.

Change History (9)

comment:1 Changed at 2011-05-06T16:02:41Z by davidsarah

  • Description modified (diff)

(linewrap description for readability)

comment:2 Changed at 2011-05-06T16:14:40Z by davidsarah

  • Keywords foolscap added

The problem is actually in foolscap, apparently due to the time format here in foolscap/logging/incident.py:

TIME_FORMAT = "%Y-%m-%d--%H:%M:%S"

which is used indirectly by incident_declared to create the filename. Will file a foolscap ticket.

comment:4 Changed at 2011-05-06T16:47:48Z by davidsarah

  • Description modified (diff)
  • Summary changed from writing an incident flogfile tries to use characters not valid in a Windows filename (':') to writing an incident flogfile (via foolscap 0.6.0/1) tries to use characters not valid in a Windows filename (':')

comment:5 Changed at 2011-07-28T21:38:53Z by davidsarah

  • Keywords regression added

This is fixed in foolscap trunk, but has not been released.

comment:6 Changed at 2011-08-14T00:09:01Z by davidsarah

  • Milestone changed from 1.9.0 to soon (release n/a)

comment:7 Changed at 2012-03-29T22:57:53Z by davidsarah

http://foolscap.lothar.com/trac/ticket/177 was fixed in foolscap 0.6.2, but Tahoe currently only requires foolscap 0.6.1, so can still be affected. This ticket can be closed when the foolscap dependency is increased.

comment:8 Changed at 2012-03-29T23:00:39Z by davidsarah

  • Keywords windows added; win32 removed

comment:9 Changed at 2013-08-28T16:36:18Z by daira

  • Description modified (diff)
  • Milestone changed from soon (release n/a) to 1.10.0
  • Resolution set to fixed
  • Status changed from new to closed

trunk requires foolscap >= 0.6.3 (since [69bd49fc57bf9e6f851c8f68458d6f518d2c8c2e/trunk], which was before the 1.10 release), so this is fixed.

Note: See TracTickets for help on using tickets.