Skip to contentSkip to conversation

android on omap

DISCUSSION twebb 3 participants 9 messages Oct 3, 2008 – Oct 9, 2008 4 messages not in the archive

lore
Share & tools
lore

twebb

author
#0 lore raw

I'm using linux-2.6.26 from the l-o git on an omap3 based target, and have patched it with android-0.9 patch derived as described in various forums about porting android to real hardware. I'm also using the android filesystem and binaries as extracted from 0.9 release. I can start target and all seems OK - to a point. Kernel starts OK, android init starts OK, all processes appear to start OK. However, when process 'system_server' starts, screen changes from "ANDROID_" to blank, and about 45-60 seconds later 'system_server' goes away and process 'zygote' restarts. When started with strace, I see the error output below.

Can anyone make any sense of this error/exception? By the way, the target does not have network connectivity via USB, but does have it via ethernet. Might this be an issue?

Thanks,
twebb

java.lang.RuntimeException: ANDROID_SOCKET_zygote unset or invalid
at com.android.internal.os.ZygoteInit.registerZygoteSocket(ZygoteInit.java:156) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:461) at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: unable to parse 'null' as integer
at java.lang.Integer.parseInt(Integer.java:362)
at java.lang.Integer.parseInt(Integer.java:341)
at com.android.internal.os.ZygoteInit.registerZygoteSocket(ZygoteInit.java:154)

#1 lore raw

There is too little information to say much. Try running logcat (or just cat /dev/log/main) to get more info. Since dalvik started, it probably has something to do with the input config files or runtime database. File permissions can also be and issue. Cleaning out the /data and /system/data directories can also help.

...Kd

Quoted 43 lines

-----Original Message-----
From: [email protected] [mailto:linux-omap- [email protected]] On Behalf Of twebb
Sent: Friday, October 03, 2008 9:51 AM
To: [email protected] Mailing List
Subject: android on omap

I'm using linux-2.6.26 from the l-o git on an omap3 based target, and have patched it with android-0.9 patch derived as described in various forums about porting android to real hardware. I'm also using the android filesystem and binaries as extracted from 0.9 release. I can start target and
all seems OK - to a point. Kernel starts OK, android init starts OK, all processes appear to start OK. However, when process 'system_server' starts, screen changes from "ANDROID_" to blank, and about 45-60 seconds later 'system_server' goes away and process 'zygote' restarts. When started with strace, I see the error output below.

Can anyone make any sense of this error/exception? By the way, the target does not have network connectivity via USB, but does have it via ethernet. Might this be an issue?

Thanks,
twebb

java.lang.RuntimeException: ANDROID_SOCKET_zygote unset or invalid
at
com.android.internal.os.ZygoteInit.registerZygoteSocket(ZygoteInit.java:15
6)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:461) at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: unable to parse 'null' as integer
at java.lang.Integer.parseInt(Integer.java:362)
at java.lang.Integer.parseInt(Integer.java:341)
at
com.android.internal.os.ZygoteInit.registerZygoteSocket(ZygoteInit.java:15
4)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#6 lore raw
Quoted 7 lines

Had problems with using NFS because Android tries to set specific permission and ownership of files - and has a nasty habit of testing those permissions frequently. If you have any local storage options - that would help. Also, check your init.rc file for things like mount trying to remount the filesystem readonly - Android assumes a very specific partition layout - which can be consolidated into one partition as long as init.rc is adjusted to match.

Does the root file system reside on NFS? Have you enabled "Networking" while configuring the kernel?

I've now moved filesystem to target (jffs2). Things are a little better, and different. Using logcat, I'm now seeing dalvikvm errors and warnings as shown below. Particularly odd since I wasn't seeing this error when rootfs was mounted via NFS. Any ideas?

I really appreciate your input.

Thanks,
twebb

D/dalvikvm( 483): DexOpt: --- BEGIN 'core.jar' (bootstrap=1) --- E/dalvikvm( 501): unable to mmap DEX cache: Invalid argument E/dalvikvm( 501): Optimization failed
D/dalvikvm( 483): DexOpt: waiting for verify+opt, pid=501 W/dalvikvm( 483): DexOpt: --- END 'core.jar' --- status=0xff00, process failed E/dalvikvm( 483): Unable to extract+optimize DEX from '/system/framework/core.jar'
D/dalvikvm( 483): Failed on '/system/framework/core.jar' (boot=1) D/dalvikvm( 483): VM cleaning up
D/dalvikvm( 483): LinearAlloc 0x0 used 4100 of 4194304 (0%) W/dalvikvm( 483): JNI_CreateJavaVM failed
E/AndroidRuntime( 483): JNI_CreateJavaVM failed

#7 lore raw

Haven't seen that error - sorry.

Unable to mmap stands out. I know there was a lot of updates to the shared memory subsystem and there was some Android share memory driver introduced with the Android patch set. Seems like it's trying to mmap some shared memory and failing. The rest just seems to be fallout because it can't do what it wants to now.

...Kd

Quoted 44 lines

-----Original Message-----
From: twebb [mailto:[email protected]]
Sent: Monday, October 06, 2008 4:46 PM
To: Deacon, Keith; [email protected] Mailing List
Subject: Re: android on omap

Quoted 2 lines

Had problems with using NFS because Android tries to set specific

permission and ownership of files - and has a nasty habit of testing those permissions frequently. If you have any local storage options - that would help. Also, check your init.rc file for things like mount trying to remount the filesystem readonly - Android assumes a very specific partition layout - which can be consolidated into one partition as long as init.rc is adjusted to match.

Quoted 3 lines

Does the root file system reside on NFS? Have you enabled "Networking"

while

Quoted 2 lines

configuring the kernel?

I've now moved filesystem to target (jffs2). Things are a little better, and different. Using logcat, I'm now seeing dalvikvm errors and warnings as shown below. Particularly odd since I wasn't seeing this error when rootfs was mounted via NFS. Any ideas?

I really appreciate your input.

Thanks,
twebb

D/dalvikvm( 483): DexOpt: --- BEGIN 'core.jar' (bootstrap=1) --- E/dalvikvm( 501): unable to mmap DEX cache: Invalid argument E/dalvikvm( 501): Optimization failed
D/dalvikvm( 483): DexOpt: waiting for verify+opt, pid=501 W/dalvikvm( 483): DexOpt: --- END 'core.jar' --- status=0xff00, process failed
E/dalvikvm( 483): Unable to extract+optimize DEX from '/system/framework/core.jar'
D/dalvikvm( 483): Failed on '/system/framework/core.jar' (boot=1) D/dalvikvm( 483): VM cleaning up
D/dalvikvm( 483): LinearAlloc 0x0 used 4100 of 4194304 (0%) W/dalvikvm( 483): JNI_CreateJavaVM failed
E/AndroidRuntime( 483): JNI_CreateJavaVM failed

#8 lore raw
Quoted 3 lines · Keith

Haven't seen that error - sorry.

Unable to mmap stands out. I know there was a lot of updates to the shared memory subsystem and there was some Android share memory driver introduced with the Android patch set. Seems like it's trying to mmap some shared memory and failing. The rest just seems to be fallout because it can't do what it wants to now.

JFFS2 supports only read-only mmap. If that is a problem, you could try UBIFS.

Quoted 50 lines

...Kd

Quoted 27 lines

-----Original Message-----
From: twebb [mailto:[email protected]]
Sent: Monday, October 06, 2008 4:46 PM
To: Deacon, Keith; [email protected] Mailing List
Subject: Re: android on omap

Quoted 1 line

Had problems with using NFS because Android tries to set specific

permission and ownership of files - and has a nasty habit of testing those permissions frequently. If you have any local storage options - that would help. Also, check your init.rc file for things like mount trying to remount the filesystem readonly - Android assumes a very specific partition layout - which can be consolidated into one partition as long as init.rc is adjusted to match.

Quoted 1 line

Does the root file system reside on NFS? Have you enabled "Networking"

while

Quoted 2 lines

configuring the kernel?

I've now moved filesystem to target (jffs2). Things are a little better, and different. Using logcat, I'm now seeing dalvikvm errors and warnings as shown below. Particularly odd since I wasn't seeing this error when rootfs was mounted via NFS. Any ideas?

I really appreciate your input.

Thanks,
twebb

Quoted 13 lines

D/dalvikvm( 483): DexOpt: --- BEGIN 'core.jar' (bootstrap=1) --- E/dalvikvm( 501): unable to mmap DEX cache: Invalid argument E/dalvikvm( 501): Optimization failed
D/dalvikvm( 483): DexOpt: waiting for verify+opt, pid=501 W/dalvikvm( 483): DexOpt: --- END 'core.jar' --- status=0xff00, process failed
E/dalvikvm( 483): Unable to extract+optimize DEX from '/system/framework/core.jar'
D/dalvikvm( 483): Failed on '/system/framework/core.jar' (boot=1) D/dalvikvm( 483): VM cleaning up
D/dalvikvm( 483): LinearAlloc 0x0 used 4100 of 4194304 (0%) W/dalvikvm( 483): JNI_CreateJavaVM failed
E/AndroidRuntime( 483): JNI_CreateJavaVM failed

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#9 lore raw
Quoted 4 lines

JFFS2 supports only read-only mmap. If that is a problem, you could try UBIFS.

Now when mounting rootfs as yaffs2, the servicemanager dies/exits almost immediately on android startup, and logcat output is shown below. However, when mounting same rootfs via NFS, I don't see this problem (though I do have other issues). Does the error

E/dalvikvm-gc( 483): Could not create 176128-byte ashmem mark stack

indicate a specific problem? Might there be a way to dump more specific/verbose output at startup to get a better understanding of what's wrong?

Thanks,
twebb

I/DEBUG ( 481): debuggerd: Aug 14 2008 18:58:32
E/mountd ( 480): could not read initial mass storage state

D/AndroidRuntime(  483):
D/AndroidRuntime(  483): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(  483): CheckJNI is ON
D/AndroidRuntime(  483): --- registering native functions ---

I/Zygote ( 483): Preloading classes...
E/dalvikvm-gc( 483): Could not create 176128-byte ashmem mark stack

#10 lore raw

Ashmem is the Android shared memory subsystem. You can find it in the kernel under mm/ashmem.c. There is a config option to turn it on and off. The error indicates that it's having trouble with the driver - although it's not specific as to exactly what. Make sure it's enabled, the device is present (/dev/ashmem), etc..

...Kd

Quoted 37 lines

-----Original Message-----
From: twebb [mailto:[email protected]]
Sent: Thursday, October 09, 2008 10:09 AM
To: Adrian Hunter
Cc: Deacon, Keith; [email protected] Mailing List; [email protected]; Mat Johnson
Subject: Re: android on omap

Quoted 4 lines

JFFS2 supports only read-only mmap. If that is a problem, you could try UBIFS.

Now when mounting rootfs as yaffs2, the servicemanager dies/exits almost immediately on android startup, and logcat output is shown below. However, when mounting same rootfs via NFS, I don't see this problem (though I do have other issues). Does the error

E/dalvikvm-gc( 483): Could not create 176128-byte ashmem mark stack

indicate a specific problem? Might there be a way to dump more specific/verbose output at startup to get a better understanding of what's wrong?

Thanks,
twebb

I/DEBUG ( 481): debuggerd: Aug 14 2008 18:58:32
E/mountd ( 480): could not read initial mass storage state D/AndroidRuntime( 483):
D/AndroidRuntime( 483): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 483): CheckJNI is ON
D/AndroidRuntime( 483): --- registering native functions --- I/Zygote ( 483): Preloading classes...
E/dalvikvm-gc( 483): Could not create 176128-byte ashmem mark stack

author
#11 lore raw
Quoted 4 lines

Ashmem is the Android shared memory subsystem. You can find it in the kernel under mm/ashmem.c. There is a config option to turn it on and off. The error indicates that it's having trouble with the driver - although it's not specific as to exactly what. Make sure it's enabled, the device is present (/dev/ashmem), etc..

...Kd

I have ashmem properly configured and it works when the FS is mounted via NFS. However as pointed out previously that seemed to be causing other issues so I moved the FS into JFFS2. That too had it's issues (where mmap was failing under certain conditions) that Adrian and Anil pointed out were due to JFFS2. So I moved it to YAFFS2. Now I'm seeing this "ashmem" issue. Up to this point, ashmem has worked fine so I don't believe it's really the culprit. I feel like it has to do with permissions or the filesystem. One difference is that the emulator uses three different yaffs2 partitions (userdata, system, and cache) while I currently have all of these on a single partition.

Any other ideas as to what might cause the ...

E/dalvikvm-gc( 483): Could not create 176128-byte ashmem mark stack

message?

Thanks,
twebb

#12 lore raw

Running out of ideas here. It just opens the ashmem device and makes two ioctl calls - one to set a label and the other allocate the size. If either fail, you get the error. Device permissions could be an issue or there isn't enough memory to successfully allocate. Since it worked before, I would guess device permissions. The init.rc script does remount / as read only. I would test /dev/ out by getting into the console and seeing if I can read, write, create a device - preferably as a non-root user - since dalik will most likely be running as a non-prived user.

...Kd

Quoted 36 lines

-----Original Message-----
From: twebb [mailto:[email protected]]
Sent: Thursday, October 09, 2008 5:00 PM
To: Deacon, Keith
Cc: Adrian Hunter; [email protected] Mailing List; [email protected]; Mat Johnson
Subject: Re: android on omap

Quoted 1 line

Ashmem is the Android shared memory subsystem. You can find it in the

kernel under mm/ashmem.c. There is a config option to turn it on and off. The error indicates that it's having trouble with the driver - although it's not specific as to exactly what. Make sure it's enabled, the device is present (/dev/ashmem), etc..

Quoted 3 lines

...Kd

I have ashmem properly configured and it works when the FS is mounted via NFS. However as pointed out previously that seemed to be causing other issues so I moved the FS into JFFS2. That too had it's issues (where mmap was failing under certain conditions) that Adrian and Anil pointed out were due to JFFS2. So I moved it to YAFFS2. Now I'm seeing this "ashmem" issue. Up to this point, ashmem has worked fine so I don't believe it's really the culprit. I feel like it has to do with permissions or the filesystem. One difference is that the emulator uses three different yaffs2 partitions (userdata, system, and cache) while I currently have all of these on a single partition.

Any other ideas as to what might cause the ...

E/dalvikvm-gc( 483): Could not create 176128-byte ashmem mark stack

message?

Thanks,
twebb