Closed Bug 13043 Opened 25 years ago Closed 25 years ago

[DogFood] Loading an empty local file in necko hangs the system

Categories

(MailNews Core :: Networking, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jefft, Assigned: warrensomebody)

References

Details

(Whiteboard: [PR1])

I have to power cycle the machine. Ctrl-C may gets you out of the debugger.

Steps to reproduce:

o Create an empty pop mail folder
o Select the folder
o You hang

Looks like nsPipeInputStream is wait for a monitor. I'll try to get a stack
crawl if I can.
Warren, you can see this without running mailnews too. Just load an empty file
in apprunner and you'll see the same deadlock situation.
Warren, this is the stack prior to the hang. The next instrcution calls:

        if (mBlocking) {
            rv = mon.Wait();
            if (NS_FAILED(rv)) return rv;   // interrupted
        }
which waits indefinitly. Sounds like we shouldn't be in the Fill() if
ReadSegments() detects that the pipe is empty. Does mail/news app need to
implement nsIPipeObserver? I couldn't find any code does the nsIPipeObserver
implementation.

nsPipe::nsPipeInputStream::Fill() line 432
nsPipe::nsPipeInputStream::ReadSegments(nsPipe::nsPipeInputStream * const
0x039a0958, unsigned int (void *, const char *, unsigned int, unsigned int,
unsigned int *)* 0x10031620 nsWriteToRawBuffer(void *, const char *, unsigned
int, unsigned int, unsigned int *), void * 0x03546e08, unsigned int 4096,
unsigned int * 0x0012fd8c) line 363 + 8 bytes
nsPipe::nsPipeInputStream::Read(nsPipe::nsPipeInputStream * const 0x039a0958,
char * 0x03546e08, unsigned int 4096, unsigned int * 0x0012fd8c) line 461
ImageConsumer::OnDataAvailable(ImageConsumer * const 0x0399f190, nsIChannel *
0x03995680, nsISupports * 0x00000000, nsIInputStream * 0x039a0958, unsigned int
0, unsigned int 32768) line 279 + 28 bytes
nsChannelListener::OnDataAvailable(nsChannelListener * const 0x039a1190,
nsIChannel * 0x03995680, nsISupports * 0x00000000, nsIInputStream * 0x039a0958,
unsigned int 0, unsigned int 32768) line 2466
nsFileChannel::OnDataAvailable(nsFileChannel * const 0x0399568c, nsIChannel *
0x03995680, nsISupports * 0x00000000, nsIInputStream * 0x039a0958, unsigned int
0, unsigned int 32768) line 807
nsOnDataAvailableEvent::HandleEvent(nsOnDataAvailableEvent * const 0x03af2920)
line 345
nsStreamListenerEvent::HandlePLEvent(PLEvent * 0x03af2924) line 144 + 12 bytes
PL_HandleEvent(PLEvent * 0x03af2924) line 509 + 10 bytes
PL_ProcessPendingEvents(PLEventQueue * 0x00a9e1a0) line 470 + 9 bytes
_md_EventReceiverProc(HWND__ * 0x00030434, unsigned int 49361, unsigned int 0,
long 11133344) line 938 + 9 bytes
USER32! 77e71820()
00a9e1a0()
Build 1999090208M10: Win32/NT4

I was able to recreate the problem with a release build. I noticed that the
empty folders with a 0KB msf file were the ones that crashed the entire system.

Steps to reproduce:
1. Open Mail for a POP account in 4.6 (i.e. qatest20)
2. Create a new folder and select the folder (i.e. empty1)
3. Exit out of 4.6
4. Start Mail 5.0
5. Expand the folders
6. Select the empty folder and notice the progress bar moves and then stops.
7. Try selecting another folder or another window.

Actual Results: I am not able to select another folder or window. Eventually the
screen turns black and the hard drive light continues to flash. I have to reset
my system and NT4 starts as expected.
Expected Results: I should be able to select the Empty folder without the system
crashing.

Additional Information:
1. I tried deleting the Empty1.msf file but after starting Mail 5.0 and
selecting the empty folder again it still crashed. I noticed that it created a 0
byte file again.
2a.I tried the same scenario with a folder that already had messages in 4.6
(i.e. folder1). I deleted the messages in 4.6 and noticed that a 2KB msf file
existed. After starting Mail 5.0 I was able to select the empty folder (folder1)
and it did not crash. I was able to select other folders and other windows.
2b. I deleted the 2KB folder1.msf file, started Mail 5.0, selected the "folder1"
folder and there was no problem. I was able to select other folders. I noticed
that it recreated a 2KB folder1.msf file.
Adding bienvenu to Cc: list.
Clarification for 2b: the reason it works is because that the folder1 still
contains the deleted messages which is not visible to the user.
Whiteboard: [PR1]
I think this needs to be fixed for PR1, so I added a note to the Status
Whiteboard.
Adding nbaca to Cc: list.
*** Bug 12898 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Target Milestone: M11
Summary: POP: Selecting an empty mail folder hangs the system → [DogFood] Loading an empty local file in necko hangs the system
Moving to Dogfood status. This is a problem for people with empty mail folders.
Changing the subject to reflect the fact that necko cannot load any local file
of size 0 bytes.
Severity: normal → blocker
moving to status blocker. This is blocking all new accounts from working.
warren? can we get some status here?
This makes mail hang on all empty mail folders, making it virtually unusable.
Blocks: 13798
I believe this is fixed, probably by warren's stuff that went in last week about
end of stream. Does anyone disagree?
You are right. This seems to be fixed. I have no problem loading an empty file.
Sorry, wrong assumption.
No longer blocks: 13798
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
marking fixed for warren.
QA Contact: lchiang → huang
Status: RESOLVED → VERIFIED
Passed by retest on 9/20 build WinNT & Win98 platforms.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.