Bug 271377 - x11/alacritty: dumps core on 13.2 on ARM: missing dependencies
Summary: x11/alacritty: dumps core on 13.2 on ARM: missing dependencies
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Some People
Assignee: Charlie Li
URL:
Keywords: crash, needs-patch
Depends on:
Blocks:
 
Reported: 2023-05-12 09:54 UTC by Alexey Vyskubov
Modified: 2024-04-16 22:33 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Vyskubov 2023-05-12 09:54:38 UTC
Hello,

I have the following crash:

❯ RUST_BACKTRACE=full alacritty -vvv
Created log file at "/tmp/Alacritty-38560.log"
[0.000001520s] [INFO ] [alacritty] Welcome to Alacritty
[0.000159922s] [INFO ] [alacritty] Version 0.12.0
[0.000189802s] [INFO ] [alacritty] Running on X11
[0.000313283s] [INFO ] [alacritty_config_derive] No config file found; using default
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /wrkdirs/usr/ports/x11/alacritty/work/alacritty-0.12.0/cargo-crates/glutin-0.30.7/src/api/egl/display.rs:343:44
stack backtrace:
   0:     0x6667e77cbcd4 - <unknown>
   1:     0x6667e76d95ac - <unknown>
   2:     0x6667e77b51d0 - <unknown>
   3:     0x6667e77cbaec - <unknown>
   4:     0x6667e77b01d8 - <unknown>
   5:     0x6667e77b0bdc - <unknown>
   6:     0x6667e77cc000 - <unknown>
   7:     0x6667e77cbf98 - <unknown>
   8:     0x6667e77b05d0 - <unknown>
   9:     0x6667e76cffc8 - <unknown>
  10:     0x6667e76d008c - <unknown>
  11:     0x6667e76e9570 - <unknown>
  12:     0x6667e76e9054 - <unknown>
  13:     0x6667e7635a18 - <unknown>
  14:     0x6667e75d1f3c - <unknown>
  15:     0x6667e7631474 - <unknown>
  16:     0x6667e76606f4 - <unknown>
  17:     0x6667e7659f00 - <unknown>
  18:     0x6667e7593f24 - <unknown>
  19:     0x6667e7680de4 - <unknown>
Abort trap (core dumped)


❯ uname -mir
13.2-RELEASE arm64 GENERIC

If it matters, I am running over VNC (net/tigervnc-server). However, on amd64 machine (same version of FreeBSD, same VNC) it does not crash; cargo-installing alacritty instead of using the package leads to the same crash.

There is indeed .unwrap() call in the specified place in glutin source, but there is a chained call there (a_lot().of_stuff().unwrap()) and the code is beyond my knowledge of Rust. Isn't "unwrap()" considered to be a bad style?
Comment 1 Mina Galić freebsd_triage 2023-05-12 09:58:51 UTC
I suggest rebuilding with debug, and submitting the bug to upstream.

and, yes, just blindly unwrapping can lead to exactly what you're seeing
Comment 2 Alexey Vyskubov 2023-05-12 10:25:18 UTC
Upstream bug report: https://github.com/alacritty/alacritty/issues/6922
Comment 3 Alexey Vyskubov 2023-05-12 11:04:12 UTC
After all, it looks like FreeBSD bug -- missing dependencies.

Installing on arm64 packages graphics/mesa-libs and graphics/mesa-dri fixed the crash (it is totally headless virtual machine in Oracle cloud).
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2023-05-15 10:29:24 UTC
CC'ing jbeich

jbeich@, can you have a look at this pr? Thanks.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2023-05-15 12:26:22 UTC
x11/alacritty always underspecified runtime dependencies:
- mesa-* are only required by non-NVIDIA GPUs
- libXcursor and libXi aren't required under Wayland
- libxkbcommon isn't required under X11
- dejavu isn't required if any other "monospace" font is installed

AFAIU, these are left to a display server to provide. In VNC case GPU-assisted rendering is required or alacritty performance would be abysmal (llvmpipe is that slow). For example, wayvnc offloads rendering to Wayland compositor which pulls mesa-dri if using OpenGL or Vulkan but not if using software rendering via pixman (not llvmpipe).
Comment 6 Jan Beich freebsd_committer freebsd_triage 2023-05-15 12:36:07 UTC
net/tigervnc-server appears to embed x11-servers/xorg-server but unlike x11-server/xorg-server doesn't have graphics/mesa-dri in RUN_DEPENDS.
Comment 7 Jan Beich freebsd_committer freebsd_triage 2023-08-24 13:04:57 UTC
^Triage: reset Assignee after ports 5ecf7226b2eb.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2024-04-16 22:33:55 UTC
Over to the new maintainer after ports 73399cf9165d.