Unoffical empeg BBS

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

Topic Options
#98115 - 06/06/2002 23:06 hijack: no memory for parsing config.ini; skipped
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Error mounting partitions (possibly already mounted)

Remounting first music partition read-only
Remounting second music partition read-only
No secondary hard disk
Press 'q' now to go into development mode. You Have Zero Seconds To Comply...
Starting player
kmalloc: Size (262873) too large
hijack: no memory for parsing config.ini; skipped

[hijack] ERROR: : "no memory"
khttpd: listening on port 80
kftpd: listening on port 21
Starting original player
player.cpp : 385:empeg-car 2.00-beta11 2002/02/08.
Prolux 4 empeg car - 2.1434 Feb 7 2002
Vcb: 0x4086d000



Anyone know why I am getting this? Before you ask:

empeg:/empeg/bin# cd /empeg/var

empeg:/empeg/var# ls -la
drwxr-xr-x 2 0 0 4096 Jun 7 17:33 .
drwxr-xr-x 5 0 0 4096 May 29 2001 ..
-rw-r--r-- 1 0 0 4832225 Mar 31 03:37 car-emplode-v2.00-beta11.zip
-rw-r--r-- 1 0 0 949 Jun 7 17:40 config.ini
-rw-r--r-- 1 0 0 717592 Jun 7 17:33 database
-rw-r--r-- 1 0 0 22568 Jun 7 17:33 playlists
-rw-r--r-- 1 0 0 390 Jun 7 17:33 tags



So my config.ini is definitely not too big. What I have done is that I have created a script to run the player binary with the -s- option i.e.

empeg:/empeg/bin# cd /empeg/bin

empeg:/empeg/bin# cat player
#!/bin/bash

CODE=42

while [ $CODE -eq 42 ]; do

echo "Starting original player"
/empeg/bin/player.orig -s- $1 $2 $3 $4 $5 $6
CODE=$?
echo "Original player exited with return code" "$CODE"

if [ $CODE -eq 42 ]; then
echo "Restarting player..."
fi
done


The original player binary is simply renamed to player.orig.

Perhaps there is a better way to do this? Everything else works fine, hijack just runs out of room to load the config.ini to parse things. I am also running preinit.d with that little telnetd and the viewer program that attaches to hijack. All I have to do is rename the player.orig back to the original and everything's sweet again so I don't think it's preinit.d.

It appears to be something to do with using the shell to launch the player.

Ideas?

thanks,
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#98116 - 07/06/2002 07:32 Re: hijack: no memory for parsing config.ini; skipped [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
As part of the way hijack intercepts and modifies config.ini, so that ONLY the player startup sees the changes, and not "regular" accesses to that file.. Hijack looks for the name "player".

What you are doing might work if you use "player" instead of "player.orig" for the filename, using a different path (directory) to distinguish it for your purposes from your script.

Or it might not.. try it and report back.

But perhaps better than all of that, might be to just edit the "init" program on your machine, and change the name of the "player" file to something else, which would be the name of your script.

That way, the player binary can remain as-is, and everyone will be happier.

Cheers

Top
#98117 - 07/06/2002 07:36 Re: hijack: no memory for parsing config.ini; skipped [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
>But perhaps better than all of that, might be
>to just edit the "init" program on your machine

And a little known secret of the kernel gods is that "vi" makes a fantastic binary file string editor. Just don't change the string length.

-ml

Top
#98118 - 08/06/2002 07:30 Re: hijack: no memory for parsing config.ini; skipped [Re: mlord]
rexkp
journeyman

Registered: 31/08/2000
Posts: 88
I have the same problem. I use a small executable called player to launch the real player with the -s- option. I could see what was happening and decided that was a bad idea :-(

Modifying the init binary is a great idea, though codewrite is my tool of choice there. After 20 years of wordstar then cua keys, vi is just too much...

However, a modified init would be tricky to have others generate and obviously not redistributable. I could distribute a program that makes the modification but that doesn't sound too friendly either. My plan it to hack kernel to stop the player from messing with the serial port. Probably creating a virtual serial port as messing with major and minor numbers of the devices didn't please the player.

This likely won't happen until summer is over though.

Cheers,

Rex.

Top
#98119 - 08/06/2002 20:15 Re: hijack: no memory for parsing config.ini; skipped [Re: mlord]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Well using the different path method didn't work either. I put the player binary in /bin.

Modding the init binary seemed to break it completely and it won't even run the script now. I have to apply the upgrade to get it back working now... Which will off course wipe all my custom stuff
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#98120 - 08/06/2002 23:59 Re: hijack: no memory for parsing config.ini; skipped [Re: Shonky]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
And yes I kept the length the same. I changed player to playyy making sure the NULL etc was in the same place and renamed my script to playyy.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#98121 - 09/06/2002 06:21 Re: hijack: no memory for parsing config.ini; skipped [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Hijack ftp should still work, so you can just use FTP to restore the original init.

-ml

Top
#98122 - 09/06/2002 06:28 Re: hijack: no memory for parsing config.ini; skipped [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Okay, so back to the "is there a better way to do this", the answer is probably "yes".

On startup, the Hijack kernel looks for these files, and executes ONLY the first one it finds:

/sbin/hijack
/sbin/init
/etc/init
/bin/init

Perhaps whatever it is that you are trying to do can be done by replacing "init" with your own (eg. /sbin/hijack), which does whatever and then invokes the "real" /sbin/init

This is usually a better method than trying to replace the player binary, and I had just assumed you have already tried it. n'est-ce pas?

Cheers

Top
#98123 - 09/06/2002 12:23 Re: hijack: no memory for parsing config.ini; skipped [Re: mlord]
lothar
member

Registered: 21/01/2002
Posts: 107
Curious:

If Hijack kernel only executes first file it finds per your list, and /sbin/hijack exists as empeg-preinit, then why would modifying /sbin/init lock the player (assuming mod was destructive)?

lothar

Top
#98124 - 09/06/2002 12:50 Re: hijack: no memory for parsing config.ini; skipped [Re: lothar]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
It wouldn't, unless something from /sbin/hijack caused /sbin/init to be invoked.

-ml

Top
#98125 - 09/06/2002 13:20 Re: hijack: no memory for parsing config.ini; skipped [Re: mlord]
lothar
member

Registered: 21/01/2002
Posts: 107
duh.

I should really think about using my brain once and a while.


Top
#98126 - 10/06/2002 04:59 Re: hijack: no memory for parsing config.ini; skipped [Re: Shonky]
rexkp
journeyman

Registered: 31/08/2000
Posts: 88
The stock init can't start a shell script. You would need an executable wrapper that launches the shell and script.

Cheers,

Rex.

Top
#98127 - 10/06/2002 06:16 Re: hijack: no memory for parsing config.ini; skipped [Re: rexkp]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Ahh.. mystery solved.

Top
#98128 - 18/07/2002 03:03 Re: hijack: no memory for parsing config.ini; skipped [Re: rexkp]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
Did this problem get solved? If so, how? I'd like to be able to run a hijack userland prog that listens to NMEA sentences on the serial port. I've tried renaming the player binary to player.orig and then using a tiny script
#!/bin/bash

/empeg/bin/player.orig -s-


But I get the, out of memory error. I've written all the code, the NMEA parser, the display routines, all I want to do is wrap it up into a nice userland app.

_________________________
Cheers,

Andy M

Top
#98129 - 18/07/2002 06:20 Re: hijack: no memory for parsing config.ini; skipped [Re: andym]
rexkp
journeyman

Registered: 31/08/2000
Posts: 88
I am currently using a simple executable binary to do this, but get the error.

Once summer is over I will see what I can do about virtualizing the serial port so the player can continue to own 'a' serial port while user apps can hit the real one. Should be a simple kernel hack.

Cheers,

Rex.

Top