Closed Bug 362539 Opened 18 years ago Closed 17 years ago

Filters rules disappears when restarting due to >10000 /tmp/tmprules-*.dat files

Categories

(Thunderbird :: General, defect)

x86
All
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaidesidees, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Thunderbird version 1.5.0.8 (20061025)

When creating a new filter rule it doesn't work when using the "run" button in the dialog. Then it simply disappears when I restart Thunderbird.
In the profile, MsgFilterRules.dat is not updated but a file named tmprules-nnn (where nnn is 3 digits number) is created in the "tmp" subfolder.
I use 4 different accounts and a RSS one. I tuned Thunderbird to receive incoming emails in the common box.

Reproducible: Always

Steps to Reproduce:
1.create a filter rule through Tools|messages filter
2.use "run" button
3.restart Thunderbird

Actual Results:  
The filters rules created disappear.

Expected Results:  
In the profile, MsgFilterRules.dat is not updated but a file named tmprules-nnn (where nnn is 3 digits number) is created in the "tmp" subfolder.

I use 4 different accounts and a RSS one. I tuned Thunderbird to receive incoming emails in the common box.
I'm using a localized version of Thunderbird (french)
--
about:buildconfig

Build platform
target
i586-pc-msvc

Build tools
Compiler 	Version 	Compiler flags
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TC -nologo -W3 -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TP -nologo -W3 -Gy -Fd$(PDBFILE)

Configure arguments
--enable-application=browser --enable-update-channel=release --enable-official-branding --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-svg --enable-canvas --enable-update-packaging
The filters seem to be there (because they work) but they don't appear in the "filters rules" window.
Do you mean the "filter rules" (that is, one of the criteria) disappear, or the entire filter disappears?  If the former, this may be the same as bug 365471;
in the latter case, see bug 237470.
I mean exactly that the entire filter disappears.
Sometimes it looks like working for a while i.e. when I made the update to version 1.5.0.9 (20061207). At this very moment I got my entire filter for one or two days, then it disappeared again. Since I never saw it reappearing !
I think it's different from 365471 and 237470 but belonging to the same process.
The same thing happens to me in v2.0.0.0 (20070326).  If I change or add a filter, msgFilterRules.dat is not updated in any way and I have thousands of tmprule-nnnn.dat files in my /tmp directory (one is added at least every minute).  Eventually, after tmprules-9999.dat, they roll over.  The tmprule-xxx.dat files all contain two lines:

version="8"
logging="no"

I have three mail accounts configured with filters on two of them (91 filters for one server and 15 in the other).  I can provide copies of my msgFilterRules.dat's, if needed.  
(In reply to comment #4)
> The same thing happens to me in v2.0.0.0 (20070326).  If I change or add a
> filter, msgFilterRules.dat is not updated in any way and I have thousands of
> tmprule-nnnn.dat files in my /tmp directory (one is added at least every
> minute).  Eventually, after tmprules-9999.dat, they roll over.  The
> tmprule-xxx.dat files all contain two lines:
> 
> version="8"
> logging="no"
> 
> I have three mail accounts configured with filters on two of them (91 filters
> for one server and 15 in the other).  I can provide copies of my
> msgFilterRules.dat's, if needed.  
> 

Note:  I have this problem on SuSE Linux v10.0.  I'll check if the problem occurs at home on windows also.
(In reply to comment #4)
> The same thing happens to me in v2.0.0.0 (20070326).  If I change or add a
> filter, msgFilterRules.dat is not updated in any way and I have thousands of
> tmprule-nnnn.dat files in my /tmp directory (one is added at least every
> minute).  Eventually, after tmprules-9999.dat, they roll over.  The
> tmprule-xxx.dat files all contain two lines:
> 
> version="8"
> logging="no"
> 
> I have three mail accounts configured with filters on two of them (91 filters
> for one server and 15 in the other).  I can provide copies of my
> msgFilterRules.dat's, if needed.  
> 

Your post inspired the following circumvention of this problem, posted at

http://forums.mozillazine.org/viewtopic.php?p=3136915#3136915

[quote="PBilodeau"]..My /tmp directory contained 9999 tmprules-xxxx.dat files, numbered from 1 to 9999.  I deleted them.  Restarted thunderbird.  Bingo!  It works!

Now it seems those tmp files are created non-stop, once every minute or so, for as long as the filter edit window is open.  In normal situations it shouldn't be a problem, but make sure you don't leave your computer unattended a whole weekend with the filter edit window open.  As soon as there are 9999 tmpfiles created, the filters can no longer be viewed or edited..[/quote]

Whereas these solutions are apparently for Linux, and this bug is specific for Windows, perhaps the cause of the problem is similar in principle and an equivalent solution would apply to Windows.
I am using Thunderbird on Suse Linux Professional 9.3, and I can confirm the same problem, all versions up to the recent Thunderbird 2.0.0.9.

No filter rules can be edit or added if /tmp directory is filled up with 9999 tmprules-*.dat files (it can be added or edit, but the changes will not be saved). But, all previously added filters works fine, and I can easily add or edit rules manually in msgFilters.dat file, and Thunderbird will use it. When I delete all those /tmp/tmprules-*.dat files, Thunderbird works fine with filters editing.
And another confirmatory case, with circumvention, this time on Windows Vista, posted at http://forums.mozillazine.org/viewtopic.php?p=3165384#3165384

[quote="FloydLawson"]<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=362539">Filters rules disappears when restarting</a>

This bug report about thousands of /tmp/tmprules-*.dat on Lunix did trigger the fix.  It seems that in Vista your "TEMP" 

C:\Users\<userID>\AppData\Local\Temp

can contain THOUSANDS of tmprules-*.dat files.  If you have more than 9999 of them...the filters stop working correctly.

I had 156MB of those files in my TEMP.  Removing them fixed the problem but I may have to keep watch for a while to see if the tmprules-*.dat files return..[/quote]
holy sh... :-)

I got this bug for one month without be able to find what is going on !!!

Same for me: windows vista ... i've moved a subfolder and thunderbird told that filter will be updated ...

(so filter DMS was filtering all mails from DMS-Admin to the folder "Local Folder->Babeltech->DMS" ... I've changed the path to DMS by moving the subfolder to "Local Folder->Babeltech->bugs-dms-incident->DMS")

BUT, after restart, the filters were not able to find the new folder DMS and so, mails are filtered into the Local Folder->Babeltech directory.

In the filter window, the filter was set, but move these mails to Babeltech

I've try to change Babeltech to DMS in the filter rules, but it was without effect.

Furthermore, msgFilterRules.dat was no updated for a months !!!

I've check on bugzilla several times without find the solution ... and yes
i've 9999 tmprules-*.dat in my vista user temp directory C:\Users\<userID>\AppData\Local\Temp

All of them contains: 
version="8"
logging="no"

And there were created from 5th september 2007 13th november 2007 for the last ...
--> 13th november 2007 was +/- the time were i've seen problems ...


PS: to add something:
i've also 100 files in the temp folder named newmsg, newmsg-1 to newmsg-99 and containing nothing
Severity: minor → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-thunderbird2?
OS: Windows XP → All
Version: unspecified → 2.0
So, now, it is working ...

Complementary information:
before finding this bug cause on bugzilla, i've export all my profile with mozbackup, completly uninstall thunderbird, also by deleting the profile, reinstall thunderbird et reinstall the mails ...
Why the uninstaller doesn't empty the temp folder?

YEAH !

This bug was also the cause of my last entered bug ... really painful bug ...

Bug 403907 – Moving (+ delete/rename) a folder/subfolder (drag and drop) to
an other location in the same account (even trash) take a lot of cpu and one to
two minutes of processing

--> after deleting the 10000 tmprules-xx.dat, this low performance bug is
fixed!
is someone has the same problem with trunk build???


New information:
I've new tmprules-xx.dat files appearing in temp folder

tmprules.dat, tmprules-1.dat and tmprules-2.dat --> 9:42 (time when i've launch TB)
tmprules-3.dat and tmprules-4.dat --> 9:52
tmprules-5.dat and tmprules-6.dat --> 10:02

--> every 10 minutes ... it is the time between 2 automatic pop download of emails of some of my accounts (i've more than 10 pop account, but some of them check mail only all hour, 2 hours or one time a day)

i've forced a check all mail by clicking on the button at 10:06 and i've got 3 tmprules.dat: tmprules-7, -8 and -9.dat at 10:06

So, i guess i can have +/- 200 files a day ...
and so this bug will occur again in +/- 60 days ...

And bug 403907 in less of 15 days, until i delete manually the tmprules files
(In reply to comment #11)
> *** Bug 403907 has been marked as a duplicate of this bug. ***
> 
It wasn't. Please re-open it. See bug 362539 for explanation.
Tb2 shipped already.
Assignee: mscott → nobody
Flags: blocking-thunderbird2?
Summary: Filters rules disappears when restarting → Filters rules disappears when restarting due to >1000 /tmp/tmprules-*.dat files
Blocks: 403907
bug 403907 reopen ... this one block it
Summary: Filters rules disappears when restarting due to >1000 /tmp/tmprules-*.dat files → Filters rules disappears when restarting due to >10000 /tmp/tmprules-*.dat files
Still a problem with Thunderbird v2.0.0.6
Hi John ... i've TB version 2.0.0.10pre (20071125) ...
So it seems this bug is present in 1.5.xxx and in all version of 2.0.xxx (and trunk???), on all platform ... but not for anybody ...
It occured in some undeterminated case, and for some account.
I've 12 pop accounts, and 8 of them have filters (One inbox per account + filters to move some mails in global subfolders in Local Folders)

And, the bug seems present in 3 account only.
To test it i've sent me an email to 7 account.
wait 1 minutes and check all mails: i've only 3 tmprules-x.dat
Updated to 2.0.0.9, problem still exists.
(In reply to comment #18)
> Hi John ... i've TB version 2.0.0.10pre (20071125) ...
> So it seems this bug is present in 1.5.xxx and in all version of 2.0.xxx (and
> trunk???), on all platform ... but not for anybody ...
> It occured in some undeterminated case, and for some account.
> I've 12 pop accounts, and 8 of them have filters (One inbox per account +
> filters to move some mails in global subfolders in Local Folders)
> 
> And, the bug seems present in 3 account only.
> To test it i've sent me an email to 7 account.
> wait 1 minutes and check all mails: i've only 3 tmprules-x.dat
> 

Interesting!  I have three IMAP accounts, two with filters and only get one file per minute.  One account has 91 filters and the other has 15.
(In reply to comment #20)
> (In reply to comment #18)
> 
> Interesting!  I have three IMAP accounts, two with filters and only get one
> file per minute.  One account has 91 filters and the other has 15.

I should note that all three accounts are set to retrieve mail every 10 minutes, but I still get one file per minute.
Depends on: 375292
Resolved fixed as bug 375292 is fixed on branch 1.8 and trunk
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
I use version 3.0a1pre (2008012703).

Although there is no tmprule*.dat on my Mac, it still doesn't load filters.
I even tried making new ones, and restarted the Thunderbird.
No filter...

For trunk see bug 413680.
Thank you for the link to bug 413680.
This bug just reoccured for me, 21/01/2009, so its not resolved I'm afraid :(

I am running Thunderbird version 2.0.0.19 (20081209) on XP SP2.

The problem was resolved by removing the tmpRules.dat file and restarting tbird.

I found the hints on how to do so here:
http://forums.mozillazine.org/viewtopic.php?t=196958

-which contains a link to this bug thread.
I'm also seeing this problem on 2.0.0.19 on OpenSUSE 10.2.  The 10,000 /tmp/tmprules files were (at least some of them) created by older versions Thunderbird, but 2.0.0.19 is definitely choking on them.

One additional symptom:  When you have too many /tmp/tmprules files, the drop-down menu at the top of the filters dialog for selecting the email account to view filters for stops working.  When you select a different email account, the list of filters stays the same even though the filters are different for the different accounts.
You need to log in before you can comment on or make changes to this bug.