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

VERIFIED FIXED in M11

Status

MailNews Core
Networking
P3
blocker
VERIFIED FIXED
19 years ago
a year ago

People

(Reporter: jefft, Assigned: Warren Harris)

Tracking

Trunk
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PR1])

(Reporter)

Description

19 years ago
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.

Comment 1

19 years ago
Warren, you can see this without running mailnews too. Just load an empty file
in apprunner and you'll see the same deadlock situation.
(Reporter)

Comment 2

19 years ago
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()

Comment 3

19 years ago
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.

Comment 4

19 years ago
Adding bienvenu to Cc: list.
(Reporter)

Comment 5

19 years ago
Clarification for 2b: the reason it works is because that the folder1 still
contains the deleted messages which is not visible to the user.

Updated

19 years ago
Whiteboard: [PR1]

Comment 6

19 years ago
I think this needs to be fixed for PR1, so I added a note to the Status
Whiteboard.

Comment 7

19 years ago
Adding nbaca to Cc: list.

Comment 8

19 years ago
*** Bug 12898 has been marked as a duplicate of this bug. ***
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M11

Updated

19 years ago
Summary: POP: Selecting an empty mail folder hangs the system → [DogFood] Loading an empty local file in necko hangs the system

Comment 9

19 years ago
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.

Updated

19 years ago
Severity: normal → blocker

Comment 10

19 years ago
moving to status blocker. This is blocking all new accounts from working.

Comment 11

19 years ago
warren? can we get some status here?
This makes mail hang on all empty mail folders, making it virtually unusable.
(Reporter)

Updated

19 years ago
Blocks: 13798

Comment 12

19 years ago
I believe this is fixed, probably by warren's stuff that went in last week about
end of stream. Does anyone disagree?
(Reporter)

Comment 13

19 years ago
You are right. This seems to be fixed. I have no problem loading an empty file.
Sorry, wrong assumption.
(Reporter)

Updated

19 years ago
No longer blocks: 13798

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 14

19 years ago
marking fixed for warren.

Updated

19 years ago
QA Contact: lchiang → huang

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 15

19 years ago
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.