Hi, Firefox on my arm64 M1 MacBook (dmesg below) crashes with a pledge violation when I visit a certain website (no interaction needed, just wait a couple of seconds for the page to load). On my amd64 laptops, there is no such issue.
$ firefox https://mijn.ing.nl/ Exiting due to channel error. Exiting due to channel error. Exiting due to channel error. Exiting due to channel error. Exiting due to channel error. Abort trap (core dumped) $ dmesg | tail -1 firefox[91333]: pledge "", syscall 289 $ grep 289 /usr/include/sys/syscall.h #define SYS_shmget 289 With some printf() debugging, I found out that the shmget() call responsible for the pledge violation is in the alloc_shm() function in xenocara/lib/mesa/src/gallium/winsys/sw/dri/dri_sw_winsys.c. There's also a backtrace below but there's no debug symbols some part of it. So apparently a code path involving shmget() is used on my M1, but not on my amd64 machines. I don't know enough about the graphics stuff to know whether the call to shmget() should be expected on the M1. Does anyone have an idea how to proceed? Caspar ======= BACKTRACE ======= (gdb) bt #0 shmget () at /tmp/-:4 #1 0x0000000a63f42b98 in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #2 0x0000000a642a00b0 [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #3 0x0000000a637b748c [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #4 0x0000000a637bd38c [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #5 0x0000000a638d4510 [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #6 0x0000000a638d3f18 [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #7 0x0000000a637b8178 [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #8 0x0000000a637bc708 [PAC] in ?? () from /usr/X11R6/lib/modules/dri/swrast_dri.so #9 0x00000009fcd61f78 [PAC] in drisw_bind_context (context=0xa3d948300, draw=<optimized out>, read=<optimized out>) at /home/caspar/src/openbsd-xenocara-git/lib/mesa/mk/libGL/../../src/glx/drisw_glx.c:446 #10 0x00000009fcd6a868 [PAC] in MakeContextCurrent (dpy=0xa04519000, draw=18874452, read=18874452, gc_user=0xa3d948300, opcode=5) at /home/caspar/src/openbsd-xenocara-git/lib/mesa/mk/libGL/../../src/glx/glxcurrent.c:203 #11 0x0000000ae4d11448 [PAC] in mozilla::gl::GLXLibrary::fMakeCurrent (this=0x121, drawable=16384, context=0x380, display=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLXLibrary.h:68 #12 mozilla::gl::GLContextGLX::MakeCurrentImpl (this=0xa68a96550) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContextProviderGLX.cpp:473 #13 0x0000000ae61bbd04 [PAC] in mozilla::gl::GLContext::MakeCurrent (this=0xa68a96550, aForce=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContext.cpp:2443 #14 0x0000000ae5d71048 [PAC] in mozilla::gl::GLContext::InitImpl (this=0xa68a96550) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContext.cpp:374 #15 0x0000000ae5b51d9c [PAC] in mozilla::gl::GLContext::Init (this=0xa68a96550) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContext.cpp:326 #16 0x0000000ae61b9034 [PAC] in mozilla::gl::GLContextGLX::Init (this=0xa68a96550) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContextProviderGLX.cpp:453 #17 0x0000000ae4d11398 [PAC] in mozilla::gl::GLContextGLX::CreateGLContext(mozilla::gl::GLContextDesc const&, std::__1::shared_ptr<mozilla::gfx::XlibDisplay>, unsigned long, __GLXFBConfigRec*, unsigned long)::$_1::operator()(std::__1::vector<int, std::__1::allocator<int> > const&) const (this=<optimized out>, attribs=...) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContextProviderGLX.cpp:351 #18 0x0000000ae61ba090 [PAC] in mozilla::gl::GLContextGLX::CreateGLContext (desc=..., display=..., drawable=<optimized out>, cfg=<optimized out>, ownedPixmap=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContextProviderGLX.cpp:417 #19 0x0000000ae61ba650 [PAC] in mozilla::gl::CreateOffscreenPixmapContext (desc=..., size=..., out_failureId=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContextProviderGLX.cpp:884 #20 mozilla::gl::GLContextProviderGLX::CreateHeadless (desc=..., out_failureId=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/gfx/gl/GLContextProviderGLX.cpp:892 #21 0x0000000ae67bb864 [PAC] in mozilla::WebGLContext::CreateAndInitGL(bool, std::__1::vector<mozilla::WebGLContext::FailureReason, std::__1::allocator<mozilla::WebGLContext::FailureReason> >*)::$_32::operator()(already_AddRefed<mozilla::gl::GLContext> (*)(mozilla::gl::GLContextCreateDesc const&, nsTSubstring<char>*), char const*) const (this=<optimized out>, pfnCreate=<optimized out>, info=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/WebGLContext.cpp:380 #22 mozilla::WebGLContext::CreateAndInitGL(bool, std::__1::vector<mozilla::WebGLContext::FailureReason, std::__1::allocator<mozilla::WebGLContext::FailureReason> >*)::$_6::operator()() const (this=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/WebGLContext.cpp:393 #23 mozilla::WebGLContext::CreateAndInitGL (this=0xa28657610, out_failReasons=0xa2bca2ae8, forceEnabled=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/WebGLContext.cpp:387 #24 mozilla::WebGLContext::Create(mozilla::HostWebGLContext&, mozilla::webgl::InitContextDesc const&, mozilla::webgl::InitContextResult*)::$_8::operator()() const (this=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/WebGLContext.cpp:545 #25 mozilla::WebGLContext::Create (host=..., desc=..., out=0xa2bca2c50) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/WebGLContext.cpp:519#26 0x0000000ae67bae8c [PAC] in mozilla::HostWebGLContext::Create (ownerData=..., desc=..., out=0x380) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/HostWebGLContext.cpp:58 #27 0x0000000ae67ff2d4 [PAC] in mozilla::dom::WebGLParent::RecvInitialize (this=0xa87bab960, desc=..., out=0x380) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/dom/canvas/WebGLParent.cpp:1 #28 0x0000000ae8064fdc [PAC] in mozilla::dom::PWebGLParent::OnMessageReceived (this=0xa87bab960, msg__=..., reply__=...) at /home/ports/pobj/firefox-119.0.1/build-aarch64/ipc/ipdl/PWebGLParent.cpp:411 #29 0x0000000ae4e05e4c [PAC] in mozilla::gfx::PCanvasManagerParent::OnMessageReceived (this=<optimized out>, msg__=..., reply__=...) at /home/ports/pobj/firefox-119.0.1/build-aarch64/ipc/ipdl/PCanvasManagerParent.cpp:383 #30 0x0000000ae60afd88 [PAC] in mozilla::ipc::MessageChannel::DispatchSyncMessage (this=0xa9917e1e8, aProxy=0xa28eead60, aMsg=..., aReply=...) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/glue/MessageChannel.cpp:1767 #31 mozilla::ipc::MessageChannel::DispatchMessage (this=0xa9917e1e8, aProxy=0xa28eead60, aMsg=...) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/glue/MessageChannel.cpp:1723 #32 0x0000000ae60b065c [PAC] in mozilla::ipc::MessageChannel::RunMessage (this=0xa9917e1e8, aProxy=0xa28eead60, aTask=...) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/glue/MessageChannel.cpp:1525 #33 0x0000000ae5105afc [PAC] in mozilla::ipc::MessageChannel::MessageTask::Run (this=0xab3297cb0) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/glue/MessageChannel.cpp:1623 #34 0x0000000ae51bfefc [PAC] in nsThread::ProcessNextEvent (this=0xa23283be0, aMayWait=<optimized out>, aResult=0xa2bca32ec) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/xpcom/threads/nsThread.cpp:1193 #35 0x0000000ae51bfa0c [PAC] in NS_ProcessNextEvent (aThread=0x1, aMayWait=<optimized out>) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/xpcom/threads/nsThreadUtils.cpp:480 #36 0x0000000ae4bd1b38 [PAC] in mozilla::ipc::MessagePumpForNonMainThreads::Run (this=0xa44be1140, aDelegate=0xa2bca3378) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/glue/MessagePump.cpp:300 #37 0x0000000ae59caa74 [PAC] in MessageLoop::RunInternal (this=0x4000) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/chromium/src/base/message_loop.cc:370 #38 MessageLoop::RunHandler (this=0x4000) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/chromium/src/base/message_loop.cc:363 #39 MessageLoop::Run (this=0x4000) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/ipc/chromium/src/base/message_loop.cc:345 #40 0x0000000ae4995568 [PAC] in nsThread::ThreadFunc (aArg=0xa79ef17a0) at /home/ports/pobj/firefox-119.0.1/firefox-119.0.1/xpcom/threads/nsThread.cpp:391 #41 0x0000000acc4ae6e4 [PAC] in _pt_root (arg=0xa58b22820) at ptthread.c:201 #42 0x0000000ae16d30c0 [PAC] in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:96 #43 0x0000000a5d9672d8 [PAC] in __tfork_thread () at /usr/src/lib/libc/arch/aarch64/sys/tfork_thread.S:43 ======= DMESG ======= OpenBSD 7.4-current (GENERIC.MP) #16: Fri Nov 3 21:38:55 MDT 2023 [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP real mem = 16580771840 (15812MB) avail mem = 15940440064 (15201MB) random: good seed from bootblocks mainbus0 at root: Apple MacBook Air (M1, 2020) efi0 at mainbus0: UEFI 2.10 efi0: Das U-Boot rev 0x20230700 cpu0 at mainbus0 mpidr 0: Apple Icestorm r1p1 cpu0: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu0: 4096KB 128b/line 16-way L2 cache cpu0: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu1 at mainbus0 mpidr 1: Apple Icestorm r1p1 cpu1: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu1: 4096KB 128b/line 16-way L2 cache cpu1: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu2 at mainbus0 mpidr 2: Apple Icestorm r1p1 cpu2: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu2: 4096KB 128b/line 16-way L2 cache cpu2: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu3 at mainbus0 mpidr 3: Apple Icestorm r1p1 cpu3: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache cpu3: 4096KB 128b/line 16-way L2 cache cpu3: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu4 at mainbus0 mpidr 10100: Apple Firestorm r1p1 cpu4: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu4: 12288KB 128b/line 12-way L2 cache cpu4: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu5 at mainbus0 mpidr 10101: Apple Firestorm r1p1 cpu5: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu5: 12288KB 128b/line 12-way L2 cache cpu5: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu6 at mainbus0 mpidr 10102: Apple Firestorm r1p1 cpu6: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu6: 12288KB 128b/line 12-way L2 cache cpu6: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR cpu7 at mainbus0 mpidr 10103: Apple Firestorm r1p1 cpu7: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache cpu7: 12288KB 128b/line 12-way L2 cache cpu7: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,CSV3,CSV2,DIT,SBSS+MSR "framebuffer" at mainbus0 not configured "region95" at mainbus0 not configured "region94" at mainbus0 not configured "region57" at mainbus0 not configured "dcp_data" at mainbus0 not configured "uat-handoff" at mainbus0 not configured "uat-pagetables" at mainbus0 not configured "uat-ttbs" at mainbus0 not configured apm0 at mainbus0 "opp-table-0" at mainbus0 not configured "opp-table-1" at mainbus0 not configured "opp-table-gpu" at mainbus0 not configured agtimer0 at mainbus0: 24000 kHz "pmu-e" at mainbus0 not configured "pmu-p" at mainbus0 not configured "clock-ref" at mainbus0 not configured "clock-120m" at mainbus0 not configured "clock-200m" at mainbus0 not configured "clock-disp0" at mainbus0 not configured "clock-ref-nco" at mainbus0 not configured simplebus0 at mainbus0: "soc" aplpmgr0 at simplebus0 aplpmgr1 at simplebus0 aplmbox0 at simplebus0 apldart0 at simplebus0 apldart1 at simplebus0 apldart2 at simplebus0: locked apldart3 at simplebus0: locked aplmbox1 at simplebus0 apldart4 at simplebus0: bypass aplintc0 at simplebus0 nirq 896 ndie 1 aplpinctrl0 at simplebus0 aplpinctrl1 at simplebus0 apldog0 at simplebus0 aplmbox2 at simplebus0 aplpinctrl2 at simplebus0 aplpinctrl3 at simplebus0 aplmbox3 at simplebus0 aplefuse0 at simplebus0 apldart5 at simplebus0: bypass apldart6 at simplebus0: bypass apldart7 at simplebus0: bypass apldart8 at simplebus0: bypass apldart9 at simplebus0 "gpu" at simplebus0 not configured aplcpu0 at simplebus0 aplcpu1 at simplebus0 "dcp" at simplebus0 not configured "display-subsystem" at simplebus0 not configured apliic0 at simplebus0 iic0 at apliic0 tipd0 at iic0 addr 0x38 tipd1 at iic0 addr 0x3f apliic1 at simplebus0 iic1 at apliic1 tascodec0 at iic1 addr 0x31 apliic2 at simplebus0 iic2 at apliic2 tascodec1 at iic2 addr 0x34 "cirrus,cs42l83" at iic2 addr 0x48 not configured aplpwm0 at simplebus0 aplspi0 at simplebus0 aplspi1 at simplebus0 aplhidev0 at aplspi1 aplkbd0 at aplhidev0: 8 variable keys, 6 key codes wskbd0 at aplkbd0: console keyboard aplms0 at aplhidev0 wsmouse0 at aplms0 mux 0 exuart0 at simplebus0 exuart1 at simplebus0 apldma0 at simplebus0 aplmca0 at simplebus0 aplnco0 at simplebus0 aplspmi0 at simplebus0 aplpmu0 at aplspmi0 sid 0xf aplsmc0 at simplebus0 aplsart0 at simplebus0 aplns0 at simplebus0 nvme0 at aplns0: NVMe 1.1 nvme0: APPLE SSD AP0256Q, firmware 874.120., serial 0ba0127a0444b801 scsibus0 at nvme0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <NVMe, APPLE SSD AP0256, 874.> sd0: 239372MB, 4096 bytes/sector, 61279344 sectors xhci0 at simplebus0, xHCI 1.10 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1 "phy" at simplebus0 not configured xhci1 at simplebus0, xHCI 1.10 usb1 at xhci1: USB revision 3.0 uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1 "phy" at simplebus0 not configured aplpcie0 at simplebus0 pci0 at aplpcie0 ppb0 at pci0 dev 0 function 0 "Apple M1 PCIe" rev 0x01 pci1 at ppb0 bus 1 bwfm0 at pci1 dev 0 function 0 "Broadcom BCM4378" rev 0x03: msi vendor "Broadcom", unknown product 0x5f69 (class network subclass miscellaneous, rev 0x03) at pci1 dev 0 function 1 not configured pwmleds0 at mainbus0 gpiobl0 at mainbus0 aplaudio0 at mainbus0 audio0 at aplaudio0 simplefb0 at mainbus0: 2560x1600, 32bpp wsdisplay0 at simplefb0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets sd1 at scsibus2 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> sd1: 178202MB, 4096 bytes/sector, 45619956 sectors root on sd1a (0e2905d7ddb77e4a.a) swap on sd1b dump on sd1b bwfm0: address 50:ed:3c:xx:xx:xx
