Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Computer restarts when compiling only when X server runing
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
razcakappa
n00b
n00b


Joined: 18 Sep 2021
Posts: 2

PostPosted: Sat Sep 18, 2021 3:17 am    Post subject: Computer restarts when compiling only when X server runing Reply with quote

Hi,

I just came across a strange problem. When I emerge something, it starts to compile fine, however middle of the way computer fans tends to run in fast and noisy and suddenly computer restarts. When I'm compiling without starting X, it runs (heavy load like compiling) for hours even overnights without failing.

I assume this might be a hardware issue like thermal. However before sending this off to repair, I would be relieved if I can find out the problem's relationship with the X here?
Anyway to debug this problem from the software level?



p.s: As a side note, hardware is Macbook PRO 15" 2015 (Retina) and When I'm using OSx with Adobe apps (I assume those are heavy on resource consumption) I'm not seeing such issue.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3339
Location: Rasi, Finland

PostPosted: Sat Sep 18, 2021 6:32 am    Post subject: Reply with quote

I suspect RAM.
You have more ram used when you have X open at the same time.
Do you have portage temp on tmpfs? If so, then try to temporarily move your portage temp outside of the tmpfs (or just unmount it). Then if your compilation goes ok with X open, it's most probably RAM issue.

Or course you could straight away just run some memtest. :P
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Sat Sep 18, 2021 11:41 am    Post subject: Reply with quote

razcakappa,

Welcome to Gentoo.

It could be a thermal issue too. It runs for hours without X. Running X and using it is not free. It needs both CPU and RAM.
Booting into memtest is a good start. You can run it in userspace (no top of the kernel) too but don't do that as its not nearly so useful.

A good CPU cooling stress test is Prime95. It works your CPU and cooling system really hard.

Don't go spending any money on fixes until you post results here.
memtest can show other problems ... not just RAM.

Redoing the CPU thermal paste and cleaning the cooling system is on the easy end of of PC fixes.
Being Apple, the hard bit is getting in.
As its six years old, finding a cooling system full of grot would not surprise me.

Do you have lm-sensors installed?
You can use that to keep an eye on temperatures while you do other things.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Sep 18, 2021 11:54 am    Post subject: Reply with quote

Does cpupower work on your machine?

You could use 'cpupower' to lower the maximum frequency. I regularly do that on notebooks. Many notebooks were designed to be thin and lightweight - not to compile source code for multiple hours.

Run
Code:
cpupower frequency-info

It will return the range of supported CPU frequencies:
Code:
...
current policy: frequency should be within 1.40 GHz and 2.80 GHz.
...

Then lower the maximum frequency
Code:
cpupower frequency-set --max 2000MHz

Emerge a large large package like gcc and try different values. Listen to the CPU fan. The higher the maximum frequency, the higher the CPU temperature and the louder the fan. Please note that the speed of the fan does not change immediately after you change the maximum frequency. It usually takes 20-60 seconds...
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Sun Sep 19, 2021 3:23 am    Post subject: Reply with quote

Lots of solutions without any diagnostics. It could just be your configuration. Post results of "emerge --info"
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Sep 19, 2021 1:51 pm    Post subject: Reply with quote

figueroa wrote:
Lots of solutions without any diagnostics. It could just be your configuration. Post results of "emerge --info"
Like too many parallel compilations. I was thinking that. Yes, please post emerge --info.
Back to top
View user's profile Send private message
MaDDeePee
Guru
Guru


Joined: 18 Aug 2004
Posts: 387
Location: Germany

PostPosted: Mon Sep 20, 2021 3:54 am    Post subject: Reply with quote

hello.

memtest86+ without error?
after this, run prime95 - any errors?

This sounds like a hardware problem to me.
Back to top
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1320

PostPosted: Mon Sep 20, 2021 10:51 pm    Post subject: Reply with quote

A faulty power supply can cause this.
_________________
Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual.
Back to top
View user's profile Send private message
razcakappa
n00b
n00b


Joined: 18 Sep 2021
Posts: 2

PostPosted: Tue Sep 21, 2021 4:53 pm    Post subject: Reply with quote

Wow I haven't expected this kind of exposure to this question. Great team Gentoo!

I just started to diagnose the system as you guys explained. I have a good news and a bad news.

First I've done a memtest86 and the results came clean. It took more than 5 hours to complete, however never experienced any crash or reboot (report https://imgur.com/a/YkutJuS).

However when I trying to run prime95, after I chose the stress test I need and when I give permission to start, system crash and reboots. And I can replicate the results all the time. Even without the the X. When I try
Code:
./mprime
it always reboots. So is it CPU related? Power?


As requested here's the
Code:
emerge --info


Quote:

Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33-r1, 5.10.52-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.10.52-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-4770HQ_CPU_@_2.20GHz-with-glibc2.33
KiB Mem: 16269036 total, 13458404 free
KiB Swap: 4197372 total, 4197372 free
Timestamp of repository gentoo: Wed, 25 Aug 2021 00:45:01 +0000
Head commit of repository gentoo: d23de40b600e4f4a5a809fd218e0d251b802d36a
sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p5) 2.36.1
app-shells/bash: 5.1_p8::gentoo
dev-java/java-config: 2.3.1::gentoo
dev-lang/perl: 5.34.0::gentoo
dev-lang/python: 2.7.18_p11::gentoo, 3.9.6_p1::gentoo
dev-lang/rust: 1.53.0::gentoo
dev-util/cmake: 3.20.5::gentoo
sys-apps/baselayout: 2.7::gentoo
sys-apps/openrc: 0.43.5::gentoo
sys-apps/sandbox: 2.24::gentoo
sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake: 1.16.3-r1::gentoo
sys-devel/binutils: 2.36.1-r2::gentoo
sys-devel/gcc: 10.3.0-r2::gentoo
sys-devel/gcc-config: 2.4::gentoo
sys-devel/libtool: 2.4.6-r6::gentoo
sys-devel/make: 4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc: 2.33-r1::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 24
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1

glarbs-overlay
location: /var/lib/layman/glarbs-overlay
masters: gentoo
priority: 50

zugaina
location: /var/lib/layman/zugaina
masters: gentoo
priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://download.nus.edu.sg/mirror/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
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"
USE="X acl amd64 bzip2 cli crypt dri elogind fortran gdbm iconv imlib ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache 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" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

[/quote]
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Tue Sep 21, 2021 5:24 pm    Post subject: Reply with quote

Laptops being harder to troubleshoot than a desktop machine, will this one run on AC power with the battery removed? I had similar symptoms with one Sony laptop. I'm thinking power, CPU, capacitors, most likely culprits.

To my eyes, your portage configuration looks rational. You could try reducing -j4 to -j1 in make.conf. If it makes any difference, it would be diagnostic.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Tue Sep 21, 2021 5:37 pm    Post subject: Reply with quote

razcakappa,

When prime98 causes the crash and reboot, how long does it take?

If you run it with the system just powered on from cold, does it take longer to crash and reboot that if you rerun it once its warmed up?
If yes, you have a cooling system problem. The longer first run from cold is accounted for by the thermal inertia of the CPU and heatsink.

If its not thermal then the power supply to the CPU is implicated.

Your MAKEOPTS="-j4" is a good number with 16GB RAM. Reducing it as figueroa suggests may avoid the problem by not working the CPU as hard as only one make job will run at a time.
Not all build system honour it though.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum