Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

emerge app-editors/zed hard lockup

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
robinelvin
n00b
n00b
Posts: 23
Joined: Thu Jul 03, 2025 9:03 am
Location: Warrington, UK

emerge app-editors/zed hard lockup

  • Quote

Post by robinelvin » Tue Dec 16, 2025 8:55 am

I have an issue with emerging app-editors/zed which I assume could be something to do with the Rust compiler.

First off, I am trying to use the latest "unstable" version but I expect that means at runtime not compile time.

I have managed to get it installed on one machine without any problem. Trying both the gentoo and robert7k package on my Intel i7 32Gb laptop results in a hard lockup of the machine after some time compiling with the fan at 100% and the screen blank. I have no experienced the same problem upgrading the installed package on a different machine (AMD Ryzen 64Gb)

My assumption is it's the Rust compiler but can anyone tell me how I can do a post-mortem on this so I can find out what the issue was?
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Dec 16, 2025 1:56 pm

How hard is the lockup? When it locks, does the fan remain at full speed, or drop to idle after a short period (indicating that the CPU has stopped producing significant new heat, allowing the fan to catch up)? Is the lockup reproducible with a simple CPU burning application?

My first guess would be that your compilation options allowed the build to run so many Rust compiler instances in parallel that you exhausted system resources, and the OOM killer picked something important, like your display server, to kill. Please post the output of emerge --info so that we can see projected parallelism. Also, are there any other Rust-heavy applications that you have successfully installed on the laptop through Portage? If yes, that would point to a more targeted issue.
Top
robinelvin
n00b
n00b
Posts: 23
Joined: Thu Jul 03, 2025 9:03 am
Location: Warrington, UK

  • Quote

Post by robinelvin » Tue Dec 16, 2025 5:30 pm

Hu wrote:How hard is the lockup? When it locks, does the fan remain at full speed, or drop to idle after a short period (indicating that the CPU has stopped producing significant new heat, allowing the fan to catch up)? Is the lockup reproducible with a simple CPU burning application?

My first guess would be that your compilation options allowed the build to run so many Rust compiler instances in parallel that you exhausted system resources, and the OOM killer picked something important, like your display server, to kill. Please post the output of emerge --info so that we can see projected parallelism. Also, are there any other Rust-heavy applications that you have successfully installed on the laptop through Portage? If yes, that would point to a more targeted issue.
Ok, first it is so locked up not even ping responds from another machine. I cannot switch to the text console. So this is on 2 different machines with different amounts of cores and therefore different parallelism. I'm guessing it has used up all available memory but I'd like to know how I can find out as I can only power cycle when they are in this state.

I have compiled a prior version of Zed on one machine but I can't compile any version I have tried on the other and nor can I upgrade the installed version now.

Code: Select all

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="     https://mirrors.gethosted.online/gentoo/     https://callisto.gb.ext.planetunix.net/pub/gentoo/     rsync://callisto.gb.ext.planetunix.net/gentoo/     https://www.mirrorservice.org/sites/distfiles.gentoo.org/     rsync://rsync.mirrorservice.org/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j16 -l17"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="bzip2"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS=" -C target-cpu=native"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi alsa amd64 avif branding bzip2 cairo calendar cdda cdr cet crypt cups dist-kernel dri dts dvd dvdr elogind emoji encode exif extra ffmpeg flac gdbm gif gimp grub gui iconv icu ipv6 jpeg jpegxl lcms libnotify libtirpc logrotate mad mng mp3 mp4 mpeg multilib ncurses nfs nfsv3 nls ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qml qt5 qt6 rdp readline rust-analyzer rust-src rustfmt samba sdl seccomp sound speex spell ssl startup-notification svg test-rust tiff tracepath truetype udev udisks unicode upower usb vnc vorbis vulkan webp wxwidgets x264 xattr xcb xfs xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_15" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 avx512_bf16 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl bmi1 bmi2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-3" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_13" RUBY_TARGETS="ruby32 ruby33" SANE_BACKENDS="net" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Top
netsplit
n00b
n00b
Posts: 24
Joined: Mon Jun 10, 2024 1:53 am

  • Quote

Post by netsplit » Tue Dec 16, 2025 6:49 pm

Do you have a swap file or partition enabled?

Have you tried setting MAKEOPTS to lower numbers?

Watching the top command during a lockup is how'd I'd check that. It's pretty useful. For example the header on the output looks like:

Code: Select all

top - 12:38:05 up 6 days,  4:45,  2 users,  load average: 2.86, 2.36, 2.44
Tasks: 544 total, 2 running, 542 sleep, 0 d-sleep, 0 stopped, 0 zombie
%Cpu(s):  1.6 us,  1.0 sy,  0.0 ni, 97.1 id,  0.1 wa,  0.2 hi,  0.1 si,  0.0 st 
MiB Mem :  31369.1 total,   8468.1 free,  11038.2 used,   9797.4 buff/cache     
MiB Swap:  65536.0 total,  65536.0 free,      0.0 used.  20330.9 avail Mem 
I'd personally use top or a similar command to make sure something isn't eating a bunch of memory, and if isn't, kill it. Then try temporarily setting MAKEOPTS="-j8 -l9" and see if it crashes. If it doesn't then you need more ram, or more swap, before you change MAKEOPTS back.
Top
robinelvin
n00b
n00b
Posts: 23
Joined: Thu Jul 03, 2025 9:03 am
Location: Warrington, UK

  • Quote

Post by robinelvin » Sat Dec 20, 2025 6:23 pm

Ran the ebuild again with btop running and it died with OOM and the machine was unresponsive again.
I lowered MAKEOPTS and tried compiling a few times until I was able to find the right amount for allowing the build to complete.

Following the guide at https://wiki.gentoo.org/wiki/Knowledge_ ... _of_memory I was able to make a custom config for the build whilst keeping the jobs at the optimum for the rest of portage.

Thanks @netsplit for the hint.
Top
Post Reply

5 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic