Author Topic: Machine locking up  (Read 3103 times)

jimux

  • Jr. Member
  • **
  • Posts: 96
Machine locking up
« on: August 21, 2009, 01:54:08 PM »
Over a period of use my CnMbook gets slower and eventually locks up.  If I open xterm and every 15 minutes while using any other applications, but especially web surfing, issue a free statement then I notice that the number of buffers increases each time. At about 3000 buffers the machine is virtually dead.

Busybox does not have a flush command and an attempt to execute /proc/sys/vm/bdflush returns 'permission denied'

Is there an alternative mechanism to flush the buffers and return them to usable memory or is there a configuration setting that sets a maximum?

wicknix

  • Hero Member
  • *****
  • Posts: 632
Re: Machine locking up
« Reply #1 on: August 21, 2009, 06:57:44 PM »
You could install the debian etch mipsel package that contains flush (console-tools pkg maybe?). Otherwise just respect the limitations of the machine. A swapfile works wonders, but firefox/bonecho and pidgin are resource hogs. Dont browse graphic intensive websites or at the very least shut images off in prefs and dont use more than 3 tabs. I've never had the machine just lock up with normal usage (only experimenting with extra packages), though i don't use the defaultOS either. Shouldn't really matter which OS you are running though. Just accept the fact the machine only has 128mb ram and a 335mhz cpu. It cant really handle too many applications running at once very well. I tend to stick with console applications more than the GUI counterparts as they use less resources to run giving the ability to run more apps smoothly. Elinks is a great text browser, centerim is a nice messenger, etc etc.

Cheers.

jimux

  • Jr. Member
  • **
  • Posts: 96
Re: Machine locking up
« Reply #2 on: August 21, 2009, 07:23:36 PM »
Thanks.  I think it is time to brush some ancient skills and revert to text based apps.  So I,llstart by installing 3MX.   

Freddie

  • Jr. Member
  • **
  • Posts: 87
  • Programmer since the dawn of time but Linux virgin
Re: Machine locking up
« Reply #3 on: November 02, 2009, 08:20:44 AM »
Oh dear! I have just hit this problem with the std distro after many months of happy use.

It has suddenly become incredibly slow to start and will only power down if I hold the power button down

Is there a solution for the std distro? - I don't want the hassle of installing a new distro and finding new problems...

I repeat jimux's query:

Is there an alternative mechanism to flush the buffers and return them to usable memory or is there a configuration setting that sets a maximum?

Thanks
CnM minibook, 128 MB, 2 GB SSD, kernel V70, default Debian Linux OS.
Vodaphone K3565 TopUp and Go Mobile Broadband when away from home

Mijzelf

  • Full Member
  • ***
  • Posts: 140
Re: Machine locking up
« Reply #4 on: November 02, 2009, 09:37:45 AM »
When you've got terminal access, you can put a swapfile on an SD card.
Put in an SD card, with room for a 256MB file. Then open xterm, and type
Code: [Select]
# create an 256 MB file:
dd if=/dev/zero of=/SD/SD_1/Swapfile bs=1024 count=262144
# convert it to a swapfile:
mkswap /SD/SD_1/Swapfile
# Use the swapfile:
swapon /SD/SD_1/Swapfile
That's it. You can see if it worked by typing: free. This should show your free memory, and the amount of available and used swapspace.
After each boot you'll only have to execute the last line:
Code: [Select]
swapon /SD/SD_1/Swapfile

jimux

  • Jr. Member
  • **
  • Posts: 96
Re: Machine locking up
« Reply #5 on: November 02, 2009, 09:41:15 AM »
I found that the problem was caused by the flash storage reporting bad blocks, and reducing the available disk space.  To check this open a terminal and type df [enter].  This will show you the percentage use of the storage devices.

I was working on this over the weekend and have yet to find a tool to reformat the drive, but you could use Midnight Commander to check and empty the lost&found directory in the root of the nand drive.

Freddie

  • Jr. Member
  • **
  • Posts: 87
  • Programmer since the dawn of time but Linux virgin
Re: Machine locking up
« Reply #6 on: November 02, 2009, 10:10:26 AM »
Mijzelf
Thanks for your very clear instructions but it doesn't seem to have cured the problem.

After free it says
totalusedfree
mem1260845003276052
Swap2621360262136
Total etc

Also, how do I move the Xterm icon to another page?

Thanks
« Last Edit: November 02, 2009, 10:12:32 AM by Freddie »
CnM minibook, 128 MB, 2 GB SSD, kernel V70, default Debian Linux OS.
Vodaphone K3565 TopUp and Go Mobile Broadband when away from home

Freddie

  • Jr. Member
  • **
  • Posts: 87
  • Programmer since the dawn of time but Linux virgin
Re: Machine locking up
« Reply #7 on: November 02, 2009, 10:23:02 AM »
jimux
Tried df, but get funny results
Filesystem  1k-blocks  used                 available   use%  mounted on
/dev/nand 1038336 18014398508748044  1772276 -18128659 51%
/dev/nand2 1048576     3072           1045504  0%  /mnt/nandflash2  
    
Also my lost& found is empty (now)

Is there anything equivalent to Windows (sorry I swore) diskcheck?
« Last Edit: November 02, 2009, 10:39:58 AM by Freddie »
CnM minibook, 128 MB, 2 GB SSD, kernel V70, default Debian Linux OS.
Vodaphone K3565 TopUp and Go Mobile Broadband when away from home

jimux

  • Jr. Member
  • **
  • Posts: 96
Re: Machine locking up
« Reply #8 on: November 02, 2009, 10:36:07 AM »
Nothing funny about that.  You have 49% available on the first user partition and you have not touched the second.  That looks absolutely correct for someone who is using the box as originally set up.

A swap file would speed up operation when applications are open but would slightly increase bootup time and shutdown as the file has to be loaded and unloaded. The power button is not wonderful as it is polled in sequence and the time-slice for polling depends on what else is running.  Is it just as slow if you mouse-click the red dot?

Freddie

  • Jr. Member
  • **
  • Posts: 87
  • Programmer since the dawn of time but Linux virgin
Re: Machine locking up
« Reply #9 on: November 02, 2009, 10:43:08 AM »
thanks jimux - just I'm not used to such enormous -ve %!

Clicking the red button brings up the shutdown screen but nothing happens (well, not for minutes anyway)

The power button powers it down in a few seconds

Did you see my modified reply where I added the following, or did we cross in the post?:

  • Also my lost& found is empty (now)
  • Is there anything equivalent to Windows (sorry I swore) diskcheck?
« Last Edit: November 02, 2009, 10:47:30 AM by Freddie »
CnM minibook, 128 MB, 2 GB SSD, kernel V70, default Debian Linux OS.
Vodaphone K3565 TopUp and Go Mobile Broadband when away from home

Mijzelf

  • Full Member
  • ***
  • Posts: 140
Re: Machine locking up
« Reply #10 on: November 02, 2009, 11:33:37 AM »
Tried df, but get funny results
Filesystem  1k-blocks  used                 available   use%  mounted on
/dev/nand 1038336 18014398508748044  1772276 -18128659 51%
/dev/nand2 1048576     3072           1045504  0%  /mnt/nandflash2
Nothing funny about that.  You have 49% available on the first user partition and you have not touched the second.  That looks absolutely correct for someone who is using the box as originally set up.
? I have no LLL here, at the moment, but the line '/dev/nand 1038336 18014398508748044  1772276 -18128659 51%' doesn't look correct to me. I think there is something seriously whong with the filesystem.

Is there anything equivalent to Windows (sorry I swore) diskcheck?
You can try fsck (don't know if it works for yaffs systems)

Freddie

  • Jr. Member
  • **
  • Posts: 87
  • Programmer since the dawn of time but Linux virgin
Re: Machine locking up
« Reply #11 on: November 02, 2009, 11:48:42 AM »
Thanks for that Mijzelf

fsck seems to be here, but is not very informative. I have tried most options but all I get is: '(busybox 1.4.1 2007-06-01 20:37:18 CST)

fsck -V did bring up the message 'Checking all filesystems' but nothing more

maybe I'm not understanding the options - I certainly don't know what filesystem to specify

Anyone got a suggestion for a simple command line entry?

Thanks again

BTW a red button shutdown did eventually succeed - after 25 minutes!!!
« Last Edit: November 02, 2009, 11:51:15 AM by Freddie »
CnM minibook, 128 MB, 2 GB SSD, kernel V70, default Debian Linux OS.
Vodaphone K3565 TopUp and Go Mobile Broadband when away from home

Mijzelf

  • Full Member
  • ***
  • Posts: 140
Re: Machine locking up
« Reply #12 on: November 02, 2009, 12:17:22 PM »
It is possible that you have got no compatible filesystems, when yaffs is not supported. In that case 'checking all filesystems' is ready immediately.

You can try
Code: [Select]
dmesg -c
fsck /dev/nand
dmesg
The first dmesg clears the kernel message buffer, so you can use the second to see if the kernel has generated new messages during fsck, when fsck itself gives no output.

Freddie

  • Jr. Member
  • **
  • Posts: 87
  • Programmer since the dawn of time but Linux virgin
Re: Machine locking up
« Reply #13 on: November 02, 2009, 12:36:59 PM »
Thanks yet again Mijzelf

The first dmesg scrolled a lot of stuff, but the last line was interesting:
jffs2_scan_eraseblock(): Node at 0x00203ffc (0x1985, 0xe001, 0x0011985) has invalid CRC 0x0000002b (calculated 0x7a44b16)

the fsck command brought up fsck.auto: no such file or directory
« Last Edit: November 02, 2009, 10:47:59 PM by Freddie »
CnM minibook, 128 MB, 2 GB SSD, kernel V70, default Debian Linux OS.
Vodaphone K3565 TopUp and Go Mobile Broadband when away from home

jimux

  • Jr. Member
  • **
  • Posts: 96
Re: Machine locking up
« Reply #14 on: November 02, 2009, 09:51:08 PM »
fsck is actually a 'front end' for a set of routines in the form fsck.partition type and on the netbook fsck is provided by busybox.  Busybox is a combined tool used on such systems to save storage space, but must tools provided by it are cut down versions of the full tool.  It is just a symbolic link calling busybox with a parameter.  I don't think the version of busybox loaded supports yaffs format partitions.