Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#4633 - 06/11/1999 23:30 Running other software
Verement
journeyman

Registered: 02/09/1999
Posts: 97
Loc: Boston, MA, US
With the beta8 image I am at last able to run the player without tying up the serial port, but I'm still finding it difficult to run anything else at the same time. Sooner or later, most everything begins to die with a memory violation, e.g.:
bash: memory violation at pc=0x40008f0c, lr=0x40008f08 (bad address=0x4001f894, code 3)

I have plenty of swap, although it's clear the player is using most of the resident memory. What's going on? Is there any hope of running other programs at the same time as the player?


Top
#4634 - 07/11/1999 03:36 Re: Running other software [Re: Verement]
altman
carpal tunnel

Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
The problem may well be due to the player running with mlocked pages - it does this to ensure that it won't need to access the disk (unless it does it explicitly).

I think the solution may be to add a command line option to prevent the player from locking memory - there are also options as to what we do with the cache, eg allow some to be thrown away if other programs need to be run.

Hugo



Top
#4635 - 07/11/1999 03:40 Re: Running other software [Re: Verement]
mac
addict

Registered: 20/05/1999
Posts: 411
Loc: Cambridge, UK
I have plenty of swap, although it's clear the player is using most of the resident memory. What's going on?

Through the wizardry of Linux memory management the player is "mlocked" in. This means that all the memory that the player uses is forced to be resident in memory - no swapping or paging can take place. This is necessary since we spin the hard disk down and it would be rather inconvenient to have breaks in the music whilst it span back up to find part of the code it had paged out.

The crash you see is most likely inside the glibc version of malloc - it's definitely in a shared library since the address starts with a 4. There is a kernel bug that appears to affect all versions of 2.2.12 (and much earlier) which is why you see the crash dump. Unfortunately, the kernel and parts of glibc aren't really geared up to running an mlocked program that takes up virtually all the memory. We are working on various fixes for this problem but the proper solution requires major changes to the way Linux memory management works.

Is there any hope of running other programs at the same time as the player?

Maybe. You can reduce the amount of memory it uses for caching. Go into /empeg/var and create a file called 'config.ini'. In this file place the following lines:

[Startup]
ReduceCache=n

Where n is the amount you wish to reduce it by in chunks. Currently chunks are 32K+a tiny bit. The developer player only runs with 48 chunks which is why it caches regularly - to start with try reducing specifying ReduceCache=8 to see if that improves things.

--
Mike Crowe
I may not be speaking on behalf of empeg above :-)
_________________________
--
Mike Crowe

Top