Bug 263800 - mail/thunderbird crash at startup: 'thunderbird' terminated by signal SIGTRAP
Summary: mail/thunderbird crash at startup: 'thunderbird' terminated by signal SIGTRAP
Status: Closed DUPLICATE of bug 263798
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-05 15:47 UTC by tgl
Modified: 2022-05-08 12:33 UTC (History)
4 users (show)

See Also:
linimon: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tgl 2022-05-05 15:47:40 UTC
Dear Maintainer,

the very latest version of Thunderbird crashes at startup but it doesn't if started in "safe-mode"; however resetting the UI and disabling the addons permanently did not solve the issue, a fresh start did not solve the issue.

# PROCEDURE TO REPLICATE THE ISSUE
Open a terminal; digit thunderbird; enter.

# SYSTEM
```
FreeBSD nag09 13.0-RELEASE-p11 FreeBSD 13.0-RELEASE-p11 #0: Tue Apr  5 18:54:35 UTC 2022     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
```

# THUNDERBIRD VERSION
```
pkg info thunderbird 
thunderbird-91.9.0_2
Name           : thunderbird
Version        : 91.9.0_2
Installed on   : Thu May  5 09:41:47 2022 EDT
Origin         : mail/thunderbird
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : net-im mail news
Licenses       : 
Maintainer     : gecko@FreeBSD.org
WWW            : http://www.mozilla.com/thunderbird/
Comment        : Mozilla Thunderbird is standalone mail and news that stands above
Options        :
	ALSA           : off
	CANBERRA       : on
	DBUS           : on
	DEBUG          : off
	FFMPEG         : on
	JACK           : on
	LIBPROXY       : off
	LTO            : on
	OPTIMIZED_CFLAGS: on
	PROFILE        : on
	PULSEAUDIO     : on
	SNDIO          : on
	TEST           : off
Shared Libs required:
	libdbus-glib-1.so.2
	libbotan-2.so.19
	libicuuc.so.71
	libXext.so.6
	libpango-1.0.so.0
	libfreetype.so.6
	libpixman-1.so.0
	libcairo.so.2
	libgtk-3.so.0
	libxcb-shm.so.0
	libffi.so.7
	libX11-xcb.so.1
	libwebp.so.7
	libicui18n.so.71
	libatk-1.0.so.0
	libcairo-gobject.so.2
	libevent-2.1.so.7
	libplc4.so
	libXcomposite.so.1
	libvpx.so.7
	libxcb.so.1
	libgdk_pixbuf-2.0.so.0
	libgio-2.0.so.0
	libssl3.so
	libXfixes.so.3
	libwebpdemux.so.2
	libnss3.so
	libnssutil3.so
	libnspr4.so
	libgobject-2.0.so.0
	libglib-2.0.so.0
	libplds4.so
	libharfbuzz.so.0
	libX11.so.6
	libdbus-1.so.3
	libdav1d.so.6
	libXdamage.so.1
	libjson-c.so.5
	libgraphite2.so.3
	libpng16.so.16
	libXrender.so.1
	libaom.so.3
	libfontconfig.so.1
	libsmime3.so
	libgdk-3.so.0
Annotations    :
	FreeBSD_version: 1300139
	cpe            : cpe:2.3:a:mozilla:thunderbird:91.9.0:::::freebsd13:x64:2
	no_provide_shlib: yes
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 239MiB
```

# CONSOLE OUTPUT
```
thunderbird
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
console.error: (new Error("couldn't open library libc.so: /usr/lib/libc.so: invalid file format", "resource:///modules/CLib.jsm", 46))
JavaScript error: resource:///modules/CLib.jsm, line 46: Error: couldn't open library libc.so: /usr/lib/libc.so: invalid file format
Exiting due to channel error.
fish: Job 1, 'thunderbird' terminated by signal SIGTRAP (Trace or breakpoint trap)
```

# CONSOLE OUTPUT IN TROUBLESHOOT MODE
```
thunderbird -safe-mode
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
console.error: (new Error("couldn't open library libc.so: /usr/lib/libc.so: invalid file format", "resource:///modules/CLib.jsm", 46))
console.debug: "Successfully loaded OpenPGP library librnp.so version 0.16+git20220124.f06439f7.MZLA from /usr/local/lib/thunderbird/librnp.so"
JavaScript error: resource:///modules/CLib.jsm, line 46: Error: couldn't open library libc.so: /usr/lib/libc.so: invalid file format
JavaScript error: resource:///modules/CLib.jsm, line 46: Error: couldn't open library libc.so: /usr/lib/libc.so: invalid file format
console.debug: "Found 0 public keys and 0 secret keys (0 protected, 0 unprotected)"
console.warn: services.settings: Could not determine network status. Message: TypeError: Cc[aContract] is undefined
console.warn: services.settings: thunderbird/hijack-blocklists has signature disabled
JavaScript error: resource:///modules/ActivityManager.jsm, line 129: NS_ERROR_NOT_AVAILABLE: 
IPDL protocol error: Handler returned error code!

###!!! [Parent][DispatchAsyncMessage] Error: PClientManager::Msg_ExpectFutureClientSource Processing error: message was deserialized, but the handler returned false (indicating failure)

IPDL protocol error: Handler returned error code!

###!!! [Parent][DispatchAsyncMessage] Error: PClientManager::Msg_ForgetFutureClientSource Processing error: message was deserialized, but the handler returned false (indicating failure)

JavaScript error: resource:///modules/ActivityManager.jsm, line 129: NS_ERROR_NOT_AVAILABLE: 
WARNING: A blocker encountered an error while we were waiting.
          Blocker:  TelemetryController: shutting down
          Phase: profile-before-change-telemetry
          State: {"initialized":false,"initStarted":false,"haveDelayedInitTask":false,"shutdownBarrier":"Not started","connectionsBarrier":"Not started","sendModule":{"sendingEnabled":false,"pendingPingRequestCount":0,"pendingPingActivityCount":0,"unpersistedPingCount":0,"persistedPingCount":3,"schedulerState":{"shutdown":true,"hasSendTask":false,"sendsFailed":false,"sendTaskState":"bail out - no pings to send","backoffDelay":60000}},"haveDelayedNewProfileTask":false,"shutdownStep":"TelemetrySession 2.1687310000052094"}
WARNING: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsITelemetry.msSinceProcessStartExcludingSuspend]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource://gre/modules/TelemetrySession.jsm :: getSessionPayload :: line 757"  data: no]
WARNING: getSessionPayload@resource://gre/modules/TelemetrySession.jsm:757:19
saveShutdownPings@resource://gre/modules/TelemetrySession.jsm:959:34
shutdownChromeProcess/cleanup/<@resource://gre/modules/TelemetrySession.jsm:1226:20
cleanup@resource://gre/modules/TelemetrySession.jsm:1233:9
shutdownChromeProcess@resource://gre/modules/TelemetrySession.jsm:1250:14
shutdown@resource://gre/modules/TelemetrySession.jsm:259:17
_cleanupOnShutdown@resource://gre/modules/TelemetryControllerParent.jsm:977:30
observe@resource://gre/modules/AsyncShutdown.jsm:575:16

JavaScript error: resource://gre/modules/TelemetrySession.jsm, line 757: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsITelemetry.msSinceProcessStartExcludingSuspend]
JavaScript error: resource://gre/modules/TelemetrySession.jsm, line 757: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsITelemetry.msSinceProcessStartExcludingSuspend]
```

# CONSOLE OUTPUT FRESH START
```
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
console.error: (new Error("couldn't open library libc.so: /usr/lib/libc.so: invalid file format", "resource:///modules/CLib.jsm", 46))
console.warn: Calendar: Warning:  Using guessed timezone
  America/New_York (UTC-0500/-0400).
This ZoneInfo timezone seems to match the operating system timezone this year.
This ZoneInfo timezone was chosen based on matching the operating system
timezone with likely timezones for internet users using US English.
Exiting due to channel error.
fish: Job 1, 'thunderbird' terminated by signal SIGTRAP (Trace or breakpoint trap)
```

Thanks,

TGL
Comment 1 pete 2022-05-05 21:06:32 UTC
I can confirm that this is impacting 14-CURRENT as well:

$ thunderbird 
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
console.error: (new Error("couldn't open library libc.so: /usr/lib/libc.so: invalid file format", "resource:///modules/CLib.jsm", 46))
Exiting due to channel error.
Exiting due to channel error.
Trace/BPT trap (core dumped)
$

I have a core for analysis but i don't think thunderbird is build with debug symbols so that might not be much help.
Comment 2 Dan Kotowski 2022-05-05 21:09:22 UTC
Try building with LTO unset?
Comment 4 Dan Kotowski 2022-05-05 21:14:12 UTC
Solved by commit fc0a979a30ea24c8d28d8a3893bb5ac0549e56cb
Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
Date:   Tue May 3 18:27:01 2022 +0200

    www/firefox{,-esr}, mail/thunderbird: remote LTO from default options

    When rust's internal LLVM does not match the LLVM used for building
    gecko ports, LTO-built binaries will be unstable, exhibit crashes
    and other undesirable behaviour. Rust 1.60 created such a situation.
    Disabling LTO will allow these ports to be used, and keeping it off
    will safe on build and debug time.
Comment 5 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2022-05-08 12:33:35 UTC
fixed in thunderbird-91.9.0_3

*** This bug has been marked as a duplicate of bug 263798 ***