#161 closed defect (invalid)
AttributeError: LogFileObserver instance has no attribute '_logFile'
Reported by: | Zooko | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | undecided |
Component: | unknown | Version: | 0.5.1 |
Keywords: | Cc: |
Description (last modified by )
$ FLOGFILE=flog.out.bz2 FLOGLEVEL=1 FLOGTOTWISTED=1 PYTHONPATH=support/lib/python2.6/site-packages/ trial --until-failure --rterror allmydata.test.test_hung_server.HungServerDownloadTest.test_2_good_8_bro ken_copied_share Thu Sep 2 23:47:50 MDT 2010 Test Pass 1 allmydata.test.test_hung_server HungServerDownloadTest test_2_good_8_broken_copied_share ... [OK] ------------------------------------------------------------------------------- Ran 1 tests in 1.634s PASSED (successes=1) Test Pass 2 allmydata.test.test_hung_server HungServerDownloadTest test_2_good_8_broken_copied_share ... Traceback (most recent call last): File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/eventual.py", line 26, in _turn cb(*args, **kwargs) File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/logging/log.py", line 440, in msg pickle.dump(e, self._logFile, 2) exceptions.AttributeError: LogFileObserver instance has no attribute '_logFile' [ERROR] Traceback (most recent call last): File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/eventual.py", line 26, in _turn cb(*args, **kwargs) File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/logging/log.py", line 440, in msg pickle.dump(e, self._logFile, 2) exceptions.AttributeError: LogFileObserver instance has no attribute '_logFile' [ERROR] Traceback (most recent call last): File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/eventual.py", line 26, in _turn cb(*args, **kwargs) File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/logging/log.py", line 440, in msg pickle.dump(e, self._logFile, 2) exceptions.AttributeError: LogFileObserver instance has no attribute '_logFile' [ERROR] Traceback (most recent call last): File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/eventual.py", line 26, in _turn cb(*args, **kwargs) File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/logging/log.py", line 440, in msg pickle.dump(e, self._logFile, 2) exceptions.AttributeError: LogFileObserver instance has no attribute '_logFile' [ERROR] Traceback (most recent call last): File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/eventual.py", line 26, in _turn cb(*args, **kwargs) File "/Library/Python/2.6/site-packages/foolscap-0.5.1-py2.6.egg/foolscap/logging/log.py", line 440, in msg pickle.dump(e, self._logFile, 2) exceptions.AttributeError: LogFileObserver instance has no attribute '_logFile'
... etc.
Attachments (1)
Change History (4)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Changed 13 years ago by
Attachment: | run_to_death.pl added |
---|
tool to run a test program over and over until it fails
comment:2 Changed 13 years ago by
I just encountered this same bug. Fortunately before spending more than a few minutes on it I duckduckgoed for it and discovered this ticket. Why doesn't FLOGFILE= flush the file when the reactor shuts down, but don't close the file?
comment:3 Changed 13 years ago by
Here's a pull request for a patch that would make --until-failure
work: https://github.com/warner/foolscap/pull/9
Note: See
TracTickets for help on using
tickets.
FLOGFILE= is not compatible with
trial --until-failure
. That form of repeat-until-failure works by starting and stopping the reactor over and over within a single process, which is pretty unusual: most of the time, the reactor starts shortly after the process begins, and runs until the process terminates. FLOGFILE= only opens the logfile once, but closes it each time the reactor shuts down, which isn't a good fit for unusual reactor cycling.I generally use a small perl script to run a single test until it fails (using a new process for each iteration). I'll attach it here.
(also, I always use a FLOGFILE= that ends in just
.flog
instead of.flog.bz2
, because the latter is more easily lost if the process terminates unexpectedly.)