Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Cannot shutdown or reboot because of logind disconnection
Date: Sat, 17 Sep 2022 11:46:47
Message-Id: 6477084.4vTCxPXJkl@lenovo.localdomain
In Reply to: Re: [gentoo-user] Cannot shutdown or reboot because of logind disconnection by tastytea
1 On Saturday, 17 September 2022 12:11:56 BST tastytea wrote:
2 > On 2022-09-17 17:37+0800 johnstrass <johnstrass@×××.com> wrote:
3 > > At 2022-09-17 14:15:51, "Walter Dnes" <waltdnes@××××××××.org> wrote:
4 > > >On Sat, Sep 17, 2022 at 10:40:53AM +0800, johnstrass wrote
5 > > >
6 > > >> Compiling gcc uses alot of memory, sometimes only less then 10MB
7 > > >> left free ( I am doing this on a small yeeloong netbook with only
8 > > >> 1GB memory).
9 > > >>
10 > > > Ouch, I'm surprised it compiles at all. The Gentoo install
11 > > >
12 > > > handbook
13 > > >
14 > > >https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#MAKEOPTS
15 > > >has a dire warning about memory usage...
16 > >
17 > > Yep, I've got the gcc-12.2.0 natively compiled on this netbook using
18 > > gcc-11.3.0, after 5+ days + a crash + 5more days.
19 > >
20 > > I set up a large swap and I've also set up the ccache which may
21 > > speedup a little after the crash.
22 > >
23 > > >> Warning
24 > > >>
25 > > >> Using a large number of jobs can significantly impact memory
26 > > >> consumption. A good recommendation is to have at least 2 GiB of RAM
27 > > >> for every job specified (so, e.g. -j6 requires at least 12 GiB). To
28 > > >> avoid running out of memory, lower the number of jobs to fit the
29 > > >> available memory.
30 > > >>
31 > > > You simply don't have enough ram. You might reduce the pain and
32 > > >
33 > > > the
34 > > >
35 > > >swapping by trying something like the following in make.conf
36 > > >(assuming you haven't already done it)
37 > > >
38 > > >
39 > > >MAKEOPTS="-j1"
40 > >
41 > > I will try next time. Thanks.
42 > >
43 > > >> If this happens, what is the best way to reboot or shutdown?
44 > > >>
45 > > > Try ye olde {CTRL}{ALT}{DEL}
46 > >
47 > > I remember that I did try "CTRL+ALT+DEL" in such situations before,
48 > > and most times it did not work but for one or two times it worked
49 > > occasionally. I will try it again next time.
50 >
51 > You could also use “Magic SysRQ”s[1] to reboot the system forcefully
52 > but somewhat controlled. The traditional sequence is:
53 > r e i s u b (raising elephants is so utterly boring)[2]
54 >
55 > [1] <https://wiki.gentoo.org/wiki/Magic_SysRQ>
56 > [2]
57 > <https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html#what-are-the
58 > -command-keys>
59
60 Using MAKEOPTS="-j1" will help and a bigger swap will stop it crashing with
61 OOM, but a more sensible solution is to compile and build big packages like
62 gcc on a faster PC as binaries, then transfer and emerge on the slow PC with
63 --usepkg, or --usepkgonly options. More info:
64
65 https://wiki.gentoo.org/wiki/Binary_package_guide

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re:Re: [gentoo-user] Cannot shutdown or reboot because of logind disconnection johnstrass <johnstrass@×××.com>