Lzma error cannot allocate memory

When running apt-get -f it errors with: dpkg-deb (subprocess): decompressing archive member: lzma error: Cannot allocate memory

zaggynl

Posts: 7
Joined: Tue Oct 09, 2012 2:18 pm

Unable to apt-get — lzma error: Cannot allocate memory

When running apt-get -f it errors with: dpkg-deb (subprocess): decompressing archive member: lzma error: Cannot allocate memory

Attempt to fix depencies:

Code: Select all

     ~ $ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following extra packages will be installed:
      libkeyutils1
    The following NEW packages will be installed:
      libkeyutils1
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    246 not fully installed or removed.
    Need to get 0 B/7,754 B of archives.
    After this operation, 48.1 kB of additional disk space will be used.
    Do you want to continue [Y/n]?
    (Reading database ... 18033 files and directories currently installed.)
    Unpacking libkeyutils1:armhf (from .../libkeyutils1_1.5.5-3_armhf.deb) ...
    dpkg-deb (subprocess): decompressing archive member: lzma error: Cannot allocate memory
    dpkg-deb: error: subprocess <decompress> returned error exit status 2
    dpkg: error processing /var/cache/apt/archives/libkeyutils1_1.5.5-3_armhf.deb (--unpack):
     subprocess dpkg-deb --fsys-tarfile returned error exit status 2
    Errors were encountered while processing:
     /var/cache/apt/archives/libkeyutils1_1.5.5-3_armhf.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

Output of df -h:

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
rootfs           15G  9.1G  4.8G  66% /
/dev/root        15G  9.1G  4.8G  66% /
devtmpfs         88M     0   88M   0% /dev
tmpfs            19M  612K   18M   4% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            37M     0   37M   0% /run/shm
/dev/mmcblk0p1   56M  9.5M   47M  17% /boot

Output of free -h:

Code: Select all

             total       used       free     shared    buffers     cached
Mem:          183M        86M        97M         0B       5.6M        48M
-/+ buffers/cache:        32M       151M
Swap:           0B         0B         0B

Is my SD card defective?


drgeoff

Posts: 13398
Joined: Wed Jan 25, 2012 6:39 pm

Re: Unable to apt-get — lzma error: Cannot allocate memory

Mon Jul 21, 2014 12:32 pm

Is it SD card memory or RAM is it unable to allocate?

Or have you got SD card corruption such that lzma, or something it is calling, is corrupted and trying to do silly things.

Quis custodiet ipsos custodes?


zaggynl

Posts: 7
Joined: Tue Oct 09, 2012 2:18 pm

Re: Unable to apt-get — lzma error: Cannot allocate memory

Mon Jul 21, 2014 1:17 pm

drgeoff wrote:Is it SD card memory or RAM is it unable to allocate?

Or have you got SD card corruption such that lzma, or something it is calling, is corrupted and trying to do silly things.

I don’t know D:

I’ll have to rule out I guess by trying out a different card.


User avatar

ilguargua

Posts: 73
Joined: Thu Jun 19, 2014 8:14 pm
Location: Livorno — Italy

Re: Unable to apt-get — lzma error: Cannot allocate memory

Mon Jul 21, 2014 6:06 pm

I would try to add some swap space, like described here.
If is working, you can consider adding a swap partitions for the future.

Cheers,

Ale.


zaggynl

Posts: 7
Joined: Tue Oct 09, 2012 2:18 pm

Re: Unable to apt-get — lzma error: Cannot allocate memory

Tue Jul 22, 2014 5:00 pm

ilguargua wrote:I would try to add some swap space, like described here.
If is working, you can consider adding a swap partitions for the future.

Cheers,

Ale.

Thanks, after creating/enabling swap apt-get -f install went through, next up, getting openssh-server to reconfigure.
dpkg-reconfigure thinks openssh-server is not installed, time to..reinstall it?


Return to “Troubleshooting”

Содержание

  1. Arch Linux
  2. #1 2012-02-27 14:16:21
  3. 18h of kernel compilation for nothing
  4. #2 2012-02-27 14:48:55
  5. Re: 18h of kernel compilation for nothing
  6. #3 2012-02-27 14:56:43
  7. Re: 18h of kernel compilation for nothing
  8. #4 2012-02-27 15:05:48
  9. Re: 18h of kernel compilation for nothing
  10. #5 2012-02-27 15:44:44
  11. Re: 18h of kernel compilation for nothing
  12. #6 2012-02-27 16:12:29
  13. Re: 18h of kernel compilation for nothing
  14. #7 2012-02-27 16:35:41
  15. Re: 18h of kernel compilation for nothing
  16. #8 2012-02-28 00:14:05
  17. Re: 18h of kernel compilation for nothing
  18. #9 2012-02-28 03:33:50
  19. Re: 18h of kernel compilation for nothing
  20. #10 2012-02-28 03:49:19
  21. Re: 18h of kernel compilation for nothing
  22. #11 2012-02-28 08:14:22
  23. Re: 18h of kernel compilation for nothing
  24. #12 2012-02-28 12:07:32
  25. Re: 18h of kernel compilation for nothing
  26. #13 2012-02-28 13:01:51
  27. Re: 18h of kernel compilation for nothing
  28. #14 2012-02-28 17:18:36
  29. Re: 18h of kernel compilation for nothing
  30. #15 2012-02-28 19:04:43
  31. Re: 18h of kernel compilation for nothing
  32. unixforum.org
  33. Решено: Нехватка памяти на сервере. (Нужно определить что занимает память.)
  34. Решено: Нехватка памяти на сервере.
  35. Re: Решено: Нехватка памяти на сервере.
  36. Re: Решено: Нехватка памяти на сервере.
  37. Re: Решено: Нехватка памяти на сервере.
  38. Re: Решено: Нехватка памяти на сервере.
  39. Re: Решено: Нехватка памяти на сервере.
  40. Re: Решено: Нехватка памяти на сервере.
  41. Re: Решено: Нехватка памяти на сервере.

Arch Linux

You are not logged in.

#1 2012-02-27 14:16:21

18h of kernel compilation for nothing

Just when it was about to finish, I got:

Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#2 2012-02-27 14:48:55

Re: 18h of kernel compilation for nothing

It seems there’s some mess with character encoding in your sources.

:: Registered Linux User No. 223384

#3 2012-02-27 14:56:43

Re: 18h of kernel compilation for nothing

Try building it outside of /tmp as it seems yaourt (or anything like that) did.

It seems there’s some mess with character encoding in your sources.

You should at least pay attention, that was a WARNING

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I’m serious here, it’s not an April 1st joke.

#4 2012-02-27 15:05:48

Re: 18h of kernel compilation for nothing

A kernel compile can’t take 18h unless something is *seriously* screwed up. However, I can’t help but LOL that the compile went through, but then there was not enough ram to compress the final image

ethail may be on to something, if you’re using tmpfs for /tmp and yaourt does compilations there, this totally won’t work for large compilations. On the other hand, a kernel compile is not that large, compared to the actual monsters like browsers or libreoffice.

#5 2012-02-27 15:44:44

Re: 18h of kernel compilation for nothing

You should at least pay attention, that was a WARNING

I did: I didn’t mention the WARNING regarding the unused variable, but the escape characters that reminded me of some encoding issues the OP has recently had.

:: Registered Linux User No. 223384

#6 2012-02-27 16:12:29

Re: 18h of kernel compilation for nothing

A kernel compile can’t take 18h unless something is *seriously* screwed up. However, I can’t help but LOL that the compile went through, but then there was not enough ram to compress the final image

I guess it can on a Pentium II 400Mhz with 394MB RAM.

So was it because of RAM?

Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#7 2012-02-27 16:35:41

Re: 18h of kernel compilation for nothing

I guess it can on a Pentium II 400Mhz with 394MB RAM.

Not even there can I imagine 18h. A few hours tops, but that’s far from 18h.

So was it because of RAM?

It’s because you compile *everything* in ram. The whole source tree gets copied into ram (for the kernel, that’s 510MB already), then all the intermediary files (which would otherwise be written to disk) pile up in ram as well, so in the end there’s not much ram anymore for the actual compilation to happen.

If your /tmp is a tmpfs, don’t do compilations there. Or at least not the big compilations, smaller stuff shouldn’t be a problem.

Last edited by Gusar (2012-02-27 16:39:59)

#8 2012-02-28 00:14:05

Re: 18h of kernel compilation for nothing

Or just don’t use yaourt or other helpers which default to sending stuff to ram or tmp.

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

#9 2012-02-28 03:33:50

Re: 18h of kernel compilation for nothing

IIRC it took a couple hours on my previous 1.6 GHz Pentium-M with 1GB RAM, so 18 hours on a 400 MHz P-II with 400 MB RAM doesn’t sound impossible at all to me. It must have been swapping.

Maybe there’s a way to add a «make localmodconfig» into linux-pf’s PKGBUILD, it could help a lot with compilation time.
I guess there’s also an option to compress the kernel with gzip instead of lzma, like CONFIG_KERNEL_GZIP or something.

Also if not already done, you probably want to change PKGEXT in /etc/makepkg.conf to:

#10 2012-02-28 03:49:19

Re: 18h of kernel compilation for nothing

IIRC it took a couple hours on my previous 1.6 GHz Pentium-M with 1GB RAM

No way. On my Pentium-M 1.73GHz, a fairly generic kernel takes about 22 minutes. The Arch kernel, which has everything including the kitchen sink in it, would take a few minutes more tops.

But wait a minute. Lockheed, are you saying you were actually compiling on an actual Pentium II? Can I have it?

#11 2012-02-28 08:14:22

Re: 18h of kernel compilation for nothing

IIRC it took a couple hours on my previous 1.6 GHz Pentium-M with 1GB RAM

No way. On my Pentium-M 1.73GHz, a fairly generic kernel takes about 22 minutes. The Arch kernel, which has everything including the kitchen sink in it, would take a few minutes more tops.

No way. On my Core 2 Duo 2.1Ghz and 4GB RAM Arch kernel compiles in 40-60 minutes (can’t say for sure).

But wait a minute. Lockheed, are you saying you were actually compiling on an actual Pentium II? Can I have it?

No. It’s mine. It’s awesome and you can’t have it Seriously, I have an old lightweight LXbuntu 9.04 on it and it works like a charm.

I have a Pentium 133, too, unfortunately the mobo must be cracked somewhere as it rarely starts. What a pity.

Last edited by Lockheed (2012-02-28 08:14:38)

Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#12 2012-02-28 12:07:32

Re: 18h of kernel compilation for nothing

Just when it was about to finish, I got:

As has been pointed out, you are simply out of memory. You can work around this in several ways:

* don’t use lzma as it uses a lot of memory to compress, you will probably be better off with gzip anyway
* add some more swap, even if just a swapfile for the sake of allowing the compile to finish
* don’t do the compile on /tmp

In principle a compile on tmpfs backed by swap should be faster than a compile on a regular block device, but I have never tried to measure the difference, so it would be interesting to know 🙂 The reason being that a tmpfs would only write to disk if it runs out of memory, but a regular fs would write to disk all the time.

Good news is that (unless whatever helper you used is stupid and overwrites everything, which, come to think of it, it probably does) you should be able to reuse all of the compiled files so a recompile should be quick.

#13 2012-02-28 13:01:51

Re: 18h of kernel compilation for nothing

No way. On my Core 2 Duo 2.1Ghz and 4GB RAM Arch kernel compiles in 40-60 minutes (can’t say for sure).

Wtf, not possible. Really. On the weekend I’ll be at the Pentium-M again, I’ll go compile a kernel using the Arch config file. I can’t imagine it taking more than half an hour.

No. It’s mine. It’s awesome and you can’t have it Seriously, I have an old lightweight LXbuntu 9.04 on it and it works like a charm.

Whoa!
Though, of course it works like a charm, with 384MB you have plenty of ram. Should be enough even for a kernel compile. Just don’t compile in a tmpfs. And, like tomegun says, maybe switch from lzma to gzip compression. And a machine-specific config would also cut down on the compile time a lot.

I have a Pentium 133, too, unfortunately the mobo must be cracked somewhere as it rarely starts. What a pity.

My condolences
We had the habit of always giving away the old computer when we bought a new one. Sometimes I regret it. One of the masterpieces was a Pentium MMX 166Mhz with, get this, 3dfx Voodoo graphics. Yeah, the legendary accelerator. Oh how I wish I still had that. The oldest machine that’s still at home is an AMD Duron 800Mhz, with I think a Geforce FX 5200.

Edit: Holy eff, I compiled a kernel with an Arch config on a Core i3-530. It took 24 minutes!! My fairly generic kernel takes 4:30 minutes, a machine-specific one takes 2:30 minutes. Man, the Arch kernel really does have everything including the kitchen sink in it. So I can now see it taking 60 minutes on a Core2Duo.

Compiling all that stuff on a slow machine makes no sense, so Lockheed I really suggest you make a machine-specific config. You’ll get the kernel compiled in like 1/10 of the time.

Last edited by Gusar (2012-02-28 14:42:31)

#14 2012-02-28 17:18:36

Re: 18h of kernel compilation for nothing

Really, don’t compile the kernel in a tmpfs mount.
The kernel is something you might want to keep anyway. I have all my «system» realted packages in

/pkg/sys (drivers and kernel).
Makes it easy to remember that anything in

/pkg/sys goes hand in hand, has to be upgraded together, and no reboots must happen unless everything’s done. (Especially if you use things like AUFS. )

Not only will it then finally work, it will also be much much faster, since you won’t end up with a full tmpfs all the time.

And in reply to all the posts about how long it takes to compile a kernel:
Anywhere from a few minutes to a few hours, depending on your configuration. If you have a configuration made specifically for your hardware, ie: only *one* network driver, sata driver etc. etc. then it will take minutes.
If you just use the standard config it’ll take much much longer since its config is supposed to build modules for every kind of supported hardware.
Personally, I keep seperate configs for every machine. A little more work to maintain, but worth the effort. Also: you tend to get to know your system better, and what kind of drivers you need.

You know you’re paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.

#15 2012-02-28 19:04:43

Re: 18h of kernel compilation for nothing

The problem is I cannot tell yaourt to place the compilation in any other place, and I also can’t make it to use localconfigmod (?) parameter.

Personally, I keep seperate configs for every machine. A little more work to maintain, but worth the effort. Also: you tend to get to know your system better, and what kind of drivers you need.

Apart from shorter compilation and marginally less memory occupied by kernel, what other benefits are there?

Last edited by Lockheed (2012-02-28 19:05:43)

Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Источник

unixforum.org

Форум для пользователей UNIX-подобных систем

  • Темы без ответов
  • Активные темы
  • Поиск
  • Статус форума

Решено: Нехватка памяти на сервере. (Нужно определить что занимает память.)

Модератор: SLEDopit

Решено: Нехватка памяти на сервере.

Сообщение Alex2ndr » 28.09.2010 17:12

Всем доброго времени суток!

Есть некий сервер на VPS. Стоит на нем CentOS release 5.4. Поднят Apache и на нем некий сайт на joomla и форум — phpbb3. Неожиданно, при заходе на форум, посыпались ошибки вида:

Т е видно что памяти не хватает не только Апачу, но и иным приложениям.( в отдельные моменты среди таких ошибок проскакивало даже sshd)
На сервере установлено 768Мб.

Собственно вопрос — как определить что именно пожирает память. Догадываюсь, что Apache, но как узнать на чем он ее так кушает и как бы его аппетит ограничить. Пожалуйста, не предлагайте сидеть с top и наблюдать — такая ситуация случается не очень часто(но периодично).

Всем спасибо за внимание!

Re: Решено: Нехватка памяти на сервере.

Сообщение neol » 28.09.2010 17:31

Во-первых, если есть неиспользуемые модули Apache/PHP — отключайте.
Потом можно уменьшить MaxClients, MinSpareServers, MaxSpareServers. От излишнего потребления памяти это должно помочь, но от проблем с заходом в пиковые часы окончательно может и не избавить.
Вообще конфиг apache было бы неплохо посмотреть.

Ну и nginx можно поставить перед apache, если религия позволяет.

Re: Решено: Нехватка памяти на сервере.

Сообщение KiWi » 28.09.2010 19:10

Re: Решено: Нехватка памяти на сервере.

Сообщение rm_ » 28.09.2010 19:25

inno_db в MySQL выключить — минус 100 мегабайт использования оперативки.
Если ничего из софта её не требует.

А вообще — заменить Apache на lighttpd, и тогда никакой nginx не нужен.
Ну или просто заменить на nginx, говорят он не только обратным прокси работать умеет.

Re: Решено: Нехватка памяти на сервере.

Сообщение Alex2ndr » 28.09.2010 21:59

Re: Решено: Нехватка памяти на сервере.

Сообщение Creature » 28.09.2010 22:41

Re: Решено: Нехватка памяти на сервере.

Сообщение Sora » 28.09.2010 22:59

Re: Решено: Нехватка памяти на сервере.

Сообщение Alex2ndr » 28.09.2010 23:02

Если бы это был физический сервер, то проблемм бы не было. Но это же VPS. И конечно на нем нету Х.

Возник еще один вопрос. С серваком работают люди, которые не очень разбираются в консоли и конфигах. Вся настройка сайтов и прочего осуществляется через панель управления этим серваком — directadmin (а-ля webmin). Она там как-то автоматизированно добавляет в конфиг апача нужные сайты. Поэтому хотелось бы знать — а с использованием «фронтэнд-бэкэнд» эту автоматизацию возможно сохранить? Т е сделать однократные настройки Nginx/Apache и дальше работать как работали(т е дальнейшее добавление сайтов через конфига апача из админки). Что точно эта система добавляет в конфиги я не знаю.

Источник


update-initramfs: deferring update (trigger activated) / lzma: Cannot allocate memory

This bug affects 3 people

Affects Status Importance Assigned to Milestone


initramfs-tools (Ubuntu)

Invalid

Undecided


Unassigned

Bug Description

I am using Ubuntu from a pen drive, without being installed in the computer

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: fglrx 2:8.723.1-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
Date: Mon May 24 16:51:49 2010
DkmsStatus:

ErrorMessage: subprocess installed post-installation script returned error exit status 1
LiveMediaBuild: Ubuntu 10.04 LTS «Lucid Lynx» — Release i386 (20100429)
MachineType: Sony Corporation VGN-FW31J
ProcCmdLine: BOOT_IMAGE=/casper/vmlinuz noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/hostname.seed boot=casper initrd=/casper/initrd.lz quiet splash — maybe-ubiquity
SourcePackage: fglrx-installer
Title: package fglrx 2:8.723.1-0ubuntu3 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
dmi.bios.date: 11/07/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: R2050Y0
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrR2050Y0:bd11/07/2008:svnSonyCorporation:pnVGN-FW31J:pvrC6014UPW:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: VGN-FW31J
dmi.product.version: C6014UPW
dmi.sys.vendor: Sony Corporation
glxinfo: Error: [Errno 2] No existe el fichero ó directorio
system:
 distro: Ubuntu
 codename: lucid
 architecture: i686
 kernel: 2.6.32-21-generic

На неслабом, в общем то сервере на любую команду выдается

-bash: fork: Cannot allocate memory

в редкий момент просветления получил top

top - 17:52:36 up 50 days,  6:13,  1 user,  load average: 1.01, 1.13, 1.03
Tasks: 1868 total,   2 running, 1866 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us, 33.9 sy,  0.0 ni, 64.4 id,  0.8 wa,  0.0 hi,  0.0 si,  0.2 st
KiB Mem :  2052332 total,    59784 free,  1930936 used,    61612 buff/cache
KiB Swap:        0 total,        0 free,        0 used.    12570 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
   37 root      20   0       0      0      0 R  52.4  0.0 126:43.98 kswapd0
 5553 mysql     20   0  691788 147584      0 S   6.9  7.2  31:10.36 mysqld
15691 root      20   0   48052   3160    556 R   4.4  0.2   0:00.43 top
  455 root      20   0  572420  16564      0 S   1.6  0.8  55:10.43 containerd
26602 root      20   0  298640  15884      0 S   1.6  0.8   6:07.22 php
 5456 root      20   0  725056  18412      0 S   1.3  0.9   7:01.30 core
  736 root      20   0  417512 141040      0 S   0.9  6.9 233:22.80 fail2ban-s+
 5667 root      20   0 1363264 113900      0 S   0.9  5.5  26:30.04 core
    7 root      20   0       0      0      0 S   0.3  0.0  31:45.10 rcu_sched
  142 root      20   0       0      0      0 S   0.3  0.0   3:11.06 jbd2/vda5-8
  854 ntp       20   0  102104    584      0 S   0.3  0.0   4:06.90 ntpd
15602 root      20   0       0      0      0 S   0.3  0.0   0:00.10 kworker/u4+
    1 root      20   0  270292  67236      0 S   0.0  3.3   1:17.53 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.36 kthreadd
    3 root      20   0       0      0      0 S   0.0  0.0   2:17.78 ksoftirqd/0
    5 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:+
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh

лично мне непонятно — свапа в системе вроде как нет, но половину CPU съедает процесс kswapd0.

Еще очень много sleeping tasks. Я подозреваю, что они возникли так:
На сревере крутится php процесс, который хотелось бы иметь постоянно работающим. Там стоит set_time_limit(0); Но, понятно, что это не гарантирует от разных форсмажоров. Потому, этот процесс запускается кроном каждую минуту и первым делом смотрит — есть ли дубль в ps axu. Если есть — то прекращает работу. Вероятно, в какой-то момент система оказалась сильно загруженной и процесс хоть и запустился, но не смог даже проверить на дубль. Через 1 минуту это повторилось ну и так далее.

Значит, у меня 2 вопроса.

1. Поможет ли в описанной ситуации создание свап файла? Или он таки уже есть?
2. Как организовать чтоб нужный php скрипт гарантировано выполнялся, а в случае краха — перезапускался?

Спасибо.

#1 2012-02-27 14:16:21

Lockheed
Member
Registered: 2010-03-16
Posts: 1,475

18h of kernel compilation for nothing

Just when it was about to finish, I got:

 VOFFSET arch/x86/boot/voffset.h
  LDS     arch/x86/boot/compressed/vmlinux.lds
  AS      arch/x86/boot/compressed/head_32.o
  CC      arch/x86/boot/compressed/misc.o
  CC      arch/x86/boot/compressed/string.o
  CC      arch/x86/boot/compressed/cmdline.o
  CC      arch/x86/boot/compressed/early_serial_console.o
  OBJCOPY arch/x86/boot/compressed/vmlinux.bin
  HOSTCC  arch/x86/boot/compressed/relocs
arch/x86/boot/compressed/relocs.c: In function u2018print_absolute_symbolsu2019:
arch/x86/boot/compressed/relocs.c:405:14: warning: variable u2018sh_symtabu2019 set but not used [-Wunused-but-set-variable]
  RELOCS  arch/x86/boot/compressed/vmlinux.relocs
  LZMA    arch/x86/boot/compressed/vmlinux.bin.lzma
lzma: (stdin): Cannot allocate memory
make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lzma] Error 1
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build linux-pf.
==> Restart building linux-pf ? [y/N]
==> ---------------------------------
==> 

Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#2 2012-02-27 14:48:55

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: 18h of kernel compilation for nothing

u2018print_absolute_symbolsu2019

It seems there’s some mess with character encoding in your sources…


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

#3 2012-02-27 14:56:43

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: 18h of kernel compilation for nothing

Try building it outside of /tmp as it seems yaourt (or anything like that) did.

bohoomil wrote:

It seems there’s some mess with character encoding in your sources…

You should at least pay attention, that was a WARNING


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I’m serious here, it’s not an April 1st joke.

#4 2012-02-27 15:05:48

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: 18h of kernel compilation for nothing

A kernel compile can’t take 18h unless something is *seriously* screwed up. However, I can’t help but LOL that the compile went through, but then there was not enough ram to compress the final image smile

ethail may be on to something, if you’re using tmpfs for /tmp and yaourt does compilations there, this totally won’t work for large compilations. On the other hand, a kernel compile is not that large, compared to the actual monsters like browsers or libreoffice.

#5 2012-02-27 15:44:44

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: 18h of kernel compilation for nothing

ethail wrote:

You should at least pay attention, that was a WARNING

I did: I didn’t mention the WARNING regarding the unused variable, but the escape characters that reminded me of some encoding issues the OP has recently had.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

#6 2012-02-27 16:12:29

Lockheed
Member
Registered: 2010-03-16
Posts: 1,475

Re: 18h of kernel compilation for nothing

Gusar wrote:

A kernel compile can’t take 18h unless something is *seriously* screwed up. However, I can’t help but LOL that the compile went through, but then there was not enough ram to compress the final image smile

I guess it can on a Pentium II 400Mhz with 394MB RAM.

So was it because of RAM?


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#7 2012-02-27 16:35:41

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: 18h of kernel compilation for nothing

Lockheed wrote:

I guess it can on a Pentium II 400Mhz with 394MB RAM.

Not even there can I imagine 18h. A few hours tops, but that’s far from 18h.

Lockheed wrote:

So was it because of RAM?

It’s because you compile *everything* in ram. The whole source tree gets copied into ram (for the kernel, that’s 510MB already), then all the intermediary files (which would otherwise be written to disk) pile up in ram as well, so in the end there’s not much ram anymore for the actual compilation to happen.

If your /tmp is a tmpfs, don’t do compilations there. Or at least not the big compilations, smaller stuff shouldn’t be a problem.

Last edited by Gusar (2012-02-27 16:39:59)

#8 2012-02-28 00:14:05

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,342

Re: 18h of kernel compilation for nothing

Or just don’t use yaourt or other helpers which default to sending stuff to ram or tmp.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

#9 2012-02-28 03:33:50

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: 18h of kernel compilation for nothing

IIRC it took a couple hours on my previous 1.6 GHz Pentium-M with 1GB RAM, so 18 hours on a 400 MHz P-II with 400 MB RAM doesn’t sound impossible at all to me. It must have been swapping…

Maybe there’s a way to add a «make localmodconfig» into linux-pf’s PKGBUILD, it could help a lot with compilation time.
I guess there’s also an option to compress the kernel with gzip instead of lzma, like CONFIG_KERNEL_GZIP or something.

Also if not already done, you probably want to change PKGEXT in /etc/makepkg.conf to:

#10 2012-02-28 03:49:19

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: 18h of kernel compilation for nothing

stqn wrote:

IIRC it took a couple hours on my previous 1.6 GHz Pentium-M with 1GB RAM

No way. On my Pentium-M 1.73GHz, a fairly generic kernel takes about 22 minutes. The Arch kernel, which has everything including the kitchen sink in it, would take a few minutes more tops.

But wait a minute… Lockheed, are you saying you were actually compiling on an actual Pentium II? Can I have it? smile

#11 2012-02-28 08:14:22

Lockheed
Member
Registered: 2010-03-16
Posts: 1,475

Re: 18h of kernel compilation for nothing

Gusar wrote:

stqn wrote:

IIRC it took a couple hours on my previous 1.6 GHz Pentium-M with 1GB RAM

No way. On my Pentium-M 1.73GHz, a fairly generic kernel takes about 22 minutes. The Arch kernel, which has everything including the kitchen sink in it, would take a few minutes more tops.

No way. On my Core 2 Duo 2.1Ghz and 4GB RAM Arch kernel compiles in 40-60 minutes (can’t say for sure).

Gusar wrote:

But wait a minute… Lockheed, are you saying you were actually compiling on an actual Pentium II? Can I have it? smile

No. It’s mine. It’s awesome and you can’t have it smile Seriously, I have an old lightweight LXbuntu 9.04 on it and it works like a charm.

I have a Pentium 133, too, unfortunately the mobo must be cracked somewhere as it rarely starts. What a pity.

Last edited by Lockheed (2012-02-28 08:14:38)


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#12 2012-02-28 12:07:32

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: 18h of kernel compilation for nothing

Lockheed wrote:

Just when it was about to finish, I got:

  LZMA    arch/x86/boot/compressed/vmlinux.bin.lzma
lzma: (stdin): Cannot allocate memory
make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lzma] Error 1
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build linux-pf.
==> Restart building linux-pf ? [y/N]
==> ---------------------------------
==> 

As has been pointed out, you are simply out of memory. You can work around this in several ways:

* don’t use lzma as it uses a lot of memory to compress, you will probably be better off with gzip anyway
* add some more swap, even if just a swapfile for the sake of allowing the compile to finish
* don’t do the compile on /tmp

In principle a compile on tmpfs backed by swap should be faster than a compile on a regular block device, but I have never tried to measure the difference, so it would be interesting to know :-) The reason being that a tmpfs would only write to disk if it runs out of memory, but a regular fs would write to disk all the time.

Good news is that (unless whatever helper you used is stupid and overwrites everything, which, come to think of it, it probably does) you should be able to reuse all of the compiled files so a recompile should be quick.

#13 2012-02-28 13:01:51

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: 18h of kernel compilation for nothing

Lockheed wrote:

No way. On my Core 2 Duo 2.1Ghz and 4GB RAM Arch kernel compiles in 40-60 minutes (can’t say for sure).

Wtf, not possible. Really. On the weekend I’ll be at the Pentium-M again, I’ll go compile a kernel using the Arch config file. I can’t imagine it taking more than half an hour.

Lockheed wrote:

No. It’s mine. It’s awesome and you can’t have it smile Seriously, I have an old lightweight LXbuntu 9.04 on it and it works like a charm.

Whoa!
Though, of course it works like a charm, with 384MB you have plenty of ram. Should be enough even for a kernel compile. Just don’t compile in a tmpfs. And, like tomegun says, maybe switch from lzma to gzip compression. And a machine-specific config would also cut down on the compile time a lot.

Lockheed wrote:

I have a Pentium 133, too, unfortunately the mobo must be cracked somewhere as it rarely starts. What a pity.

My condolences smile
We had the habit of always giving away the old computer when we bought a new one. Sometimes I regret it. One of the masterpieces was a Pentium MMX 166Mhz with, get this, 3dfx Voodoo graphics. Yeah, the legendary accelerator. Oh how I wish I still had that. The oldest machine that’s still at home is an AMD Duron 800Mhz, with I think a Geforce FX 5200.

Edit: Holy eff, I compiled a kernel with an Arch config on a Core i3-530. It took 24 minutes!! My fairly generic kernel takes 4:30 minutes, a machine-specific one takes 2:30 minutes. Man, the Arch kernel really does have everything including the kitchen sink in it. So I can now see it taking 60 minutes on a Core2Duo.

Compiling all that stuff on a slow machine makes no sense, so Lockheed I really suggest you make a machine-specific config. You’ll get the kernel compiled in like 1/10 of the time.

Last edited by Gusar (2012-02-28 14:42:31)

#14 2012-02-28 17:18:36

Blµb
Member
Registered: 2008-02-10
Posts: 224

Re: 18h of kernel compilation for nothing

Really, don’t compile the kernel in a tmpfs mount.
The kernel is something you might want to keep anyway. I have all my «system» realted packages in ~/pkg/sys (drivers and kernel).
Makes it easy to remember that anything in ~/pkg/sys goes hand in hand, has to be upgraded together, and no reboots must happen unless everything’s done. (Especially if you use things like AUFS…)

Not only will it then finally work, it will also be much much faster, since you won’t end up with a full tmpfs all the time.

And in reply to all the posts about how long it takes to compile a kernel:
Anywhere from a few minutes to a few hours, depending on your configuration. If you have a configuration made specifically for your hardware, ie: only *one* network driver, sata driver etc. etc. then it will take minutes.
If you just use the standard config it’ll take much much longer since its config is supposed to build modules for every kind of supported hardware.
Personally, I keep seperate configs for every machine. A little more work to maintain, but worth the effort. Also: you tend to get to know your system better, and what kind of drivers you need.


You know you’re paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.

#15 2012-02-28 19:04:43

Lockheed
Member
Registered: 2010-03-16
Posts: 1,475

Re: 18h of kernel compilation for nothing

The problem is I cannot tell yaourt to place the compilation in any other place, and I also can’t make it to use localconfigmod (?) parameter.

Personally, I keep seperate configs for every machine. A little more work to maintain, but worth the effort. Also: you tend to get to know your system better, and what kind of drivers you need.

Apart from shorter compilation and marginally less memory occupied by kernel, what other benefits are there?

Last edited by Lockheed (2012-02-28 19:05:43)


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#16 2012-02-28 19:24:17

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: 18h of kernel compilation for nothing

Lockheed wrote:

The problem is I cannot tell yaourt to place the compilation in any other place, and I also can’t make it to use localconfigmod (?) parameter.

The solution is very simple — don’t use yaourt. The kernel is very self-contained: you have the kernel image itself and maybe an initramfs which go to /boot, the modules go in /lib/modules/<kernel-version>/, and that’s that. You don’t really need a package manager to track that. You can still use package management though, just run the makepkg commands manually, after modifying the PKGBUILD to use your config. No yaourt necessary.

Lockheed wrote:

Apart from shorter compilation and marginally less memory occupied by kernel, what other benefits are there?

Marginally faster boot time maybe. But aren’t these enough? Especially on an older machine, the difference in compile time is very significant. We’re talking about a tenfold reduction in time here, that’s quite something. Also, you get to know the kernel a lot better, as well as you hardware.

#17 2012-02-28 21:23:54

Lockheed
Member
Registered: 2010-03-16
Posts: 1,475

Re: 18h of kernel compilation for nothing

Gusar wrote:

We had the habit of always giving away the old computer when we bought a new one. Sometimes I regret it. One of the masterpieces was a Pentium MMX 166Mhz with, get this, 3dfx Voodoo graphics. Yeah, the legendary accelerator. Oh how I wish I still had that.

ebay?
I always was more of a Riva guy wink


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

#18 2012-02-28 22:02:21

Blµb
Member
Registered: 2008-02-10
Posts: 224

Re: 18h of kernel compilation for nothing

Lockheed wrote:

The problem is I cannot tell yaourt to place the compilation in any other place, and I also can’t make it to use localconfigmod (?) parameter.

Personally, I keep seperate configs for every machine. A little more work to maintain, but worth the effort. Also: you tend to get to know your system better, and what kind of drivers you need.

Apart from shorter compilation and marginally less memory occupied by kernel, what other benefits are there?

Easier to mix in multiple additional patches for which you only find independent and seperate packages, like -ck, and easier to keep provides=(‘linux-selinux’) to use selinux, aufs, …
Faster to restore the alsa modules removed by oss (since I sometimes use OSS)…
Easier to use git snapshots and merge in additional branches…

Last edited by Blµb (2012-02-28 22:03:37)


You know you’re paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.

Понравилась статья? Поделить с друзьями:
  • Lync exe системная ошибка
  • Lxml python install error
  • Lxc error unable to fetch gpg key from keyserver
  • Lx470 ошибка c1732
  • Lx470 ошибка c1531