Closed Bug 1550512 Opened 7 years ago Closed 7 years ago

crash in libxul.so

Categories

(Thunderbird :: Build Config, defect)

x86_64
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rokupstys, Unassigned)

Details

Attachments

(1 file)

5.43 KB, application/octet-stream
Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

Ever since upgrade to v60 i am unable to start thunderbird. It crashes somewhere in libxul.so. I can still run v52. One thing to note - application runs fine with new profile, but adding account seems to trigger this IIRC.

What i actually need is someone to help me build a release version with debug info so i can find out where exactly it crashes. I think build system used by thunderbird strips binary. This is build script i used: https://gist.github.com/8f105a1fb50fa4cfdb84022c5cc7907e

Important changes compared to official package:

prevent pacman from stripping binaries:
options=(!emptydirs !strip debug)

disable optimizations due to obvious reasons:
#ac_add_options --enable-hardening
#ac_add_options --enable-optimize

attempt to include debug info:
export DEBUG_CFLAGS="-g"
export DEBUG_CXXFLAGS="-g"
export MAKEFLAGS="-g"

I left --enable-release because changing it to --enable-debug results in build that triggers one unrelated assert after another and i really can not fight that battle.

After package builds:
~/pkg/thunderbird/src % find . -name "libxul.so" | xargs file
./thunderbird-60.6.1/obj-x86_64-pc-linux-gnu/dist/thunderbird/libxul.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=a0ae0c8ed2f0a46235df23f8b56be4afe73d7d35, stripped
./thunderbird-60.6.1/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so: symbolic link to ../../toolkit/library/libxul.so
./thunderbird-60.6.1/obj-x86_64-pc-linux-gnu/toolkit/library/libxul.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=a0ae0c8ed2f0a46235df23f8b56be4afe73d7d35, with debug_info, not stripped

toolkit/library/libxul.so has debug information, but dist/thunderbird/libxul.so does not, and thus resulting package does not have debug info. Please help to solve this bit so dist/thunderbird/libxul.so also has debug info.

Attached file PKGBUILD

Modified package file used for building debug version of thunderbird.

Severity: normal → critical

I'm not familiar with arch or pkgbuild. I plan on setting up various virtual machines to test bugs like this in the next couple days, but for now could you try downloading the packaged from https://download.mozilla.org/?product=thunderbird-60.6.1-SSL&os=linux64&lang=en-US. I know its not ideal, but if it runs from a known working build we can work backward and figure out why your built version is failing.

It also might be worth asking around the arch forums to see if anyone is having build issues. 60.6.1 has been out for awhile so maybe the issue has been resolved and documents in that community.

I tried package you linked. To my surprise - it works! I noticed one detail. When i run archlinux package i get:

[calBackendLoader] Using Thunderbird's builtin libical backend
[1] 4059 segmentation fault (core dumped) thunderbird

When i run build from download.mozilla.org - calBackendLoader message is not there. No idea if it is relevant or not. I will bring this issue up in archlinux bug tracker.


I posted PKGBUILD pretty much for you to see what build options (ac_add_options) were used to compile thunderbird. Other details i believe are not relevant.

At this point my question is: does thunderbird build system strip it's binaries when built with --enable-release? If yes - how can i prevent it from stripping these binaries while maintaining build with --enable-release?

Glad to know at least the pre-packaged version is working, since this seems to be build issue I'm tagging our build engineer. He might know whats going on, and have a better solution.

Flags: needinfo?(rob)
Component: Untriaged → Build Config
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
  • You can try:
    • --disable-strip
    • --disable-install-strip
  • Any reason why you can't test against the contents of obj-x86_64-pc-linux-gnu/dist/bin? That's your debug area. obj-x86_64-pc-linux-gnu-thunderbird/ is from the "mach install" step on line 104 of your PKGBUILD. 'mach run --debug'
Flags: needinfo?(rob)

When i try to run thunderbird from build directory (using mach run or directly executing thunderbird binary) i get exit code 255 and message:

Couldn't load XPCOM.

I tried adding suggested flags but now build fails with this:

 0:00.32 /bin/make -C . -j12 -s -w install
 0:00.33 make: Entering directory '/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/obj-x86_64-pc-linux-gnu'
 0:00.44 make[1]: Entering directory '/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/obj-x86_64-pc-linux-gnu/comm/mail/installer'
 0:11.15 terminate called after throwing an instance of 'std::__ios_failure'
 0:11.18   what():  basic_ios::clear: iostream error
 0:12.17 Traceback (most recent call last):
 0:12.17   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/toolkit/mozapps/installer/packager.py", line 343, in <module>
 0:12.17     main()
 0:12.17   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/toolkit/mozapps/installer/packager.py", line 337, in main
 0:12.17     copier.copy(args.destination)
 0:12.17   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/python/mozbuild/mozpack/copier.py", line 431, in copy
 0:12.18     copy_results.append((destfile, f.copy(destfile, skip_if_older)))
 0:12.18   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/python/mozbuild/mozpack/files.py", line 296, in copy
 0:12.18     elfhack(dest)
 0:12.18   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/python/mozbuild/mozpack/executables.py", line 124, in elfhack
 0:12.18     errors.fatal('Error executing ' + ' '.join(cmd))
 0:12.18   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/python/mozbuild/mozpack/errors.py", line 103, in fatal
 0:12.18     self._handle(self.FATAL, msg)
 0:12.18   File "/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/python/mozbuild/mozpack/errors.py", line 98, in _handle
 0:12.18     raise ErrorMessage(msg)
 0:12.18 mozpack.errors.ErrorMessage: Error: Error executing /home/rk/pkg/thunderbird/src/thunderbird-60.6.1/obj-x86_64-pc-linux-gnu/build/unix/elfhack/elfhack ../../../dist/thunderbird/libxul.so
 0:12.22 make[1]: *** [/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/toolkit/mozapps/installer/packager.mk:22: stage-package] Error 1
 0:12.22 make[1]: Leaving directory '/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/obj-x86_64-pc-linux-gnu/comm/mail/installer'
 0:12.22 make: *** [/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/comm/mail/build.mk:16: install] Error 2
 0:12.22 make: Leaving directory '/home/rk/pkg/thunderbird/src/thunderbird-60.6.1/obj-x86_64-pc-linux-gnu'

Try disabling elfhack with --disable-elf-hack.

That worked. I will let archlinux package maintainer know. Thanks!

Are we calling this complete?

Flags: needinfo?(rokupstys)
Flags: needinfo?(rob)

Issue was elfhack being incompatible with clang. There probably already is another issue tracking it so this issue is solved.

Flags: needinfo?(rokupstys)
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(rob)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: