Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Linux freezes for a while and then continues

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
BE
Hello,

I have this problem that my linux system just freezes for a while and then continues. The freezes happen randomly. Its very annoying. I don't use KDE or Gnome, just plain X.
I have a flash disk, and thats also part of my misery.
When I want to format my flash,

mke2fs /dev/nftla
ithangs here for a while, then

it continues until:

...
writing inode tables: done
writing superblocks and filesystem accouting information:

and here it hangs. Its just frozen. Power off.
My flash is not broken as I already tried 3 different flash disks. Somethimes I can mount it, somthimes I can't. Its like it has a life of his own..

All these freezing problems started from after I installed snmpd on my machine. Could that be the cause?
Or could there be a bug in the drivers for the flash in the kernel? When I boot me kernel that doesn't have flash support, I don't have any problems. In fact,I also think that I don't have any problems as long as I don't try to mount the flash...somethimes it hangs after I type 'mount /dev/nftla /flash' and then after 30 seconds or so it says that I have to specify the file system type. While I'm sure its ext2,I formatted it that way.
Someone over here told me it could be network related.
I don't know..

Any clues ??

thnx

Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Hi,

Can you uninstall snmpd and see if problem continues? Mike

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 

Stop it with /etc/init.d/snmpd stop (depending on ...).

Cheers Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 
wel, tat I knew. But what I meant is that I installed snmp,
but its not active. I just used rpm to install it. But the deamon does not run. Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 

Sound very strange. rpm can remove it again. I think it's option -e??

Cheers Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 
I found out that it only happens when a run or after I ran XFree86.
Even if my flash is not mounted,it still gets corrupt after I ran X!


if XFree86 hasn't ran yet:
e2fsck /dev/nftla geeft:
/dev/nftla:clean, 172/4000 files, 7670/15968 blocks

if XFree86 has ran or runs:

e2fsck /dev/nftla geeft:
Couldn't find ext2 superblock, trying backup blocks...
e2fsck:Attemp to read block from filesystem resulted in short read
while trying to open /dev/nftla
Could this be a zero length partition ?

Strange isn't it ?
Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Is there a more recent device driver for your flash?

Have you reported problem to flash device driver author? Mike

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
No there is no more recent driver as it is build into the kernel 2.4.7-10.
Yes I have mailed the author (David Woodhouse) but
I havn't got a reply yet.
Do you think its the driver ? How would it come that it only happens after XFree86 ? even without it being mounted, thats the strangest thing of all. Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Ok, I just saw that my memory usage is extremely high.
I don't use swap (as it is a simulation for a bootable cd but thats not important).
The results of 'top':
Buffers (whatever that is) is extremely high (194480K).
25896 cached.
mem 251592K 246996K used,4596K free, ok shrd 194552K buff
swap 0K 0K used 0K free 26176K cached
So that leaves me with only about 4596K free,and no swap. So that might explain te crashing ?


Greetz,
muppeteer.gif

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

Don't eat yellow snow...and don't mess with your fstab!
 
That may not be the explanation because the OS would use (nearly) all available memory to cache the filesystems, and adjust this quantity dynamically depending on the memory requirements of running applications. Maybe you could look into limiting this activity if you need to have more memory available for applications? Annihilannic.
 
Lets set one thing clear, I don't run a lot of applications.
I just boot from a kernel-with-flash-support, and then start XFree86. Thats it. My machine has 256 meg of ram. When I have booted, I already lost 119meg (!) to so called buffers. What are they ? And why do they take 119 meg ?
I can believe linux is short of memory as it only has 4,5 meg left to run on.
Greetz,
muppeteer.gif

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

Don't eat yellow snow...and don't mess with your fstab!
 
I tried to format the flash into msdos to see if I also get freezes there and I do. Also I have freezes now without starting X. Perhaps it happens when I do write operations on the flash or something... I don't know. I do know that buffers still is very high (198meg)...
(on I found info on buffers but I still don't know why they are so high.) Greetz,
muppeteer.gif

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

Don't eat yellow snow...and don't mess with your fstab!
 
Buffers, filesystem buffer cache... it's what I was talking about in my post. It's normal for it to allocate almost all available memory to buffers. If an application needs some memory, the amount in buffers will be reduced. Annihilannic.
 
a thnx, thats what I wanted to know.
I do think its strange that in that case top says the memory is used, it would be more logical to add it to free memory.

Anywho, that still doesn't solve my problem.. Greetz,
muppeteer.gif

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

Don't eat yellow snow...and don't mess with your fstab!
 
The buffer cache is effectively where UNIX (and Linux) keeps its free memory.

It used to be that a fixed amount of memory would be allocated for the filesystem (buffer) cache but it turns out that for most applications it's more efficient to allocate spare memory to the buffer cache where it will be of some benefit rather than just leaving it lying idle.

It's a bit like keeping your spare cash in a savings account where it will earn interest rather than leaving it in your currrent (chequing) account where it's instantly available but doesn't do you any good if it's not needed.

On some systems it *is* more efficient (I'm told) to have a fixed size buffer cache; these are:-

Database servers.
"Large" Machines with a "a lot" of RAM.

Not a trivial thing, to decide absolutely whether your system will run better with a static or dynamic buffer cache. It's usually better to leave it as dynamic. I've been toying with the idea of writing a FAQ about it as it's something that interests me -- but it's not, if I'm honest a very frquently asked question...

And no, it doesn't solve your problem <sigh>

What command are you using when you try to mount your flash?

Is there any documentation we could see on your flash? (online or posted here) Mike

&quot;Experience is the comb that Nature gives us, after we are bald.&quot;

Is that a haiku?
I never could get the hang
of writing those things.
 
mount /dev/nftla /flash

it mounts it
but:
the system is very likely to crash/freeze, ESPECIALLY
when XFree86 runs. Yesterday I tried formatting the
flash to msdos to see if it made any difference, and
then I even got crashes without XFree86 running.
With ext2 I only get unexpected behaviour when
XFree86 runs. Whatdo you want to know about the
flash ? its a Disk On Chip from M-Systems 16Meg large.
The drivers where written by David Woodhouse,and are
supported by the kernel. I compiled my own kernel, I
made devices (/dev/nftla) and formatted the flash
with mke2fs. If XFree86 does not run, I can format,
mount, e2fschk without problem. But if XFree86 runs,
it freezes at random while I'm just typeing ls or
somthing similar.


ps: thnx for 'hanging on' and trying to help me everybody!
Greetz,
muppeteer.gif

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

Don't eat yellow snow...and don't mess with your fstab!
 
Today I build a new kernel, the 2.4.20 instead of the
2.4.7-10.
The same problem happens, but now the system doesn't crash anymore. I can still change to another tty and then kill the tty. Because the tty hangs. Also it doesn't crash at random anymore, only when I do commands on the flash like mounting it, mke2fs etc.. BUT this is all with swap enabled.

I disabled the swap just now, and the random freezes occur again when I mount the flash and start XFree86.

How comes I am the first one to encounter this problem?
It must be purely the kernel, as I have it now on another hd to. The freezes occur at random if there is no swap.
But now it is only on 1 tty that the freeze happens instead of the whole system.

Greetz,
muppeteer.gif

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)

Don't eat yellow snow...and don't mess with your fstab!
 
:-(

annoying, to say the least Mike

&quot;Experience is the comb that Nature gives us, after we are bald.&quot;

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top