
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2009-09-12 18:15 byezio.melotti, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| mailboxfailures.txt | ezio.melotti,2009-09-12 18:15 | List of the failures I got running test_mailbox | ||
| maildir.patch | pitrou,2009-11-01 15:12 | |||
| Messages (11) | |||
|---|---|---|---|
| msg92550 -(view) | Author: Ezio Melotti (ezio.melotti)*![]() | Date: 2009-09-12 18:15 | |
While running test.regrtest, test_mailbox failed with the error:test test_mailbox failed -- Traceback (most recent call last): File "/home/wolf/py3k/Lib/test/test_mailbox.py", line 116, in test_discard self.assertEqual(len(self._box), 1)AssertionError: 2 != 1I ran the test again several times and got intermittent failures in several different methods. Attached there's a file with the errors I got. During the first tests I was running test_mailbox after test_zipimport, but then I was able to reproduce the failures running test_mailbox alone.I'm using Python 3.2a0 on Ubuntu 8.04. | |||
| msg94772 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-10-31 22:21 | |
Looking at the frequent buildbot failures, they always seem to happen inTestMaildir. Therefore, it may have to do with the metadata-updatingbehaviour of the filesystem (since maildir uses one file per message).Unfortunately, while I tried to reproduce the failures on my home systemwith a variety of filesystems (ext3, ext4, reiserfs, xfs and even vfat),I never got any failure here.Ezio, could you give details on your system, your filesystem and itsmount options? (if you don't know them, look in /proc/mounts) | |||
| msg94777 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-10-31 23:42 | |
Ezio, could you give a try to the following patch? | |||
| msg94778 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-01 00:14 | |
Another possible explanation is that the logic for computingMaildir._last_time is wrong. It should be computed before refreshing theinternal cache, not after. Here is a patch. | |||
| msg94779 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-01 01:07 | |
According to testers, both patches fail at addressing the issue. | |||
| msg94781 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2009-11-01 02:01 | |
I hacked mailbox.py so that a _toc refresh is always done and ran thetests in a loop, and did not get a failure in 30+ runs, whereas withoutthat hack I would get failures almost every run. So I think Antoine ison the right track. | |||
| msg94787 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-01 14:50 | |
The explanation seems to be that some systems (including RDM's buildbot)have slightly bizarre mtime behaviour:$ date && python -c 'import os; os.link("setup.py", "t/c")' && stat t &&dateSun Nov 1 09:49:04 EST 2009 File: `t' Size: 144 Blocks: 0 IO Block: 4096 directoryDevice: 811h/2065dInode: 223152 Links: 2Access: (0755/drwxr-xr-x) Uid: ( 1001/ pitrou) Gid: ( 1005/ pitrou)Access: 2009-11-01 09:10:11.000000000 -0500Modify: 2009-11-01 09:49:03.000000000 -0500Change: 2009-11-01 09:49:03.000000000 -0500Sun Nov 1 09:49:04 EST 2009As you see, the mtime of the directory is set a full one second beforethe date at which its contents are modified.I guess the only safe solution is to explicitly flush the internal cachewhen we do any modifications. | |||
| msg94788 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-01 15:12 | |
Ok, here is a patch which seems to fix the problem reliably on RDM'sbuildbot. Ezio, can you give it a try? | |||
| msg94789 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-01 15:31 | |
PS: this is the kind of traces I had when running TestMaildir on David'sbuildbot:at1257086460.18, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086459.0at1257086460.21, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086459.0at1257086460.24, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086459.0at1257086460.27, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086459.0at1257086460.3, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086459.0at1257086460.33, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086459.0at1257086460.36, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086460.0at1257086460.38, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086460.0at1257086460.4, linking/renaming ... mtime of'/home/pitrou/trunk/@test_23145_tmp/new' is now1257086460.0As you see, the mtime is set to1257086459 even when time.time() returns1257086460.00 and higher, and it's only set to1257086460 whentime.time() reaches1257086460.36. | |||
| msg94815 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-02 01:06 | |
Ezio indicated that the patch suppressed all failures for him, so Icommitted it on trunk. | |||
| msg94827 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-11-02 12:23 | |
Now merged into py3k and 3.1, where it has solved the buildbot issues.2.6 doesn't apply, since the caching scheme isn't present there.If there's any problem with the patch, please reopen. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:52 | admin | set | github: 51145 |
| 2009-11-02 12:23:14 | pitrou | set | status: open -> closed resolution: fixed messages: +msg94827 |
| 2009-11-02 01:06:33 | pitrou | set | messages: +msg94815 |
| 2009-11-01 15:31:28 | pitrou | set | messages: +msg94789 |
| 2009-11-01 15:12:12 | pitrou | set | files: +maildir.patch messages: +msg94788 |
| 2009-11-01 14:50:24 | pitrou | set | messages: +msg94787 |
| 2009-11-01 02:01:23 | r.david.murray | set | messages: +msg94781 |
| 2009-11-01 01:07:20 | pitrou | set | files: -test_mailbox2.patch |
| 2009-11-01 01:07:17 | pitrou | set | files: -test_mailbox.patch |
| 2009-11-01 01:07:08 | pitrou | set | messages: +msg94779 |
| 2009-11-01 00:14:05 | pitrou | set | files: +test_mailbox2.patch messages: +msg94778 |
| 2009-10-31 23:56:16 | pitrou | set | nosy: +r.david.murray |
| 2009-10-31 23:42:01 | pitrou | set | files: +test_mailbox.patch keywords: +patch messages: +msg94777 |
| 2009-10-31 22:21:49 | pitrou | set | nosy: +pitrou messages: +msg94772 versions: + Python 3.1 |
| 2009-10-11 15:51:03 | ezio.melotti | set | nosy: +akuchling |
| 2009-09-12 18:15:12 | ezio.melotti | create | |