Bug 256438 - graphics/mesa-dri: causing firefox to coredump with WebRenderer enabled
Summary: graphics/mesa-dri: causing firefox to coredump with WebRenderer enabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-06 11:24 UTC by Dan Kotowski
Modified: 2022-10-28 10:55 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kotowski 2021-06-06 11:24:44 UTC
Firefox coredumps at start unless using either MOZ_WEBRENDER=0 or glx.webrender.force-disabled=true

firefox 89.0_2,2
mesa-dri 20.2.3_1

Core was generated by `firefox'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  thr_kill () at thr_kill.S:4
4       RSYSCALL(thr_kill)
[Current thread is 1 (LWP 197738)]
(gdb) bt
#0  thr_kill () at thr_kill.S:4
#1  0x000000004050a508 in __raise (s=11) at /usr/src/lib/libc/gen/raise.c:52
#2  0x0000000048ebd87c in nsProfileLock::FatalSignalHandler(int, __siginfo*, void*) () at /usr/local/lib/firefox/libxul.so
#3  0x000000004969c0f4 in WasmTrapHandler(int, __siginfo*, void*) () at /usr/local/lib/firefox/libxul.so
#4  0x0000000040428a5c in handle_signal
    (actp=actp@entry=0xffffba52b4b0, sig=sig@entry=11, info=info@entry=0xffffba52b520, ucp=ucp@entry=0xffffba52b570)
    at /usr/src/lib/libthr/thread/thr_sig.c:301
#5  0x0000000040428190 in thr_sighandler (sig=11, info=0xffffba52b520, _ucp=0xffffba52b570)
    at /usr/src/lib/libthr/thread/thr_sig.c:246
#6  0x0000fffffffff000 in <signal handler called> ()
#7  0x000000005c98e524 in  () at /usr/local/llvm10/lib/libLLVM-10.so
#8  0x000000005abe28c4 in llvm::sys::Memory::protectMappedMemory(llvm::sys::MemoryBlock const&, unsigned int) ()
    at /usr/local/llvm10/lib/libLLVM-10.so
#9  0x000000005bd07108 in llvm::SectionMemoryManager::applyMemoryGroupPermissions(llvm::SectionMemoryManager::MemoryGroup&, unsigned int) () at /usr/local/llvm10/lib/libLLVM-10.so
#10 0x000000005bd07004 in llvm::SectionMemoryManager::finalizeMemory(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) () at /usr/local/llvm10/lib/libLLVM-10.so
#11 0x000000005bd3a20c in llvm::MCJIT::finalizeObject() () at /usr/local/llvm10/lib/libLLVM-10.so
#12 0x000000005bd0572c in LLVMGetPointerToGlobal () at /usr/local/llvm10/lib/libLLVM-10.so
#13 0x000000005874a5b0 in  () at /usr/local/lib/dri/swrast_dri.so
#14 0x00000000587461dc in  () at /usr/local/lib/dri/swrast_dri.so
#15 0x0000000058729938 in  () at /usr/local/lib/dri/swrast_dri.so
#16 0x00000000581c2938 in  () at /usr/local/lib/dri/swrast_dri.so
#17 0x00000000582accdc in  () at /usr/local/lib/dri/swrast_dri.so
#18 0x00000000582ad120 in  () at /usr/local/lib/dri/swrast_dri.so
#19 0x0000000049d38328 in webrender::renderer::Renderer::draw_instanced_batch () at /usr/local/lib/firefox/libxul.so
#20 0x0000000049d3d088 in webrender::renderer::Renderer::draw_clip_batch_list () at /usr/local/lib/firefox/libxul.so
#21 0x0000000049d406f8 in webrender::renderer::Renderer::draw_frame () at /usr/local/lib/firefox/libxul.so
#22 0x0000000049d32cf4 in webrender::renderer::Renderer::render_impl () at /usr/local/lib/firefox/libxul.so
#23 0x0000000049d31e1c in webrender::renderer::Renderer::render () at /usr/local/lib/firefox/libxul.so
#24 0x0000000049b43334 in wr_renderer_render () at /usr/local/lib/firefox/libxul.so
#25 0x0000000046971354 in mozilla::wr::RenderThread::UpdateAndRender(mozilla::wr::WrWindowId, mozilla::layers::BaseTransactionId<mozilla::VsyncIdType> const&, mozilla::TimeStamp const&, bool, mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> > const&, mozilla::Maybe<mozilla::wr::ImageFormat> const&, mozilla::Maybe<mozilla::Range<unsigned char> > const&, bool*) () at /usr/local/lib/firefox/libxul.so
#26 0x00000000469701a0 in mozilla::wr::RenderThread::HandleFrameOneDoc(mozilla::wr::WrWindowId, bool) ()
    at /usr/local/lib/firefox/libxul.so
#27 0x0000000046977738 in mozilla::detail::RunnableMethodImpl<mozilla::wr::RenderThread*, void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool), true, (mozilla::RunnableKind)0, mozilla::wr::WrWindowId, bool>::Run() ()
    at /usr/local/lib/firefox/libxul.so
#28 0x000000004612f4ec in MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask&&) ()
    at /usr/local/lib/firefox/libxul.so
#29 0x000000004612f720 in MessageLoop::DoWork() () at /usr/local/lib/firefox/libxul.so
#30 0x000000004613023c in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) () at /usr/local/lib/firefox/libxul.so
#31 0x000000004612f094 in MessageLoop::Run() () at /usr/local/lib/firefox/libxul.so
#32 0x00000000461379e0 in base::Thread::ThreadMain() () at /usr/local/lib/firefox/libxul.so
#33 0x0000000046135594 in ThreadFunc(void*) () at /usr/local/lib/firefox/libxul.so
#34 0x000000004041e050 in thread_start (curthread=0x5d168300) at /usr/src/lib/libthr/thread/thr_create.c:292
#35 0x000000004041dba8 in _pthread_create
    (thread=0x5759f290, attr=<optimized out>, start_routine=<optimized out>, arg=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_create.c:187
#36 0x000000004088c408 in  ()


Per jbeich swrast_dri may indicate an issue with llvmpipe
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-06-06 18:34:17 UTC
(In reply to Dan Kotowski from comment #0)
> Per jbeich swrast_dri may indicate an issue with llvmpipe

Originally discussed on 2021-06-05 at #helpdesk on Discord. Other details:
- llvmpipe is used due to lack of DRM per https://github.com/freebsd/drm-kmod/issues/84
- Dan tested on aarch64 (Cortex-A72) but I couldn't reproduce via LIBGL_ALWAYS_SOFTWARE=1 on amd64+i386 (Skylake)
Comment 2 Dan Kotowski 2021-07-13 10:51:00 UTC
This seems to be fixed in more recent versions, we can close if we aren't concerened about it anymore
Comment 3 Emmanuel Vadot freebsd_committer freebsd_triage 2022-10-28 10:55:08 UTC
Closing at reporter request.