Bug 252633 - www/firefox 84.0.2,2 firefox fails to run if tiledb installed; privileged instruction error
Summary: www/firefox 84.0.2,2 firefox fails to run if tiledb installed; privileged in...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-13 07:30 UTC by alt2600
Modified: 2021-01-13 07:30 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alt2600 2021-01-13 07:30:53 UTC
Ran into this, today. It was working seemingly fine monday when isp had outage so I closed it down. Went to bed would not load tuesday morning, tried closing X11 and doing a PC reboot after not doing so for a while. No matter what I did I could not get firefox to open. I could load firefox profile manager, I've tried creating a fresh profile, but to not avail. As soon as the gui opens on the main browser screen it crashes with this error. I tried rebuilding it, I've tried deleting the package entirely and rebuilding it, nothing worked

As I was posting this I noticed in lldb that libtiledb.so was somehow being loaded by the elf loader in the backtrace and after deleting it firefox would work fine again. As I just installed tiledb for gdal probably sunday, and it was an optional dependancy not necessary for my ultimate need of gdal I'll simply disable it for now, not sure why it would even be attempted to be loaded though. As I seemingly resolved my issue by removing tiledb I just wanted to let folks know so something comes up with web searches if folks run into these odd issues. I'll gladly try to provide any more data for maintainers, but I will need guidance on exactly the logs/lldb outputs and what not folks would want, I don't know a lot about debugging beyond the very basics, strong desire to learn though. Will need some time, to respond, don't like breaking firefox or its compile time on my old westmere xeon. In this case should be easy, just need to reinstall tiledb, unless I need to do a debug build of firefox.

12.1-RELEASE-p12 FreeBSD 12.1-RELEASE-p12 r368528 amd64, using a custom kernel, and capsicum options all seem to be in place as this is essentially a generic kernel with unnecessary drivers removed. Entire system/ports are source update/builds, no binary packages, except when thats how ports installs them linux compat and such.

================= under XFCE
$ firefox

(firefox:74016): GVFS-RemoteVolumeMonitor-WARNING **: 22:34:45.887: remote volume monitor with dbus name org.gtk.vfs.UDisks2VolumeMonitor is not supported
JavaScript error: resource://activity-stream/lib/ASRouterNewTabHook.jsm, line 61: TypeError: this._router is null

(firefox:74016): GVFS-RemoteVolumeMonitor-WARNING **: 22:34:46.174: remote volume monitor with dbus name org.gtk.vfs.UDisks2VolumeMonitor is not supported
Exiting due to channel error.
Illegal instruction

=============== under KDE
$ firefox
JavaScript error: resource://activity-stream/lib/ASRouterNewTabHook.jsm, line 61: TypeError: this._router is null
Exiting due to channel error.
Illegal instruction


$ firefox --headless
*** You are running in headless mode.
JavaScript error: resource://activity-stream/lib/ASRouterNewTabHook.jsm, line 61: TypeError: this._router is null
*** You are running in headless mode.

(firefox:75818): GLib-GObject-WARNING **: 01:46:00.647: invalid (NULL) pointer instance

(firefox:75818): GLib-GObject-CRITICAL **: 01:46:00.647: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

this doesn't crash but throws the above on console.

I had always assumed this builds with LLVM but it seems to be linked with gcc not sure if thats good or bad. removing tiledb didn't change this.

$ ldd `which firefox`
/usr/local/bin/firefox:
        libc++.so.1 => /usr/lib/libc++.so.1 (0x80071c000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x800e00000)
        libm.so.5 => /lib/libm.so.5 (0x800e22000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x800e54000)
        libthr.so.3 => /lib/libthr.so.3 (0x800e6e000)
        libc.so.7 => /lib/libc.so.7 (0x80024a000)

for what its worth, all I gather is its trying to execute priviledged instruction. not risking running as root. only other thing that is odd as it seems the be trying to load libtiledb, which I know I recently installed for gdal.


$ lldb `which firefox`
(lldb) target create "/usr/local/bin/firefox"
Current executable set to '/usr/local/bin/firefox' (x86_64).
(lldb) r
Process 75911 launching
Process 75911 launched: '/usr/local/bin/firefox' (x86_64)
JavaScript error: resource://activity-stream/lib/ASRouterNewTabHook.jsm, line 61: TypeError: this._router is null
Process 75911 stopped
* thread #35, name = 'StreamTrans #1', stop reason = signal SIGILL: privileged instruction
    frame #0: 0x0000000825298f7f
->  0x825298f7f: vmovups -0xf3b1b(%rip), %xmm0
    0x825298f87: vmovups %xmm0, 0x1cd0e2(%rip)
    0x825298f8f: movabsq $0x6d6f632e6264656c, %rax ; imm = 0x6D6F632E6264656C 
    0x825298f99: movq   %rax, 0x1cd0df(%rip)
(lldb) bt
* thread #35, name = 'StreamTrans #1', stop reason = signal SIGILL: privileged instruction
  * frame #0: 0x0000000825298f7f
    frame #1: 0x00000008010d741e ld-elf.so.1`objlist_call_init(list=<unavailable>, lockstate=<unavailable>) at rtld.c:2723:7
    frame #2: 0x00000008010dc02a ld-elf.so.1`dlopen_object(name="/usr/local/lib/libtiledb.so", fd=<unavailable>, refobj=<unavailable>, lo_flags=<unavailable>, mode=1, lockstate=0xffffffff00000002) at rtld.c:3435:2
    frame #3: 0x00000008010d867b ld-elf.so.1`rtld_dlopen(name="/usr/local/lib/libtiledb.so", fd=-1, mode=<unavailable>) at rtld.c:3300:13
    frame #4: 0x000000080c6b6223 libnspr4.so`PR_LoadLibraryWithFlags + 163
    frame #5: 0x00000008087afab7 libxul.so`nsPluginFile::GetPluginInfo(nsPluginInfo&, PRLibrary**) + 215
    frame #6: 0x00000008087af1f1 libxul.so`PluginFinder::ScanPluginsDirectory(nsIFile*, bool*) + 1233
    frame #7: 0x00000008087ae299 libxul.so`PluginFinder::FindPlugins() + 233
    frame #8: 0x00000008087adf33 libxul.so`PluginFinder::Run() + 67
    frame #9: 0x00000008065dbebd libxul.so`nsThreadPool::Run() + 1005
    frame #10: 0x00000008065d7601 libxul.so`nsThread::ProcessNextEvent(bool, bool*) + 1281
    frame #11: 0x00000008065da96b libxul.so`NS_ProcessNextEvent(nsIThread*, bool) + 75
    frame #12: 0x0000000806a19518 libxul.so`mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) + 152
    frame #13: 0x00000008069e0417 libxul.so`MessageLoop::Run() + 87
    frame #14: 0x00000008065d5775 libxul.so`nsThread::ThreadFunc(void*) + 357
    frame #15: 0x000000080c6cdd8d libnspr4.so`___lldb_unnamed_symbol183$$libnspr4.so + 221
    frame #16: 0x000000080125d735 libthr.so.3`thread_start(curthread=0x0000000815aeb400) at thr_create.c:292:16
(lldb) 

after removing tiledb-2.1.6 package

$ firefox
JavaScript error: resource://gre/modules/XPCOMUtils.jsm, line 144: TypeError: Cc[aContract] is undefined
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.

but otherwise things seem to work fine with the browser.