Closed Bug 223356 Opened 21 years ago Closed 21 years ago

MailNews hangs Mozilla on startup (or after first IMAP account is set up).

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mozilla-bugs, Assigned: Bienvenu)

Details

(Keywords: hang)

Reproducible: 100%, even from an empty profile.

To reproduce:

0) Start with an empty profile (for example, delete all the files from an
existing one, or move the whole ~/.mozilla away).
1) Start mozilla -mail
2) When prompted, create an account with the following properties:
Your name: Aleksey Nogin
Email Address: aleksey@nogin.org
Server type: IMAP
Incoming server: nwo-imap.cs.caltech.edu
Outgoing server: localhost
Incoming user name: nogin
Outgoing user name: aleksey
Account name: Personal

3) As I press "Finish", Mozilla freezes (even before the account wizard dialog
box fully goes away).

NSPR_LOG_MODULES="IMAP:5" NSPR_LOG_FILE="/tmp/imap.log" reveals:

81924[88e8330]: ImapThreadMainLoop entering [this=880a4f8]
16384[8095ec0]: 880a4f8:nwo-imap.cs.caltech.edu:NA:SetupWithUrl: clearing
IMAP_CONNECTION_IS_OPEN
81924[88e8330]: 880a4f8:nwo-imap.cs.caltech.edu:NA:ProcessCurrentURL: entering
81924[88e8330]:
880a4f8:nwo-imap.cs.caltech.edu:NA:ProcessCurrentURL:imap://nogin@nwo-imap.cs.caltech.edu:143/select%3E%5EINBOX:
 = currentUrl

gdb shows:

#0  0x410e3b48 in NSGetModule () from
/usr/lib/mozilla-1.6a/components/libgklayout.so
#1  0x40bc2e0f in XPTC_InvokeByIndex () from /usr/lib/mozilla-1.6a/libxpcom.so
#2  0x411a2691 in NSGetModule () from
/usr/lib/mozilla-1.6a/components/libxpconnect.so
#3  0x411a8856 in NSGetModule () from
/usr/lib/mozilla-1.6a/components/libxpconnect.so
#4  0x4004a572 in js_Invoke () from /usr/lib/mozilla-1.6a/libmozjs.so
#5  0x40053d9c in js_Interpret () from /usr/lib/mozilla-1.6a/libmozjs.so
#6  0x4004abd9 in js_Execute () from /usr/lib/mozilla-1.6a/libmozjs.so
#7  0x4002b03f in JS_EvaluateUCScriptForPrincipals () from
/usr/lib/mozilla-1.6a/libmozjs.so
#8  0x41c12819 in NSGetModule () from /usr/lib/mozilla-1.6a/components/libjsdom.so
#9  0x41c2582a in NSGetModule () from /usr/lib/mozilla-1.6a/components/libjsdom.so
#10 0x41c2604b in NSGetModule () from /usr/lib/mozilla-1.6a/components/libjsdom.so
#11 0x40bad26a in nsTimerImpl::Fire() () from /usr/lib/mozilla-1.6a/libxpcom.so
#12 0x40bad2d7 in handleTimerEvent(TimerEventType*) () from
/usr/lib/mozilla-1.6a/libxpcom.so
#13 0x40ba986f in PL_HandleEvent () from /usr/lib/mozilla-1.6a/libxpcom.so
#14 0x40ba97a1 in PL_ProcessPendingEvents () from /usr/lib/mozilla-1.6a/libxpcom.so
#15 0x40baa92a in nsEventQueueImpl::ProcessPendingEvents() () from
/usr/lib/mozilla-1.6a/libxpcom.so
#16 0x4152ca6e in nsBaseWidget::FreeNativeData(void*, unsigned) () from
/usr/lib/mozilla-1.6a/components/libwidget_gtk2.so
#17 0x404efccf in g_vsnprintf () from /usr/lib/libglib-2.0.so.0
#18 0x404cefdd in unblock_source () from /usr/lib/libglib-2.0.so.0
#19 0x404cffd8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x404d02ef in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x404d09cf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#22 0x401fd44f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#23 0x08280420 in ?? ()
#24 0x081bb0d8 in ?? ()
#25 0xbffff4a0 in ?? ()
#26 0xbffff428 in ?? ()
#27 0x08280420 in ?? ()

(I'll try downloading a talkback build to get more information).

If I kill it and start "mozilla -mail" again, it freezes (in the same place in
the code) even before it opens any imap connections.

I am currently running trunk build from this morning (1.6a 2003102212) and I was
having the same problem with earlier builds in 1.5 cycle (trunk from Aug 28, I
believe), but 1.4.1 works fine. Today I've built Mozilla on a recent Red Hat
Rawhide with configure options:

./configure  --prefix=/usr --libdir=/usr/lib --enable-optimize=-O2
--disable-debug --with-default-mozilla-five-home=/usr/lib/mozilla-1.6a
--disable-strip-libs --disable-tests --enable-xinerama --enable-nspr-autoconf
--enable-extensions=default,irc --without-mng --enable-crypto --disable-xprint
--without-system-nspr --with-system-zlib --enable-default-toolkit=gtk2
--disable-freetype2 --enable-xft --mandir=/usr/share/man

On Aug 28 I've built Mozilla on Red Hat 8.0 with configure options:

./configure  --prefix=/usr --libdir=/usr/lib '--enable-optimize=-O2\
-march=i386\ -mcpu=i686' --disable-debug
--with-default-mozilla-five-home=/usr/lib/mozilla-1.5b --enable-strip-libs
--disable-tests --disable-short-wchar --enable-nspr-autoconf
--enable-extensions=default,irc --without-mng --enable-crypto --disable-xprint
--without-system-nspr --with-system-zlib --disable-freetype2 --enable-xft
--mandir=/usr/share/man

This might be related to bug 219057, but I am not sure.
Hm, I could _not_ reproduce this with Mozilla from
http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/2003-10-22-05-trunk/mozilla-i686-pc-linux-gnu-sea.tar.gz.
So it must have something to do with the way it was built...
maybe you can build without "--disable-debug" and see where it crashes with GDB.
Aleksey, have you tried a clobber build? Has this problem always been with
builds you made yourself, or have some of them been with downloaded builds?

the 1.6a 2003102212 build that didn't work, was that downloaded? But the
2003102205 build did work? Very odd - I have no idea...
> Aleksey, have you tried a clobber build? 

All the build I've tried were clobber builds (more specifically, they were rpm
builds and rpm always clobbers).

> Has this problem always been with
> builds you made yourself, or have some of them been with downloaded builds?

No, did not reproduce this with any downloaded ones.

I've compiled 2003102300 with 
./configure  --prefix=/usr --libdir=/usr/lib
--with-default-mozilla-five-home=/usr/lib/mozilla-1.6a --disable-strip-libs
--disable-tests --enable-xinerama --enable-nspr-autoconf
--enable-extensions=default,irc --without-mng --enable-crypto --disable-xprint
--without-system-nspr --with-system-zlib --enable-default-toolkit=gtk2
--disable-freetype2 --enable-xft --mandir=/usr/share/man --disable-optimize
--enable-debug

and could not reproduce.

So far I am thinking that it could be caused by one of the following:
1) --disable-debug
2) --enable-optimize=-O2
3) The way rpm installs things (all the times it froze, I was running it after
installing it from RPM; but 2003102300 was working correctly when I was running
it straight out of the dist in the compile directory).
I think I might be seing bug 207204. I am not going to close as a dup just yet
since bug 207204 talks about gcc-3.4 and I am using gcc-3.3.1-5. Anyway, I
eliminated the possibility (3) from my previous comment - I've build an
optimized non-debug build and ran mozilla (2003102319) straight out of the build
directory. I got the following backtraces (I did not get them originaly because
rpm strips binaries before installing):

After pressing "finish" (see "step 3" in the original report):

(gdb) bt
#0  nsXULTreeBuilder::IsContainer(int, int*) (this=0x85a3f50, aIndex=0,
aResult=0x1) at nsTreeRows.h:265
#1  0x40bc2c53 in XPTC_InvokeByIndex () at nsWeakReference.cpp:30
#2  0x40c2f679 in XPCWrappedNative::CallMethod(XPCCallContext&,
XPCWrappedNative::CallMode) (ccx=@0xbfffe7d0, mode=CALL_METHOD)
    at xpcwrappednative.cpp:2016
#3  0x40c3583e in XPC_WN_CallMethod(JSContext*, JSObject*, unsigned, long*,
long*) (cx=0x8182450, obj=0x8969a68, argc=1,
    argv=0x1, vp=0xbfffe920) at xpcwrappednativejsops.cpp:1269
#4  0x4004a572 in js_Invoke (cx=0x8182450, argc=1, flags=0) at jsinterp.c:912
#5  0x40053d9c in js_Interpret (cx=0x8182450, result=0xbfffed30) at jsinterp.c:2933
#6  0x4004abd9 in js_Execute (cx=0x8182450, chain=0x80dbd88, script=0x1,
down=0x0, special=1, result=0xbfffed30)
    at jsinterp.c:1126
#7  0x4002b03f in JS_EvaluateUCScriptForPrincipals (cx=0x8182450, obj=0x80dbd88,
principals=0x816697c, chars=0x8351840,
    length=33, filename=0x8838688
"chrome://messenger/content/msgMail3PaneWindow.js", lineno=659, rval=0xbfffed30)
    at jsapi.c:3522
#8  0x41cb8801 in nsJSContext::EvaluateString(nsAString const&, void*,
nsIPrincipal*, char const*, unsigned, char const*, nsAString&, int*)
(this=0x8195210, aScript=@0xbfffee60, aScopeObject=0x80dbd88, aPrincipal=0x8351840,
    aURL=0x8838688 "chrome://messenger/content/msgMail3PaneWindow.js",
aLineNo=659, aVersion=0x4007ec85 "default",
    aRetValue=@0xbfffee70, aIsUndefined=0xbfffee58) at nsPromiseFlatString.h:163
#9  0x41ccb776 in GlobalWindowImpl::RunTimeout(nsTimeoutImpl*) (this=0x816eed8,
aTimeout=0x86185c8) at nsCOMPtr.h:663
#10 0x41ccbf97 in GlobalWindowImpl::TimerCallback(nsITimer*, void*)
(aTimer=0x8829278, aClosure=0x86185c8)
    at nsGlobalWindow.cpp:5364
#11 0x40bad12a in nsTimerImpl::Fire() (this=0x8829278) at nsTimerImpl.cpp:382
#12 0x40bad197 in handleTimerEvent(TimerEventType*) (event=0x1) at
nsTimerImpl.cpp:447
#13 0x40ba973b in PL_HandleEvent (self=0x8835e90) at plevent.c:671
#14 0x40ba966d in PL_ProcessPendingEvents (self=0x80eabe8) at plevent.c:606
#15 0x40baa7ea in nsEventQueueImpl::ProcessPendingEvents() (this=0x810f098) at
nsEventQueue.cpp:391
#16 0x4153aa92 in event_processor_callback (source=0x8235198, condition=G_IO_IN,
data=0xbfffe440) at nsAppShell.cpp:67
#17 0x404efccf in g_vsnprintf () from /usr/lib/libglib-2.0.so.0
#18 0x404cefdd in unblock_source () from /usr/lib/libglib-2.0.so.0
#19 0x404cffd8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x404d02ef in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x404d09cf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#22 0x401fe44f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#23 0x08235270 in ?? ()
#24 0x0813a148 in ?? ()
#25 0xbffff2a0 in ?? ()
#26 0xbffff228 in ?? ()
#27 0x08235270 in ?? ()

After starting mozilla -mail again:

sXULTreeBuilder::IsContainerOpen(int, int*) (this=0x85c96c0, aIndex=140285632,
aResult=0x1) at nsTreeRows.h:265
265             Row* operator->() { return &(mLink[mTop].GetRow()); }
(gdb) bt
#0  nsXULTreeBuilder::IsContainerOpen(int, int*) (this=0x85c96c0,
aIndex=140285632, aResult=0x1) at nsTreeRows.h:265
#1  0x40bc2c53 in XPTC_InvokeByIndex () at nsWeakReference.cpp:30
#2  0x41195679 in XPCWrappedNative::CallMethod(XPCCallContext&,
XPCWrappedNative::CallMode) (ccx=@0xbfffe7d0, mode=CALL_METHOD)
    at xpcwrappednative.cpp:2016
#3  0x4119b83e in XPC_WN_CallMethod(JSContext*, JSObject*, unsigned, long*,
long*) (cx=0x80db5e8, obj=0x8293908, argc=1,
    argv=0x1, vp=0xbfffe920) at xpcwrappednativejsops.cpp:1269
#4  0x4004a572 in js_Invoke (cx=0x80db5e8, argc=1, flags=0) at jsinterp.c:912
#5  0x40053d9c in js_Interpret (cx=0x80db5e8, result=0xbfffed30) at jsinterp.c:2933
#6  0x4004abd9 in js_Execute (cx=0x80db5e8, chain=0x8110588, script=0x1,
down=0x0, special=1, result=0xbfffed30)
    at jsinterp.c:1126
#7  0x4002b03f in JS_EvaluateUCScriptForPrincipals (cx=0x80db5e8, obj=0x8110588,
principals=0x8162224, chars=0x8247e38,
    length=33, filename=0x8899bf0
"chrome://messenger/content/msgMail3PaneWindow.js", lineno=659, rval=0xbfffed30)
    at jsapi.c:3522
#8  0x41c9e801 in nsJSContext::EvaluateString(nsAString const&, void*,
nsIPrincipal*, char const*, unsigned, char const*, nsAString&, int*)
(this=0x8192b30, aScript=@0xbfffee60, aScopeObject=0x8110588, aPrincipal=0x8247e38,
    aURL=0x8899bf0 "chrome://messenger/content/msgMail3PaneWindow.js",
aLineNo=659, aVersion=0x4007ec85 "default",
    aRetValue=@0xbfffee70, aIsUndefined=0xbfffee58) at nsPromiseFlatString.h:163
#9  0x41cb1776 in GlobalWindowImpl::RunTimeout(nsTimeoutImpl*) (this=0x8114dd0,
aTimeout=0x88126b0) at nsCOMPtr.h:663
#10 0x41cb1f97 in GlobalWindowImpl::TimerCallback(nsITimer*, void*)
(aTimer=0x8812728, aClosure=0x88126b0)
    at nsGlobalWindow.cpp:5364
#11 0x40bad12a in nsTimerImpl::Fire() (this=0x8812728) at nsTimerImpl.cpp:382
#12 0x40bad197 in handleTimerEvent(TimerEventType*) (event=0x1) at
nsTimerImpl.cpp:447
#13 0x40ba973b in PL_HandleEvent (self=0x8824d68) at plevent.c:671
#14 0x40ba966d in PL_ProcessPendingEvents (self=0x80d3a80) at plevent.c:606
#15 0x40baa7ea in nsEventQueueImpl::ProcessPendingEvents() (this=0x80f6728) at
nsEventQueue.cpp:391
#16 0x4153aa92 in event_processor_callback (source=0x82a8d30, condition=G_IO_IN,
data=0x8808878) at nsAppShell.cpp:67
#17 0x404efccf in g_vsnprintf () from /usr/lib/libglib-2.0.so.0
#18 0x404cefdd in unblock_source () from /usr/lib/libglib-2.0.so.0
#19 0x404cffd8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x404d02ef in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x404d09cf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#22 0x401fe44f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#23 0x082a8e08 in ?? ()
#24 0x08135280 in ?? ()
#25 0xbffff2a0 in ?? ()
#26 0xbffff228 in ?? ()
#27 0x082a8e08 in ?? ()
please try 3.3.1-6. 3.3.1-5 was buggy and is most likely the cause of your problems.
Yes, gcc 3.3.1-6 solved it, thanks!
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.