Closed Bug 817725 Opened 12 years ago Closed 12 years ago

Short (seconds) hangs of UI [@ _WriteFileImplementation]

Categories

(Thunderbird :: General, defect)

19 Branch
x86_64
Windows 7
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mayhemer, Unassigned)

Details

(Keywords: hang, perf)

Recently (during the last week?) I started to experience hangs of TB 19 UI just while reading emails.

I attached VC++ and downloaded the proper symbols+sources and when the hang happens, VC shows this stack:

 	ntdll.dll!_NtWriteFile@36()  + 0x15 bytes	
 	ntdll.dll!_NtWriteFile@36()  + 0x15 bytes	
>	kernel32.dll!_WriteFileImplementation@20()  + 0x4a bytes	

The rest of the stack trace is bogus, twice it showed a different crap, so I don't know where from this method is being called.  ProcessExplorer says nothing.
Not much to go on :(

Nothing coincidental happening in Error Console or Activity Manager?
Keywords: hang, perf
Hmm.. it might be a bug in logging which I have turned on for POP3 service (break before call to _WriteFileImplementation shows):

 	kernel32.dll!_WriteFileImplementation@20()  + 0x45 bytes	
 	msvcr100.dll!_write_nolock(int fh=4, const void * buf=0x003bd3bc, unsigned int cnt=1)  Line 332 + 0x2c bytes	C
 	msvcr100.dll!_write(int fh=4, const void * buf=0x003bd3bc, unsigned int cnt=1)  Line 74 + 0xc bytes	C
 	msvcr100.dll!_flsbuf(int ch=10, _iobuf * str=0x00000004)  Line 189 + 0xd bytes	C
 	msvcr100.dll!_fwrite_nolock(const void * buffer=0x00f15000, unsigned int size=1, unsigned int num=91, _iobuf * stream=0x720e2088)  Line 194 + 0x7 bytes	C
 	msvcr100.dll!fwrite(const void * buffer=0x00f15000, unsigned int size=1, unsigned int count=91, _iobuf * stream=0x720e2088)  Line 83 + 0x11 bytes	C
 	nspr4.dll!PR_LogFlush()  Line 530 + 0x30 bytes	C
 	nspr4.dll!PR_LogPrint(const char * fmt=0x5c941610, ...)  Line 522 + 0x5 bytes	C
>	xul.dll!nsPop3Protocol::LoadUrl(nsIURI * aURL=0x0db5c888, nsISupports * __formal=0x00000000)  Line 1072 + 0x16 bytes	C++

PR_LogFlush could be the cause, since I have "append" in the list of modules and the file can easily become 7GB (Giga!) long.

I think this is invalid then.

I'll turn of logging and recheck.
Since I've turned off logging, I cannot reproduce.  Closing as WONTFIX.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Does it flush the file to disk after each line? That could be a slowdown. But that may be needed for logging as the app could crash (instability may be the reason for enabling the log) and unflushed lines could be lost.
(In reply to :aceman from comment #4)
> Does it flush the file to disk after each line? That could be a slowdown.
> But that may be needed for logging as the app could crash (instability may
> be the reason for enabling the log) and unflushed lines could be lost.

sync module was not defined.  I think it is flushing after some number of lines, since the NSPR log buffer is relatively small.
You need to log in before you can comment on or make changes to this bug.