Closed Bug 471077 Opened 16 years ago Closed 15 years ago

nstmp folder appearing with sleep/wake cycle

Categories

(Thunderbird :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mitra_lists, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081222 Shredder/3.0b2pre

This is the same as the old bug 88515 - 

sorry for restarting it but there seems no way to "REOPEN" it - maybe that is restricted to certain users?

A folder called nstmp (or nstmp-1 etc) appears randomly. It contains a selection of messages in the inbox, not always all of them as previously reported. 




Reproducible: Sometimes

Steps to Reproduce:
1.
2.
3.
"folder called nstmp (or nstmp-1 etc) after restart of Tb" itself is not bug.
 (1) Compact a big mail folder -> work file of nstmp(or nstmp-N) is used. 
 (2) Kill Tb.
 (3) Restart Tb -> remaining nstmp(or nstmp-N) is displayed as mail folder
     named nstmp(or nstmp-N). 
(1) is design. (3) is also design.
Problem is "compact folder is somehow killed", if crash or abnormal termination of Tb is not involved. So, problem analysis is impossible unless sufficient data about "when(by what action, on what situation etc.) compact folder is killed internally" is provided.

What did you do before you encountered the problem?
I believe this is occuring during normal operation of putting the machine to sleep and waking it up.

I think the behavior of Word is a good example - if Word is crashed, and stuff isn't saved then the recovered files are opened and indication given to save them.   

In TB we just get this folder turning up, no indication of why, or what appropriate behavior should be to recover from lost data.

But anyway ... i don't believe it should happen as a result of a sleep/wake-up. 

- Mitra
(In reply to comment #2)
> I think the behavior of Word is a good example - if Word is crashed, and stuff
> isn't saved then the recovered files are opened and indication given to save
> them.   
> In TB we just get this folder turning up, no indication of why,
> or what appropriate behavior should be to recover from lost data.

Which is your request by this bug?
(1) Even if any failure occurs during compact folder, never display nstmp(or nstmp-N) as mail folder named nstmp(or nstmp-N) after restart.
(2) If situation that "nstmp(or nstmp-N) is displayed as mail folder named nstmp(or nstmp-N) after restart" occurs, provide sufficient information about "why it occurs".
(3) Reduce situations on which nstmp(or nstmp-N) is displayed as mail folder named nstmp(or nstmp-N) after restart, due to something wrong during compact folder and during not-so-special operation such as suspend/resume.
(4) Other

Could you provide detailed data than "it happen as a result of a sleep/wake-up", and detailed data about "possible compact folder execution before sleep".
If following becomes clear, peoples can try to re-create problem.
  - Problem occurs only when some kinds of operation are executed.
Hi, sure - I'll try and be helpful, though I'm mostly just reporting a bug as perceived by a user, until your comment #1 I (like other users) had no idea what nstmp was or why it was there. 

First the occurance - I haven't been able to predict what causes it to appear. I recently cleared away the old nstmp's, and was surprised to see a new one appear. I don't believe TB has crashed during that time, and I suspect (but can't prove) it was due to putting the laptop to sleep, and then waking it.  

I also notice frequently on waking I get a "Folder is being processed" when I "Get Mail" which I have to do a "Quit" (not a Force-Quit) to reset so I can Get Mail again, this might be related. (Bug 466933)


I would suggest - from my limited knowledge. 

1: Going to sleep shouldn't be seen as a failure, it should either terminate an incomplete Compact or continue it after waking.

2: If a soft-failure such as sleep/wake or Quit-during-compact interrupts a compact then it could continue and clean up nstmp after itself. 

3: If its a hard-failure (i.e. a risk of data loss) and nstmp is created then it should display a dialog with appropriate information for the user to know what is appropriate action.

Just my ideas ...

- Mitra
(p.s. I'm offline till 2nd Jan so will not respond quickly).
if you're right about sleep, we probably need someone to look into:
http://developer.apple.com/DOCUMENTATION/Carbon/Reference/Power_Manager/Reference/reference.html
SleepQInstall
sleepQProc
kEnterStandby

but first, do you think you could prove that it's caused by sleep?

for fun, you should be able to setup ktrace on thunderbird.
then setup a folder that's going to need compaction or whatever
then trigger the dialog
and then force your computer to sleep

wake it up and verify things are unhappy

finally, look into kdump.

note that to really take advantage of ktrace/kdump, you may need to get a debug/symbol'd build, i know of no such builds.
(In reply to comment #4)
> I recently cleared away the old nstmp's

Remained nstmp is body of murder case. Timestamp of file, file content etc. is important data to know when "compact folder" was killed. It'll help us to find killer. Please keep backup of nstmp if problem occurred again, writing "what you did prior to sleep" down before you forget.
Hi Wada

Yes - I have an old "nstmp" - what would you like me to look at. I dont' know what I was doing prior to sleep, normally I wouldn't be doing anything actively - i.e. it could be compression or "Get Mail" happening in the background.

Let me know if you want me to extract something from it. 

Sorry, but while I'm technically proficient, I'm not a TB developer, so I don't have ktrace, kdump or symbolic builds. 

- Mitra
ktrace/kdump come from your OS which you've specified as OS X. If you're not using OS X, feel free to fix the OS field and instructions will be provided for whatever os you're actually using.

Builds w/ symbols are a different story. Please note that i wrote "may", I don't use ktrace/kdump regularly so I do not know if it's necessary. I suspect to prove the problem you won't actually need them, although it could help improve things.
yes - I'm on OSX, but have never heard of ktrace or kdump and don't find them with spotlight or "whereis" .   I am *NOT* a developer (not any more), just a power-user reporting a bug, and I don't have these tools.
oh, sorry my fault. you're on 10.5... i'm on 10.3

http://support.apple.com/kb/TA24816?viewlocale=en_US

dtrace replaced ktrace in 10.5... i should have known.

http://opensolaris.org/os/community/dtrace/dtracetoolkit/

syscallbyproc.d
filebyproc.d

the docs were thankfully half written around tracing firefox-bin, don't worry too much about the solaris origin for the scripts, hopefully they'll "just work". otherwise you'd need some expert and I don't have 10.5 so I really can't help.
dmose, bienvenu, do you have any insight into nstmp appearing after sleep/wake on Mac (or other OS)?  Perhaps understanding this will lead to understanding bug 466933 - Folder is being processed (a particularly obnoxious class of bugs).

Mitra, is the bug summary now accurate?  any debug info from comment 8 and comment 10?

I don't see any nstmp folders on my vista system that just can back from sleep this morning.
Blocks: 466933
Summary: nstmp folder appearing → nstmp folder appearing with sleep/wake cycle
Hi Wayne, 

I haven't seen any nstmp folders for a while, I'm not sure why. I still put my machine to sleep / wake it as frequently. 

Comments #5 #8 and #10 didn't provide any information that I could use.

- Mitra
I don't; perhaps David does.
I don't think there's a direct cause, other than timer driven events tend to stack up while we're asleep, so waking up causes a flurry of activity (e.g., downloading new mail, applying retention settings, and sometimes also idle driven activities) and these activities can conflict with each other.
Mitra, you are still unable to reproduce?

cc: couple Mac users, maybe they can reproduce?

(this issue was just cited in a post in mozilla.support.thunderbird, subject  Can I delete 1 GB of "nstmp" files?)
Yes - I still am not seeing it.
I think then we'll call this incomplete - the code has substantially moved on since the last reproduction.

Please reopen if you see this again.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.