# (SOLVED!!!) System freezes with every emerge

## Kasumi_Ninja

My install was running fine until this weekend my computer frooze every time I emerged something. i figured I fubared my system and reinstalled Gentoo. I emerged Gnome and all was fine until suddenly my system frooze again during an emerge (and now it happens each time)  :Confused:   ( my system even freezed when I chroot from the live cd and emerge something).

SOLVED!!!

The problem was that I placed a symlink to /opt/thinkingrock in /usr/local/bin I named the executable conveniently the same as the original namely: 'tr'. I never realized that 'tr' was also a program used by portage   :Embarassed:   :Embarassed:   :Embarassed:  I discovered the culprit when 'top' suddenly flooded with the 'tr' process.

Update:

Since changing memory and hard drives didn't solve this I suspect this problem is somehow caused by (my (mis)configuration)  of Gentoo.

# tail /var/log/messages 

```
Jun  9 13:15:04 Zenpc Free swap:            0kB

Jun  9 13:15:04 Zenpc 524160 pages of RAM

Jun  9 13:15:04 Zenpc 294784 pages of HIGHMEM

Jun  9 13:15:04 Zenpc 5663 reserved pages

Jun  9 13:15:04 Zenpc 307705 pages shared

Jun  9 13:15:04 Zenpc 48 pages swap cached

Jun  9 13:15:04 Zenpc 130 pages dirty

Jun  9 13:15:04 Zenpc 0 pages writeback

Jun  9 13:15:04 Zenpc 63 pages mapped

Jun  9 13:15:04 Zenpc 26145 pages slab

Jun  9 13:15:04 Zenpc 24947 pages pagetables

Jun  9 13:15:04 Zenpc X invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0

Jun  9 13:15:04 Zenpc [<c014fa51>]  [<c0150f50>]  [<c0380725>]  [<c01524d8>]  [<c041165e>]  [<c0411870>]  [<c014cdb1>]  [<c014ef64>]  [<c0158320>]  [<c0396674>]  [<c0119d61>]  [<c01341a8>]  [<c0119b54>]  [<c0412c5a>]  [<c0410000>]  =======================

Jun  9 13:15:04 Zenpc Mem-info:

Jun  9 13:15:04 Zenpc DMA per-cpu:

Jun  9 13:15:04 Zenpc CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   0

Jun  9 13:15:04 Zenpc CPU    1: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   0

Jun  9 13:15:04 Zenpc Normal per-cpu:

Jun  9 13:15:04 Zenpc CPU    0: Hot: hi:  186, btch:  31 usd:  81   Cold: hi:   62, btch:  15 usd:  55

Jun  9 13:15:04 Zenpc CPU    1: Hot: hi:  186, btch:  31 usd:  27   Cold: hi:   62, btch:  15 usd:  14

Jun  9 13:15:04 Zenpc HighMem per-cpu:

Jun  9 13:15:04 Zenpc CPU    0: Hot: hi:  186, btch:  31 usd: 122   Cold: hi:   62, btch:  15 usd:   4

Jun  9 13:15:04 Zenpc CPU    1: Hot: hi:  186, btch:  31 usd:  23   Cold: hi:   62, btch:  15 usd:  14

Jun  9 13:15:04 Zenpc Active:214706 inactive:214363 dirty:130 writeback:0 unstable:0

Jun  9 13:15:04 Zenpc free:12214 slab:26145 mapped:63 pagetables:24947 bounce:0

Jun  9 13:15:04 Zenpc DMA free:8128kB min:68kB low:84kB high:100kB active:1756kB inactive:1264kB present:16256kB pages_scanned:9763 all_unreclaimable? yes

Jun  9 13:15:04 Zenpc lowmem_reserve[]: 0 873 2015

Jun  9 13:15:04 Zenpc Normal free:40284kB min:3744kB low:4680kB high:5616kB active:280616kB inactive:280384kB present:894080kB pages_scanned:953619 all_unreclaimable? yes

Jun  9 13:15:04 Zenpc lowmem_reserve[]: 0 0 9140

Jun  9 13:15:04 Zenpc HighMem free:444kB min:512kB low:1736kB high:2964kB active:576452kB inactive:575804kB present:1169924kB pages_scanned:1951625 all_unreclaimable? yes

Jun  9 13:15:04 Zenpc lowmem_reserve[]: 0 0 0

Jun  9 13:15:04 Zenpc DMA: 2*4kB 3*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 1*4096kB = 8128kB

Jun  9 13:15:04 Zenpc Normal: 6*4kB 6*8kB 6*16kB 0*32kB 0*64kB 3*128kB 5*256kB 1*512kB 1*1024kB 0*2048kB 9*4096kB = 40232kB

Jun  9 13:15:04 Zenpc HighMem: 1*4kB 1*8kB 3*16kB 1*32kB 0*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 348kB

Jun  9 13:15:04 Zenpc Swap cache: add 254791, delete 254743, find 1478/2409, race 0+0

Jun  9 13:15:04 Zenpc Free swap  = 0kB

Jun  9 13:15:04 Zenpc Total swap = 979924kB

Jun  9 13:15:04 Zenpc Free swap:            0kB

Jun  9 13:15:04 Zenpc 524160 pages of RAM

Jun  9 13:15:04 Zenpc 294784 pages of HIGHMEM

Jun  9 13:15:04 Zenpc 5663 reserved pages

Jun  9 13:15:04 Zenpc 307692 pages shared

Jun  9 13:15:04 Zenpc 48 pages swap cached

Jun  9 13:15:04 Zenpc 130 pages dirty

Jun  9 13:15:04 Zenpc 0 pages writeback

Jun  9 13:15:04 Zenpc 63 pages mapped

Jun  9 13:15:04 Zenpc 26145 pages slab

Jun  9 13:15:04 Zenpc 24947 pages pagetables

Jun  9 13:15:04 Zenpc syslog-ng invoked oom-killer: gfp_mask=0x200d2, order=0, oomkilladj=0

Jun  9 13:15:04 Zenpc [<c014fa51>]  [<c0150f50>]  [<c015e229>]  [<c015698c>]  [<c0158742>]  [<c0122556>]  [<c0119d61>]  [<c01675e2>]  [<c0119b54>]  [<c0412c5a>]  [<c0410000>]  =======================

]  [<c0158320>]  [<c0158f2d>]  [<c011946e>]  [<c0119d61>]  [<c0119b54>]  [<c0412c5a>]  [<c0410000>]  =======================

...

Jun  9 13:16:30 Zenpc Mem-info:

Jun  9 13:16:30 Zenpc DMA per-cpu:

Jun  9 13:16:30 Zenpc CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   0

Jun  9 13:16:30 Zenpc CPU    1: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   0

Jun  9 13:16:30 Zenpc Normal per-cpu:

Jun  9 13:16:30 Zenpc CPU    0: Hot: hi:  186, btch:  31 usd:  53   Cold: hi:   62, btch:  15 usd:  55

Jun  9 13:16:30 Zenpc CPU    1: Hot: hi:  186, btch:  31 usd:  28   Cold: hi:   62, btch:  15 usd:  51

Jun  9 13:16:30 Zenpc HighMem per-cpu:

Jun  9 13:16:30 Zenpc CPU    0: Hot: hi:  186, btch:  31 usd:  92   Cold: hi:   62, btch:  15 usd:  55

Jun  9 13:16:30 Zenpc CPU    1: Hot: hi:  186, btch:  31 usd:  57   Cold: hi:   62, btch:  15 usd:  61

Jun  9 13:16:30 Zenpc Active:218850 inactive:209518 dirty:130 writeback:0 unstable:0

Jun  9 13:16:30 Zenpc free:11981 slab:26257 mapped:37 pagetables:25285 bounce:0

Jun  9 13:16:30 Zenpc DMA free:8120kB min:68kB low:84kB high:100kB active:1584kB inactive:1444kB present:16256kB pages_scanned:4933 all_unreclaimable? yes

Jun  9 13:16:30 Zenpc lowmem_reserve[]: 0 873 2015

Jun  9 13:16:30 Zenpc Normal free:38852kB min:3744kB low:4680kB high:5616kB active:297840kB inactive:262148kB present:894080kB pages_scanned:919493 all_unreclaimable? yes

Jun  9 13:16:30 Zenpc lowmem_reserve[]: 0 0 9140

Jun  9 13:16:30 Zenpc HighMem free:952kB min:512kB low:1736kB high:2964kB active:575852kB inactive:574592kB present:1169924kB pages_scanned:2770351 all_unreclaimable? yes

Jun  9 13:16:30 Zenpc lowmem_reserve[]: 0 0 0

Jun  9 13:16:30 Zenpc DMA: 2*4kB 2*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 1*4096kB = 8120kB

Jun  9 13:16:30 Zenpc Normal: 179*4kB 19*8kB 4*16kB 1*32kB 2*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 9*4096kB = 38852kB

Jun  9 13:16:30 Zenpc HighMem: 132*4kB 9*8kB 0*16kB 1*32kB 1*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 952kB

Jun  9 13:16:30 Zenpc Swap cache: add 260498, delete 260498, find 2032/3411, race 0+0

Jun  9 13:16:30 Zenpc Free swap  = 0kB

Jun  9 13:16:30 Zenpc Total swap = 979924kB

Jun  9 13:16:30 Zenpc Free swap:            0kB

Jun  9 13:16:30 Zenpc 524160 pages of RAM

Jun  9 13:16:30 Zenpc 294784 pages of HIGHMEM

Jun  9 13:16:30 Zenpc 5640 reserved pages

Jun  9 13:16:30 Zenpc 313945 pages shared

Jun  9 13:16:30 Zenpc 0 pages swap cached

Jun  9 13:16:30 Zenpc 130 pages dirty

Jun  9 13:16:30 Zenpc 0 pages writeback

Jun  9 13:16:30 Zenpc 37 pages mapped

Jun  9 13:16:30 Zenpc 26257 pages slab

Jun  9 13:16:30 Zenpc 25285 pages pagetables

Jun  9 13:16:30 Zenpc Out of memory: kill process 8153 (gnome-session) score 22301 or a child

Jun  9 13:16:30 Zenpc Killed process 8191 (metacity)
```

----------

## massimo

Run memtest for checking your memory.

----------

## Kasumi_Ninja

 *massimo wrote:*   

> Run memtest for checking your memory.

 

Thanks for the help. Memtest is running and  found thusfar no errors ?!

```
Pass complete, no errors, press Esc to exit
```

----------

## Nerevar

You're out of swap. Perhaps your swap partition is bad?

```

Jun  9 13:16:30 Zenpc Free swap  = 0kB

Jun  9 13:16:30 Zenpc Total swap = 979924kB

Jun  9 13:16:30 Zenpc Free swap:            0kB

Jun  9 13:16:30 Zenpc Out of memory: kill process 8153 (gnome-session) score 22763 or a child

Jun  9 13:16:30 Zenpc Killed process 8172 (ssh-agent)

```

----------

## Kasumi_Ninja

 *DarrenSmith wrote:*   

> You're out of swap. Perhaps your swap partition is bad?
> 
> ```
> 
> Jun  9 13:16:30 Zenpc Free swap  = 0kB
> ...

 

I diabled my swap partition but the problem remains. I think it's strange in the first place that I run out of (1GB!) swap space with 2 GB memory   :Rolling Eyes: 

----------

## TheAldo

Hi,

I diabled my swap partition but the problem remains. I think it's strange in the first place that I run out of (1GB!) swap space with 2 GB memory   :Rolling Eyes: [/quote]

The system reserve swap space even it don't use it yet.

I had this same behavior recently and it was the memory card which was working great since 2 years.

Try to change it even your test say it's ok.

----------

## Kasumi_Ninja

 *TheAldo wrote:*   

> The system reserve swap space even it don't use it yet.
> 
> I had this same behavior recently and it was the memory card which was working great since 2 years.
> 
> Try to change it even your test say it's ok.

 

Thanks for the suggestion, I suspect, though that the problem isn't memory related. I did a fresh install and this problem didn't show yet.

----------

## Kasumi_Ninja

/var/log/messages shows this lines:

```
Jun  9 19:31:17 localhost smartd[11741]: Device: /dev/sda, 1 Offline uncorrectab

le sectors
```

If I am reading this correctly it looks like my hard disk is broken.

----------

## Nerevar

You might want to take a look at this thread. It's very similar.

https://forums.gentoo.org/viewtopic-t-687335.html

----------

## Kasumi_Ninja

 *DarrenSmith wrote:*   

> You might want to take a look at this thread. It's very similar.
> 
> https://forums.gentoo.org/viewtopic-t-687335.html

 

Thanks, I've replaced the hard disk and so far so good   :Smile: 

----------

## Kasumi_Ninja

Well this really sucks, my system still freezes with each and every emerge even after I replaced my hard disk and memory    :Crying or Very sad: 

----------

