Closed Bug 609553 Opened 14 years ago Closed 14 years ago

Failed to start Thunderbird when lightning is enabled

Categories

(Calendar :: Internal Components, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: eagle.lu, Assigned: eagle.lu)

Details

Attachments

(1 file, 2 obsolete files)

steps: 1. Build latest TB trunk code with --enable-calendar 2. start TB TB fails to start and prints following error: Program ./thunderbird-bin (pid = 19283) received signal 6. Stack: UNKNOWN 0xdd640c JS_Assert+0x0000005D [/home/brian/moz-ws/community/1027/thunderbird/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so +0x001DA725] UNKNOWN [/home/brian/moz-ws/community/1027/thunderbird/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so +0x000C26F8] UNKNOWN [/home/brian/moz-ws/community/1027/thunderbird/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so +0x000C28F3] UNKNOWN [/home/brian/moz-ws/community/1027/thunderbird/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so +0x000C2930] js_NewDateObjectMsec(JSContext*, double)+0x00000033 [/home/brian/moz-ws/community/1027/thunderbird/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so +0x000C8861] UNKNOWN [/home/brian/moz-ws/community/1027/thunderbird/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so +0x000280E5] UNKNOWN [./libxul.so +0x0112329D] UNKNOWN [./libxul.so +0x01D1CA5C] UNKNOWN [./libxul.so +0x01D1CE65] UNKNOWN [./libxul.so +0x01D155DB] UNKNOWN [./libxul.so +0x01D15E50] UNKNOWN [./libxul.so +0x01D15EF5] UNKNOWN [./libxul.so +0x01D15F2E] UNKNOWN [./libxul.so +0x01F04863] UNKNOWN [./libxul.so +0x01CF13FD] UNKNOWN [./libxul.so +0x01CF18FA] UNKNOWN [./libxul.so +0x01CF1F01] UNKNOWN [./libxul.so +0x01C43A7B] JS_CallFunctionValue+0x0000016B [./libxul.so +0x01C604B4] UNKNOWN [./libxul.so +0x0110C40D] UNKNOWN [./libxul.so +0x01102657] UNKNOWN [./libxul.so +0x01B39EBF] UNKNOWN [./libxul.so +0x00999391] UNKNOWN [./libxul.so +0x00999770] UNKNOWN [./libxul.so +0x009C5B4A] UNKNOWN [./libxul.so +0x009C600C] UNKNOWN [./libxul.so +0x009C3D07] UNKNOWN [./libxul.so +0x009C4990] UNKNOWN [./libxul.so +0x00572E9F] UNKNOWN [./libxul.so +0x01215F0C] UNKNOWN [./libxul.so +0x01215866] UNKNOWN [./libxul.so +0x01243D37] UNKNOWN [./libxul.so +0x01242981] UNKNOWN [./libxul.so +0x01242538] UNKNOWN [./libxul.so +0x01244CC1] UNKNOWN [./libxul.so +0x01242566] UNKNOWN [./libxul.so +0x0124209C] UNKNOWN [./libxul.so +0x0030E00D] UNKNOWN [./libxul.so +0x0089DA23] UNKNOWN [./libxul.so +0x0089D7D0] UNKNOWN [./libxul.so +0x008931FF] UNKNOWN [./libxul.so +0x008AE2CE] UNKNOWN [./libxul.so +0x01B1BFF8] UNKNOWN [./libxul.so +0x01AAA589] UNKNOWN [./libxul.so +0x01522AA4] UNKNOWN [./libxul.so +0x012F2821] XRE_main+0x00003127 [./libxul.so +0x002B35FD] UNKNOWN [./thunderbird-bin +0x00001508] __libc_start_main+0x000000E7 [/lib/libc.so.6 +0x00016CE7] Sleeping for 300 seconds. Type 'gdb ./thunderbird-bin 19283' to attach your debugger to this thread. The root cause is
The root cause is libcalbasecomps.so is linked with libjs_static.a. It should be linked with libxul.so instead.
Attached patch link with -lxul instead of -ljs_static (obsolete) (deleted) — Splinter Review
Assignee: nobody → brian.lu
Attachment #488144 - Flags: review?
Attachment #488144 - Flags: review? → review?(ssitter)
Component: Lightning Only → Internal Components
QA Contact: lightning → base
Attachment #488144 - Flags: review?(ssitter) → review?(philipp)
Comment on attachment 488144 [details] [diff] [review] link with -lxul instead of -ljs_static r=philipp. Do you need help checking this in?
Attachment #488144 - Flags: review?(philipp) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.0b3
I had to back this out due to build bustage on Windows: link -NOLOGO -DLL -OUT:calbasecomps.dll -PDB:calbasecomps.pdb -SUBSYSTEM:WINDOWS calBaseModule.obj ./module.res -NXCOMPAT -DYNAMICBASE -SAFESEH -DEBUG -DEBUGTYPE:CV -DEBUG -OPT:REF -IMPLIB:fake.lib @../../../calendar/base/src/calbase_s.lib.fake @../../../calendar/libical/src/libical/mozical.lib.fake e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/nspr4.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/plc4.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/plds4.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/xpcomglue_s.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/xpcom.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/mozalloc.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/xpcom.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/xul.lib e:/buildbot/comm-central-lightning-win32/build/objdir-tb/mozilla/dist/lib/mozalloc.lib kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib Creating library fake.lib and object fake.exp calDateTime.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) double __cdecl js_DateGetMsecSinceEpoch(struct JSContext *,struct JSObject *)" (__imp_?js_DateGetMsecSinceEpoch@@YANPAUJSContext@@PAUJSObject@@@Z) referenced in function "public: virtual unsigned int __stdcall calDateTime::SetProperty(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned __int64 *,int *)" (?SetProperty@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HPA_KPAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl js_DateIsValid(struct JSContext *,struct JSObject *)" (__imp_?js_DateIsValid@@YAHPAUJSContext@@PAUJSObject@@@Z) referenced in function "public: virtual unsigned int __stdcall calDateTime::SetProperty(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned __int64 *,int *)" (?SetProperty@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HPA_KPAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_GetStringChars referenced in function "public: virtual unsigned int __stdcall calDateTime::SetProperty(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned __int64 *,int *)" (?SetProperty@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HPA_KPAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_GetStringLength referenced in function "public: virtual unsigned int __stdcall calDateTime::SetProperty(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned __int64 *,int *)" (?SetProperty@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HPA_KPAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_DefineUCProperty referenced in function "public: virtual unsigned int __stdcall calDateTime::NewResolve(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned int,struct JSObject * *,int *)" (?NewResolve@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HIPAPAU4@PAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct JSObject * __cdecl js_NewDateObjectMsec(struct JSContext *,double)" (__imp_?js_NewDateObjectMsec@@YAPAUJSObject@@PAUJSContext@@N@Z) referenced in function "public: virtual unsigned int __stdcall calDateTime::GetProperty(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned __int64 *,int *)" (?GetProperty@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HPA_KPAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) struct JSObject * __cdecl js_NewDateObject(struct JSContext *,int,int,int,int,int,int)" (__imp_?js_NewDateObject@@YAPAUJSObject@@PAUJSContext@@HHHHHH@Z) referenced in function "public: virtual unsigned int __stdcall calDateTime::GetProperty(class nsIXPConnectWrappedNative *,struct JSContext *,struct JSObject *,int,unsigned __int64 *,int *)" (?GetProperty@calDateTime@@UAGIPAVnsIXPConnectWrappedNative@@PAUJSContext@@PAUJSObject@@HPA_KPAH@Z) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_PropertyStub referenced in function "void __cdecl js::`dynamic initializer for 'PropertyStub''(void)" (??__EPropertyStub@js@@YAXXZ) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_EnumerateStub referenced in function "void __cdecl js::`dynamic initializer for 'EnumerateStub''(void)" (??__EEnumerateStub@js@@YAXXZ) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_ResolveStub referenced in function "void __cdecl js::`dynamic initializer for 'ResolveStub''(void)" (??__EResolveStub@js@@YAXXZ) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_ConvertStub referenced in function "void __cdecl js::`dynamic initializer for 'ConvertStub''(void)" (??__EConvertStub@js@@YAXXZ) calDateTime.obj : error LNK2019: unresolved external symbol __imp__JS_FinalizeStub referenced in function "void __cdecl js::`dynamic initializer for 'FinalizeStub''(void)" (??__EFinalizeStub@js@@YAXXZ) calbasecomps.dll : fatal error LNK1120: 12 unresolved externals
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I don't have MS Windows environment. Can someone take a look at this? Basic idea is that we should use libxul.so instead of libjs_static.a after libxul.so was landed in comm-central.
(In reply to comment #6) > I don't have MS Windows environment. Can someone take a look at this? > > Basic idea is that we should use libxul.so instead of libjs_static.a after > libxul.so was landed in comm-central. I get bug 611711 (SIGSEGV crash at startup when Lightning is enabled) in Mozilla-built nightlies of SeaMonkey (with libxul.so) and Lightning.
I found the root cause and testing the new patch, if it works well on both linux and Windows, I'll post it tomorrow.
Attached patch new patch (obsolete) (deleted) — Splinter Review
The root cause is that js is a share library instead of a static library on windows, so link to xul.dll is incorrect. If js is a shared library, MOZ_JS_LIB points to it otherwise MOZ_JS_LIB points to libxul shared library which js static library is linked into.
Attachment #488144 - Attachment is obsolete: true
Attachment #491081 - Flags: review?(bienvenu)
Comment on attachment 491081 [details] [diff] [review] new patch I'll let Standard8 look at this...
Attachment #491081 - Flags: review?(bienvenu) → review?(bugzilla)
Status: REOPENED → ASSIGNED
Comment on attachment 491081 [details] [diff] [review] new patch This failed on Mac saying that it couldn't find -lxul. I think the first approach was possibly closer to what we want. I'm not sure this would quite work, but in calendar/base/build/Makefile.in could you do something like this: ifdef MOZ_ENABLE_LIBXUL EXTRA_DSO_LDOPTS += $(XPCOM_LIBS) else EXTRA_DSO_LDOPTS += $(MOZ_JS_LIBS) endif ? I've not tested it, but I think that would be more likely to work.
Attachment #491081 - Flags: review?(bugzilla) → review-
(In reply to comment #11) > Comment on attachment 491081 [details] [diff] [review] > new patch > > This failed on Mac saying that it couldn't find -lxul. > > I think the first approach was possibly closer to what we want. I'm not sure > this would quite work, but in calendar/base/build/Makefile.in could you do > something like this: > > ifdef MOZ_ENABLE_LIBXUL > EXTRA_DSO_LDOPTS += $(XPCOM_LIBS) > else > EXTRA_DSO_LDOPTS += $(MOZ_JS_LIBS) > endif > > ? > > I've not tested it, but I think that would be more likely to work. No, it doesn't work. Can you attach the build output on Mac here?
I got similar error messages of comment 5
Attached patch another patch (deleted) — Splinter Review
Attachment #491081 - Attachment is obsolete: true
Attachment #493195 - Flags: review?(bugzilla)
Comment on attachment 493195 [details] [diff] [review] another patch Ok, not quite sure why the enable libxul one didn't work, but this is actually a much better version IMO. From what I can tell this should work, so I've pushed it to comm-central: http://hg.mozilla.org/comm-central/rev/fa557312ce24
Attachment #493195 - Flags: review?(bugzilla) → review+
This seems to have landed fine, although the Mac builder is currently busted due to other things, but I suspect everything is ok now.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Target Milestone: 1.0b3 → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: