Preinit on Beta 13/HJ283 causes memory voilation

Posted by: RichC

Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 03:19

Hi there...

I've just finished upgrading my player to 2.0 Beta 13, and
Hijack 283.. and all is fine ... except..

i've now reinstalled preinit v3 on my player in order to start empacman on startup,
and although it all seems work ok, a memory violation error
occours when starting empacman as follows..

hijack(9): memory violation at pc=0x02004480, lr=0x02004428 (bad address=0x464c4
587, code 2)
pc : [<02004480>] lr : [<02004428>]
sp : bffffe78 ip : bffffe98 fp : bffffe94
r10: 020005a4 r9 : 00000000 r8 : 0202eef0
r7 : 0203fdd0 r6 : 464c457f r5 : 0203fdc0 r4 : 00000010
r3 : 00001049 r2 : 00000010 r1 : 00001048 r0 : 464c457f
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: C0F3D17D Table: C0F3D17D DAC: 00000015
Function entered at [<02004458>] from [<02004428>]
r7 = 00000000 r6 = 020000C0 r5 = 0203FDC0 r4 = 464C457F
Function entered at [<02004380>] from [<020008ac>]
r5 = BFFFFF74 r4 = 00000001
Function entered at [<020005a4>] from [<02000a50>]
Function entered at [<02000974>] from [<02000104>]
r10 = 00000000 r8 = 00000000 r7 = 00000000 r6 = 00000000
r5 = 00000000 r4 = 00000000
empacman running as pid 15
Prolux 4 empeg car - 2.1434 Jul 24 2002
Vcb: 0x4086d000
! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 3450
288, error=0xc0044000

Any ideas? Is preint v3 not compatable with Hijack v283?


P.S.
Thanks for the empeg update guys.. always nice to have
support for an EOL product!
Posted by: tman

Re: Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 03:38

Hi,

Preinit works fine for me with v282 and v2.00b13. Have you tried downloading it again?

The preinit binary should be exactly 231380 bytes.

- Trevor
Posted by: RichC

Re: Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 03:45

Just checked my copy of preinit on my player and it is
exactly 231380 bytes. Reinstaled it anyway in case it
was corrupt, but still get exactly the same error...

Think i must be an issue with Hijack 283.. not tried going
back to 282 yet.
Posted by: tman

Re: Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 03:58

Odd. There shouldn't be any significant difference between v282 and v283. I'll give it a go now...

Preinit does work with v283 as well...

- Trevor
Posted by: RichC

Re: Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 04:20

Hmm.. most curious..

I've just downloaded Hijack v283 again (in case i have a
corrupt copy) and reapplied it to my player.. problem still
exists!

As i dont have a copy of v282 I then applied v281 of
Hijack.. and the problem went away!

Reapplied v283 and it comes back again!!..

Are you sure that your player is working correctly with
beta 13 and v283?
Are you watching the player startup (over serial)?

the error only occours when preinit runs the startup script
for empacman.. are you running this?

Just trying to figure this one out! - Anyone else having this problem?
Posted by: tman

Re: Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 06:20

Yep. v2.00b13 with Hijack v283. The only difference between v281 and v283 are that the v2.00b11 workarounds were removed and the bugfixes for the kernel that used to be in the Hijack patch are now in the main kernel tree. There is something definately odd going on here

<-snip->
Trying to unmount old root ... okay
Freeing unused kernel memory: 4k init
empeg-preinit starting...
empeg-preinit complete
empacman running as pid 17
empeg init 0.8
I see this is a developer image!
Mounting proc
<-snip->

empeg:/empeg/bin# cat /etc/preinit.d/N30empacman
#!/bin/sh
/bin/empacman

empeg:/empeg/bin# ls -al /bin/hijack
-rwxr-xr-x 1 1000 67 231380 Apr 1 02:17 /bin/hijack

empeg:/empeg/bin# ls -al /bin/empacman
-rwxr-xr-x 1 0 0 62143 Jul 20 08:40 /bin/empacman

empeg:/empeg/bin# cat /proc/sys/kernel/osrelease
2.2.14-rmk5-np17-empeg51-hijack-v283

- Trevor
Posted by: leftyfb

Re: Preinit on Beta 13/HJ283 causes memory voilation - 25/07/2002 07:10

i'm getting similar issues. I also got the same memory violation. I'm also this at startup. Not sure if this is the norm or not:

empeg-preinit starting...
empeg-preinit: empacman.sh: type 'e' not defined
empeg-preinit: empegVNC.sh: type 'e' not defined
empeg-preinit: telnetd.sh: type 't' not defined
empeg-preinit complete
empeg init 0.8

I have Beta 13 and hijack 283. As you can see I have empacman, VNC and telnetd all setup as startup scripts. None of which run now on thier own unless I go in through hyperterm and run them manually.
Posted by: tms13

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 07:52

You might get more information by adding
set -ev
at the beginning of each init script, to see which commands are being executed.
Posted by: leftyfb

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 08:02

This is what I put in each of the scripts:

#!/bin/sh
set -ev
/empeg/bin/telnetd

I still get the same messages at boot, the scripts still don't execute the bin's, and I still get:

! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 4319
751, error=0xc0044000

or something similar after rebooting and playing a song. It plays and will be fine until I reboot again, then i'll get the error. Not causing any problems other than my scripts not running.
Posted by: FlibblE

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 08:40

Yeah - I get that mp3player.cpp error too, noticed it last night when upgrading. I was too busy trying to get the player to run with the -s- command to think about it though!
Posted by: music

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 09:12

Just another datapoint for reference:
I was occasionally getting that mp3player.cpp error under Beta11
with Hijack 276, and NO preinit installed (and no empacman, empgps, or
emptriv either obviously).

Tony said I should probably contact support, but I never did, since it
never impacted the operation of my player.

Posted by: tms13

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 09:53

Rereading your original message, it looks like you haven't correctly named the startup scripts.

Pre-init requires that the script name begin with a capital letter indicating which phase of bootup executes it, followed by a two-digit sequence number, then whatever you like.

For example, /etc/preinit.d/M50telnetd
Posted by: F0X

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 10:19

I agree, the names for the scripts need to be changed to work with preinit.

As far as the mp3_decoder.cpp thing, there is another thread about it. Basically, I think it is just a message that appears when you start the player in the middle of a song. Not a real problem.
Posted by: RichC

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 10:36

Hmm.. don't think that's the problem..

my preinit startup script for empacman is named "M10empacman"

dont think it's a problem with the scripts because if i use
Hijack v281 (which i am at the moment) then everything is fine.. No errors at all!

The mp3_decoder.cpp error i have seen before and i don't think
is related to this problem (diddn't mean to include that in my origional message!)

RichC
Posted by: F0X

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 10:49

Sorry, the script naming problem is related to the post by leftyb not yours. My answers are not really related to the title of this thread. For that I have no ideas
Posted by: wfaulk

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 10:57

If you disable your empacman script, do you get that error with other programs being started? As it is now, does it always produce that error? If you run it on the command line after boot, does it give you that error? If not, try making it an `M' script. Maybe there's some requirement for the player to already be running.

Hmmm. Looking at your crash again, it looks like it's actually preinit that's causing the problem generating the crash. Odd. I can't think why. It's a very simple piece of code. Does the empeg continue booting properly after you see this error? Do any of the scripts get run?

Lemme know about the stuff above and then I'll see what I can figure out.
Posted by: leftyfb

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 11:00

hm... I changed the names it and it seems to be loading everything fine now. Odd because as someone else said, it didn't do this before I upgraded hijack from 281 to 283. Or actually now that I think about it, I also upgraded from an older version of preinit to preinit3 at the same time so that might have been it also.

I also did a test and played a quick song all the way through till it go to the "End of playlist" so not to be in the middle of a song and put the player into standby. Then unplugged it and plugged it back in and didn't get the mp3_decoder error.

I think everything is good now

gawd(Boston accent) I love this forum
Posted by: leftyfb

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 11:18

ok, now i'm seeing something that also doesn't look right:

#0 10 1 0 18:20 ttyS1 00:00:00 /empeg/bin/player
14 times (of course with different PID's)

I think only 1 of these was running before.

And to make things a HELL of a lot easier ... is there an editor (vi) I can use to edit these scripts on the player? I don't feel like messin around with win32 wannabee vi editors and my method of downloading from empeg -> upload to home linux box -> edit through ssh to box at home -> download from home linux box -> upload to empeg is really getting annoying.
Posted by: wfaulk

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 11:48

Yeah. There's a vi here that was submitted by Paul Grzelak. I submitted it to the riocar.org d/l section just now.
Posted by: justinlarsen

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 12:52

ya im running beta 13, hijackv283, and empacman on the preinit, just fine, so i dont think its a hijack problem, and the mp3deco.cpp error thing i get more often then not
Posted by: tman

Re: Preinit on Beta 13/HJ283 causes memory ... - 25/07/2002 16:36

/empeg/bin/player should be listed more than once. It's normal.

- Trevor
Posted by: alex25

Re: Preinit on Beta 13/HJ283 causes memory ... - 01/08/2002 08:43

Have you found a solution yet? I have a similar problem and I think the problem is the programs0-mount script.
Try to copy the files into another directory, for example /drive0/appl/empacman, adapt your empacman start script and remove the mountscript from /etc/preinit.d.
Hope this work. In my case it does.

Also have a look at http://empeg.comms.net/php/showthreaded.php?Cat=&Board=bigs&Number=107226&page=0&view=expanded&sb=5&o=0
Posted by: FlibblE

Re: Preinit on Beta 13/HJ283 causes memory ... - 01/08/2002 13:25

After re-reading the post I've got some more to add! I also got the memory violation error when starting up empacman using a pre-init script starting with M.

It looked to me as if, for some reason, the player and empacman were starting simultaneously - perhaps trying to grab the same resources!? dunno enough about linux to be honest. Although both programs seemed to work I didn't like the look of it, so I now start empacman with an N script (empacman is located on the hda2 partition).
Posted by: frog51

Re: Preinit on Beta 13/HJ283 causes memory ... - 02/08/2002 06:41

Does that remove that error? I too get it, but it didn't appear to affect anything so I ignored it I may use an N script if that is the answer.
Posted by: FlibblE

Re: Preinit on Beta 13/HJ283 causes memory ... - 02/08/2002 07:51

Yeah, it seemed to get rid of it