Cant create folder using mkdir to sd card for android tablet - eclipse

im having this problem of mkdir keep returning false even though i have done all the necessary the following are my active codes.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
File folder = new File(Environment.getExternalStorageDirectory().toString() + "/myappfolder" );
boolean maked = folder.mkdir();
System.out.println("the folder is maked or not? "+maked);
setContentView(R.layout.activity_main);
}
folder.mkdir() returns me false.
yes i have:
include
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
in my manifest.
i have also maked sure the folder does not exist in my sd card.
and in one of my project it display
06-22 01:23:58.130: W/ActivityManager(143): No content provider found for permission revoke: file:///data/local/tmp/simulation.apk
i even tried unplugging it from my computer in case sd card is mounted to my desktop.
i had also tried in sumsung galaxy s3
im mainly using acer A100 ICS factory data reset tablet.
i suspect something is blocking my tablet for allowing me to write on the sd card
i would really appreciate if someone can come out with a solution
The followings are my logcat
06-22 04:33:55.850: D/AndroidRuntime(18556): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-22 04:33:55.850: D/AndroidRuntime(18556): CheckJNI is OFF
06-22 04:33:56.030: D/AndroidRuntime(18556): Calling main entry com.android.commands.pm.Pm
06-22 04:33:56.030: D/AndroidRuntime(18556): Shutting down VM
06-22 04:33:56.040: D/dalvikvm(18556): GC_CONCURRENT freed 100K, 83% free 454K/2560K, paused 0ms+0ms
06-22 04:33:56.040: D/dalvikvm(18556): Debugger has detached; object registry had 1 entries
06-22 04:33:56.590: D/AndroidRuntime(18570): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-22 04:33:56.590: D/AndroidRuntime(18570): CheckJNI is OFF
06-22 04:33:56.760: D/AndroidRuntime(18570): Calling main entry com.android.commands.pm.Pm
06-22 04:33:56.770: W/ActivityManager(143): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk
06-22 04:33:56.780: W/ActivityManager(143): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk
06-22 04:33:56.850: I/PackageManager(143): Running dexopt on: com.android.myapp
06-22 04:33:57.150: D/dalvikvm(18581): DexOpt: load 41ms, verify+opt 183ms
06-22 04:33:57.230: I/ActivityManager(143): Force stopping package com.android.myapp uid=10071
06-22 04:33:57.320: D/PackageManager(143): New package installed in /data/app/com.android.myapp-1.apk
06-22 04:33:57.320: W/PackageManager(143): Unknown permission android.permission.READ_EXTERNAL_STORAGE in package com.android.myapp
06-22 04:33:57.440: D/PackageManager(143): generateServicesMap(android.accounts.AccountAuthenticator): 3 services unchanged
06-22 04:33:57.450: I/Launcher(1776): setLoadOnResume
06-22 04:33:57.470: D/dalvikvm(18159): GC_FOR_ALLOC freed 227K, 8% free 6680K/7239K, paused 17ms
06-22 04:33:57.490: D/SyncManager(143): setIsSyncable: Account {name=chinchyekoo#gmail.com, type=com.google}, provider com.google.android.gallery3d.GooglePhotoProvider -> 0
06-22 04:33:57.490: D/SyncManager(143): setIsSyncable: already set to 0, doing nothing
06-22 04:33:57.520: D/PackageManager(143): generateServicesMap(android.content.SyncAdapter): 18 services unchanged
06-22 04:33:57.570: D/BackupManagerService(143): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.android.myapp flg=0x10000010 (has extras) }
06-22 04:33:57.570: V/BackupManagerService(143): addPackageParticipantsLocked: com.android.myapp
06-22 04:33:57.660: D/dalvikvm(143): GC_EXPLICIT freed 1056K, 24% free 11640K/15239K, paused 6ms+7ms
06-22 04:33:57.670: D/AndroidRuntime(18570): Shutting down VM
06-22 04:33:57.680: D/dalvikvm(18570): GC_CONCURRENT freed 101K, 83% free 459K/2560K, paused 0ms+0ms
06-22 04:33:57.680: D/jdwp(18570): Got wake-up signal, bailing out of select
06-22 04:33:57.680: D/dalvikvm(18570): Debugger has detached; object registry had 1 entries
06-22 04:33:57.680: I/AndroidRuntime(18570): NOTE: attach of thread 'Binder Thread #3' failed
06-22 04:33:57.830: D/dalvikvm(1776): GC_CONCURRENT freed 2458K, 47% free 10173K/19079K, paused 2ms+6ms
06-22 04:33:57.840: D/dalvikvm(17407): GC_CONCURRENT freed 276K, 6% free 7177K/7559K, paused 16ms+3ms
06-22 04:33:57.930: D/dalvikvm(1776): GC_FOR_ALLOC freed 994K, 47% free 10233K/19079K, paused 32ms
06-22 04:33:58.020: D/dalvikvm(1776): GC_FOR_ALLOC freed 769K, 45% free 10581K/19079K, paused 21ms
06-22 04:33:58.080: D/AndroidRuntime(18593): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-22 04:33:58.080: D/AndroidRuntime(18593): CheckJNI is OFF
06-22 04:33:58.090: D/dalvikvm(1776): GC_CONCURRENT freed 5K, 38% free 11836K/19079K, paused 2ms+3ms
06-22 04:33:58.180: D/dalvikvm(1776): GC_CONCURRENT freed 1398K, 37% free 12143K/19079K, paused 1ms+4ms
06-22 04:33:58.290: D/dalvikvm(1776): GC_FOR_ALLOC freed 2316K, 42% free 11191K/19079K, paused 25ms
06-22 04:33:58.370: D/AndroidRuntime(18593): Calling main entry com.android.commands.am.Am
06-22 04:33:58.370: I/ActivityManager(143): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.myapp/.MainActivity} from pid 18593
06-22 04:33:58.420: D/AndroidRuntime(18593): Shutting down VM
06-22 04:33:58.420: I/AndroidRuntime(18593): NOTE: attach of thread 'Binder Thread #3' failed
06-22 04:33:58.420: D/dalvikvm(18593): GC_CONCURRENT freed 102K, 81% free 489K/2560K, paused 0ms+1ms
06-22 04:33:58.430: D/jdwp(18593): Got wake-up signal, bailing out of select
06-22 04:33:58.430: D/dalvikvm(18593): Debugger has detached; object registry had 1 entries
06-22 04:33:58.470: D/dalvikvm(18604): Late-enabling CheckJNI
06-22 04:33:58.490: I/ActivityManager(143): Start proc com.android.myapp for activity com.android.myapp/.MainActivity: pid=18604 uid=10071 gids={1015}
06-22 04:33:58.570: D/OpenGLRenderer(18507): Flushing caches (mode 1)
06-22 04:33:58.580: D/OpenGLRenderer(18507): Flushing caches (mode 0)
06-22 04:33:58.660: I/System.out(18604): folder newed going to make folder
06-22 04:33:58.660: I/System.out(18604): here/mnt/sdcard/myappfolder
06-22 04:33:58.660: I/System.out(18604): the folder is maked or not? false
06-22 04:33:58.680: D/dalvikvm(1776): GC_CONCURRENT freed 2487K, 47% free 10154K/19079K, paused 2ms+47ms
06-22 04:33:58.710: D/dalvikvm(18239): GC_CONCURRENT freed 339K, 6% free 6935K/7367K, paused 3ms+4ms
06-22 04:33:58.760: D/libEGL(18604): loaded /system/lib/egl/libEGL_tegra.so
06-22 04:33:58.780: D/libEGL(18604): loaded /system/lib/egl/libGLESv1_CM_tegra.so
6-22 04:33:58.810: D/dalvikvm(1776): GC_FOR_ALLOC freed 675K, 46% free 10318K/19079K, paused 35ms
06-22 04:33:58.830: D/libEGL(18604): loaded /system/lib/egl/libGLESv2_tegra.so
06-22 04:33:58.870: D/OpenGLRenderer(1776): Flushing caches (mode 1)
06-22 04:33:58.870: D/OpenGLRenderer(18604): Enabling debug mode 0
06-22 04:33:58.910: D/dalvikvm(1776): GC_FOR_ALLOC freed 642K, 46% free 10474K/19079K, paused 46ms
06-22 04:33:58.940: D/OpenGLRenderer(1776): Flushing caches (mode 0)
06-22 04:33:58.970: I/ActivityManager(143): Displayed com.android.myapp/.MainActivity: +516ms
06-22 04:33:59.000: D/dalvikvm(1776): GC_FOR_ALLOC freed 941K, 47% free 10204K/19079K, paused 41ms
06-22 04:33:59.010: I/dalvikvm-heap(1776): Grow heap (frag case) to 11.236MB for 1286224-byte allocation
06-22 04:33:59.050: D/dalvikvm(1776): GC_CONCURRENT freed 31K, 41% free 11429K/19079K, paused 2ms+4ms
06-22 04:34:00.210: E/DigitalAppWidgetUpdateService(17962): onReceive():948: screen mode = ORIENTATION_PORTRAIT
06-22 04:34:00.250: D/dalvikvm(17962): GC_CONCURRENT freed 321K, 8% free 6809K/7367K, paused 1ms+2ms

Two things.
Your code reads
File folder = new File(Environment.getExternalStorageDirectory().toString() + "/myappfolder" );
and you'd be better off using this syntax
File folder = new File(Environment.getExternalStorageDirectory().toString() , "myappfolder" );
If you're debugging your code, it's possible that the external SD Card has been dismounted. Go to Setting->Storage and verify that your SD Card is accessible to apps on your device.
After seeing your logcat, one thing seems to be causing you trouble. Your logcat has this line in it:
06-22 04:33:57.320: W/PackageManager(143): Unknown permission
android.permission.READ_EXTERNAL_STORAGE in package com.android.myapp
which means you're actually having trouble with your manifest (you're targetting an Android version which didn't have that permission implemented yet. I also suspect that if you remove that permission, your troubles will cease). According to the permission's description you don't need it anyway, since you're already granting WRITE_EXTERNAL_STORAGE.

Related

Apache kafka Error while appending records to topic

I am trying to consume 10 millions rows csv file of size(600MB) via connect api. The connection starts consuption completes for 3.7million records .After that i am getting the below error.
[2018-11-01 07:28:49,889] ERROR Error while appending records to topic-test-0 in dir /tmp/kafka-logs (kafka.server.LogDirFailureChannel)
java.io.IOException: No space left on device
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:60)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:211)
at org.apache.kafka.common.record.MemoryRecords.writeFullyTo(MemoryRecords.java:95)
at org.apache.kafka.common.record.FileRecords.append(FileRecords.java:151)
at kafka.log.LogSegment.append(LogSegment.scala:138)
at kafka.log.Log.$anonfun$append$2(Log.scala:868)
at kafka.log.Log.maybeHandleIOException(Log.scala:1837)
at kafka.log.Log.append(Log.scala:752)
at kafka.log.Log.appendAsLeader(Log.scala:722)
at kafka.cluster.Partition.$anonfun$appendRecordsToLeader$1(Partition.scala:634)
at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
at kafka.utils.CoreUtils$.inReadLock(CoreUtils.scala:257)
at kafka.cluster.Partition.appendRecordsToLeader(Partition.scala:622)
at kafka.server.ReplicaManager.$anonfun$appendToLocalLog$2(ReplicaManager.scala:745)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.mutable.HashMap.$anonfun$foreach$1(HashMap.scala:138)
at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:229)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:138)
at scala.collection.TraversableLike.map(TraversableLike.scala:234)
at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at kafka.server.ReplicaManager.appendToLocalLog(ReplicaManager.scala:733)
at kafka.server.ReplicaManager.appendRecords(ReplicaManager.scala:472)
at kafka.server.KafkaApis.handleProduceRequest(KafkaApis.scala:489)
at kafka.server.KafkaApis.handle(KafkaApis.scala:106)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:69)
at java.lang.Thread.run(Thread.java:748)
[2018-11-01 07:28:49,893] INFO [ReplicaManager broker=0] Stopping serving replicas in dir /tmp/kafka-logs (kafka.server.ReplicaManager)
[2018-11-01 07:28:49,897] INFO [ReplicaFetcherManager on broker 0] Removed fetcher for partitions __consumer_offsets-22,__consumer_offsets-30,__consumer_offsets-8,__consumer_offsets-21,__consumer_offsets-4,__consumer_offsets-27,__consumer_offsets-7,__consumer_offsets-9,__consumer_offsets-46,topic-test-0,__consumer_offsets-25,__consumer_offsets
i have single topic name topic-test
Machine Specs:
OS : CentOs 7
Ram : 16GB
HD : 80GB
i see some blogs talking about log.dirs is server.property but things are not clear as how it wants the input. Also am i to create partition ? I didnot do it thinking it is the same data file.
ERROR Error while appending records to topic-test-0 in dir /tmp/kafka-logs (kafka.server.LogDirFailureChannel)java.io.IOException: No space left on device
This comes when you are consuming a huge file or stream in kafka topic.
Go to default log directory /tmp/kafka-logs
Then,
[root#ENT-CL-015243 kafka-logs]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rhel6u4x64-lv_root 61G 8.4G 49G 15% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
/dev/sda1 485M 37M 423M 9% /boot
/dev/mapper/vg_rhel6u4x64-lv_home 2.0G 68M 1.9G 4% /home
/dev/mapper/vg_rhel6u4x64-lv_tmp 4.0G 315M 3.5G 9% /tmp
/dev/mapper/vg_rhel6u4x64-lv_var 7.9G 252M 7.3G 4% /var
As you can see in my case only 3.5Gb of /tmp space was available and I was facing this issue. I create a /klogs in root and changed log.dirs=/klogs/kafka-logs in server.properties

Google Street View API crashes when a specific LatLng is used

I get an IllegalArgumentException upon calling the code below
#Override
public void onStreetViewPanoramaReady(StreetViewPanorama streetView ) {
int radiusMeters = 50000; //50km
streetView.setPosition(new LatLng(-33.911227,151.157825), radiusMeters);
//with this specific LatLng it should crash with
//java.lang.IllegalArgumentException: Out of texture space.
}
the application will only crash at this specific location (it does not crash at other locations or when the radius is >200km)
adding a try-catch at the 'setPosition()' method does not catch this error too.
is there a way to catch this error and prevent the app from crashing?
I am using 8.1.0 of the library
com.google.android.gms:play-services-maps:8.1.0'
I get the following crash log: -
10-13 22:34:51.954 30446-30571/angelandroidapps.twitch.TakeMePlaces D/dalvikvm: GC_FOR_ALLOC freed 766K, 46% free 7846K/14316K, paused 36ms, total 36ms
10-13 22:34:52.124 30446-30611/angelandroidapps.twitch.TakeMePlaces D/dalvikvm: GC_FOR_ALLOC freed 866K, 45% free 8013K/14316K, paused 32ms, total 32ms
10-13 22:34:52.265 30446-30583/angelandroidapps.twitch.TakeMePlaces D/dalvikvm: GC_FOR_ALLOC freed 1009K, 44% free 8150K/14316K, paused 37ms, total 37ms
10-13 22:34:52.285 30446-30583/angelandroidapps.twitch.TakeMePlaces I/dalvikvm-heap: Grow heap (frag case) to 18.847MB for 8388624-byte allocation
10-13 22:34:52.295 30446-30583/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.305 30446-30446/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.315 30446-30446/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.335 30446-30583/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.415 30446-30583/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.445 30446-30583/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.505 30446-30583/angelandroidapps.twitch.TakeMePlaces D/TextLayoutCache: Enable myanmar Zawgyi converter
10-13 22:34:52.535 30446-30583/angelandroidapps.twitch.TakeMePlaces W/dalvikvm: threadid=40: thread exiting with uncaught exception (group=0x4180bda0)
10-13 22:34:52.535 30446-30583/angelandroidapps.twitch.TakeMePlaces E/AndroidRuntime: FATAL EXCEPTION: Renderer
10-13 22:34:52.535 30446-30583/angelandroidapps.twitch.TakeMePlaces E/AndroidRuntime: Process: angelandroidapps.twitch.TakeMePlaces, PID: 30446
10-13 22:34:52.535 30446-30583/angelandroidapps.twitch.TakeMePlaces E/AndroidRuntime: java.lang.IllegalArgumentException: Out of texture space.
10-13 22:34:52.535 30446-30583/angelandroidapps.twitch.TakeMePlaces E/AndroidRuntime: at com.google.maps.api.android.lib6.gmm6.streetview.bg.a(Unknown Source)
10-13 22:34:52.535 30446-30583/angelandroidapps.twitch.TakeMePlaces E/AndroidRuntime: at com.google.maps.api.android.lib6.gmm6.streetview.bg.run(Unknown Source) gmm6.streetview.bg.run(Unknown Source)
Upgrade google play services to the latest 12.0.1 and use the latest setPosition method for streetViewPanorama which support OUTDOOR parameter.
mStreetViewPanorama.setPosition(location, 50, StreetViewSource.OUTDOOR);
This OUTDOOR parameter solved the similar issue in my app (keep on getting exception when showing the street view of one specific POI).

Postgres gets out of memory errors despite having plenty of free memory

I have a server running Postgres 9.1.15. The server has 2GB of RAM and no swap. Intermittently Postgres will start getting "out of memory" errors on some SELECTs, and will continue doing so until I restart Postgres or some of the clients that are connected to it. What's weird is that when this happens, free still reports over 500MB of free memory.
select version();:
PostgreSQL 9.1.15 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit
uname -a:
Linux db 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Postgresql.conf (everything else is commented out/default):
max_connections = 100
shared_buffers = 500MB
work_mem = 2000kB
maintenance_work_mem = 128MB
wal_buffers = 16MB
checkpoint_segments = 32
checkpoint_completion_target = 0.9
random_page_cost = 2.0
effective_cache_size = 1000MB
default_statistics_target = 100
log_temp_files = 0
I got these values from pgtune (I chose "mixed type of applications") and have been fiddling with them based on what I've read, without making much real progress. At the moment there's 68 connections, which is a typical number (I'm not using pgbouncer or any other connection poolers yet).
/etc/sysctl.conf:
kernel.shmmax=1050451968
kernel.shmall=256458
vm.overcommit_ratio=100
vm.overcommit_memory=2
I first changed overcommit_memory to 2 about a fortnight ago after the OOM killer killed the Postgres server. Prior to that the server had been running fine for a long time. The errors I get now are less catastrophic but much more annoying because they are much more frequent.
I haven't had much luck pinpointing the first event that causes postgres to run "out of memory" - it seems to be different each time. The most recent time it crashed, the first three lines logged were:
2015-04-07 05:32:39 UTC ERROR: out of memory
2015-04-07 05:32:39 UTC DETAIL: Failed on request of size 125.
2015-04-07 05:32:39 UTC CONTEXT: automatic analyze of table "xxx.public.delayed_jobs"
TopMemoryContext: 68688 total in 10 blocks; 4560 free (4 chunks); 64128 used
[... snipped heaps of lines which I can provide if they are useful ...]
---
2015-04-07 05:33:58 UTC ERROR: out of memory
2015-04-07 05:33:58 UTC DETAIL: Failed on request of size 16.
2015-04-07 05:33:58 UTC STATEMENT: SELECT oid, typname, typelem, typdelim, typinput FROM pg_type
2015-04-07 05:33:59 UTC LOG: could not fork new process for connection: Cannot allocate memory
2015-04-07 05:33:59 UTC LOG: could not fork new process for connection: Cannot allocate memory
2015-04-07 05:33:59 UTC LOG: could not fork new process for connection: Cannot allocate memory
TopMemoryContext: 396368 total in 50 blocks; 10160 free (28 chunks); 386208 used
[... snipped heaps of lines which I can provide if they are useful ...]
---
2015-04-07 05:33:59 UTC ERROR: out of memory
2015-04-07 05:33:59 UTC DETAIL: Failed on request of size 1840.
2015-04-07 05:33:59 UTC STATEMENT: SELECT... [nested select with 4 joins, 19 ands, and 2 order bys]
TopMemoryContext: 388176 total in 49 blocks; 17264 free (55 chunks); 370912 used
The crash before that, a few hours earlier, just had three instances of that last query as the first three lines of the crash. That query gets run very often, so I'm not sure if the issues are because of this query, or if it just comes up in the error log because it's a reasonably complex SELECT getting run all the time. That said, here's an EXPLAIN ANALYZE of it: http://explain.depesz.com/s/r00
This is what ulimit -a for the postgres user looks like:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 15956
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 15956
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
I'll try and get the exact numbers from free next time there's a crash, in the meantime this is a braindump of all the info I have.
Any ideas on where to go from here?
I just ran into this same issue with a ~2.5 GB plain-text SQL file I was trying to restore. I scaled my Digital Ocean server up to 64 GB RAM, created a 10 GB swap file, and tried again. I got an out-of-memory error with 50 GB free, and no swap in use.
I scaled back my server to the small 1 GB instance I was using (requiring a reboot) and figured I'd give it another shot for no other reason than I was frustrated. I started the import and realized I forgot to create my temporary swap file again.
I created it in the middle of the import. psql made it a lot further before crashing. It made it through 5 additional tables.
I think there must be a bug allocating memory in psql.
Can you check if there's any swap memory available when the error raises up?
I've remove completely the swap memory in my Linux desktop (just for testing other things...) and I got the exactly same error! I'm pretty sure that this is what is going on with you too.
It is a bit suspicious that you report the same free memory size as your shared_buffers size. Are you sure you are looking the right values?
Output of free command at the time of crash would be useful as well as the content of /proc/meminfo
Beware that setting overcommit_memory to 2 is not so effective if you see the overcommit_ratio to 100. It will basically limits the memory allocation to the size swap (0 in this case) + 100% of physical RAM, which doesn't take into account any space for shared memory and disk caches.
You should probably set overcommit_ratio to 50.

MySQL failing to start under Cent OS

I'm trying to start mysqld on a CentOS box running Plesk as it is failing to start on its own.
Issuing the 'service mysqld start' command consistently fails. The /var/log/mysqld.log contains the following log output that I have so far been unable to diagnose:
140812 11:02:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140812 11:02:06 [Note] libgovernor.so not found
140812 11:02:06 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140812 11:02:06 [Note] Plugin 'FEDERATED' is disabled.
140812 11:02:06 InnoDB: The InnoDB memory heap is disabled
140812 11:02:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140812 11:02:06 InnoDB: Compressed tables use zlib 1.2.3
140812 11:02:06 InnoDB: Using Linux native AIO
140812 11:02:06 InnoDB: Initializing buffer pool, size = 1.5G
140812 11:02:06 InnoDB: Completed initialization of buffer pool
140812 11:02:06 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140812 11:02:06 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140812 11:02:06 InnoDB: ERROR: We were only able to scan the log up to
InnoDB: 521620455936, but a checkpoint was at 521620456252.
InnoDB: It is possible that the database is now corrupt!
140812 11:02:06 InnoDB: Error: page 5 log sequence number 521796960861
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 311359 log sequence number 521812034102
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 604 log sequence number 521733589779
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 262172 log sequence number 521916027574
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 226339 log sequence number 521733589779
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 393217 log sequence number 521650203404
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 393230 log sequence number 521672783155
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 409641 log sequence number 521858248765
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
140812 11:02:06 InnoDB: Error: page 227012 log sequence number 521815629412
InnoDB: is in the future! Current system log sequence number 521620456252.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: End of page dump
140812 11:02:06 InnoDB: Page checksum 1035077618, prior-to-4.0.14-form checksum 3964970138
InnoDB: stored checksum 1035077618, prior-to-4.0.14-form stored checksum 3867662893
InnoDB: Page lsn 121 2063969088, low 4 bytes of lsn at page end 2169240268
InnoDB: Page number (if stored to page already) 426042,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an insert undo log page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 426042.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
140812 11:02:06 InnoDB: Assertion failure in thread 140632717436896 in file buf0buf.c line 3619
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
10:02:06 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
key_buffer_size=268435456
read_buffer_size=131072
max_used_connections=0
max_threads=300
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 918492 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x2e)[0x79275e]
/usr/libexec/mysqld(handle_fatal_signal+0x493)[0x67ab83]
/lib64/libpthread.so.0(+0xf710)[0x7fe79ae8e710]
/lib64/libc.so.6(gsignal+0x35)[0x7fe7992d6925]
/lib64/libc.so.6(abort+0x175)[0x7fe7992d8105]
/usr/libexec/mysqld[0x8101df]
/usr/libexec/mysqld[0x81dc38]
/usr/libexec/mysqld[0x81e3ea]
/usr/libexec/mysqld[0x8133b5]
/usr/libexec/mysqld[0x7edf14]
/usr/libexec/mysqld[0x7e3141]
/usr/libexec/mysqld[0x7e3558]
/usr/libexec/mysqld[0x7e6323]
/usr/libexec/mysqld[0x7d233c]
/usr/libexec/mysqld[0x79ddc0]
/usr/libexec/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x67d8b1]
/usr/libexec/mysqld[0x590a68]
/usr/libexec/mysqld(_Z11plugin_initPiPPci+0x8c8)[0x594348]
/usr/libexec/mysqld[0x51a668]
/usr/libexec/mysqld(_Z11mysqld_mainiPPc+0x3fd)[0x51d28d]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7fe7992c2d1d]
/usr/libexec/mysqld[0x512915]
Edit: my MySQL configuration file:
[mysqld]
bind-address=127.0.0.1
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_buffer_pool_size = 1536M
key_buffer = 256M
query_cache_size = 128M
query_cache_limit = 2M
thread_cache_size = 12
max_connections = 300
innodb_lock_wait_timeout = 100
table_cache = 1600
table_definition_cache = 800
open_files_limit = 2600
innodb_flush_log_at_trx_commit = 2
join_buffer_size = 2M
innodb_thread_concurrency = 8
tmp_table_size = 6M
max_heap_table_size = 6M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root#s17111944 ~]# free -m
total used free shared buffers cached
Mem: 3927 470 3456 0 33 231
-/+ buffers/cache: 206 3721
Swap: 2055 0 2055

Google TV emulator hangs at google TV logo

I'm trying to run the Google TV emulator on Ubuntu 12.04. The emulator starts, but hangs at a screen with a Google TV logo in the center of it. I connected via adb and the log is looping with the following messages:
I/CameraService( 1038): CameraService started (pid=1038)
I/AudioFlinger( 1038): AudioFlinger's thread 0x9bb5a78 ready to run
I/ServiceManager( 795): Waiting for service SurfaceFlinger...
I/ServiceManager( 795): Waiting for service SurfaceFlinger...
I/ServiceManager( 795): Waiting for service SurfaceFlinger...
I/ServiceManager( 795): Waiting for service SurfaceFlinger...
I/ServiceManager( 795): Waiting for service SurfaceFlinger...
D/AndroidRuntime( 1048):
D/AndroidRuntime( 1048): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 1048): CheckJNI is ON
E/dalvikvm( 1048): Bad heap size parameters (start=5242880, max=33554432, limit=100663296)
W/dalvikvm( 1048): JNI_CreateJavaVM failed
E/AndroidRuntime( 1048): JNI_CreateJavaVM failed
I/ServiceManager( 782): service 'media.audio_flinger' died
I/ServiceManager( 782): service 'media.player' died
I/ServiceManager( 782): service 'media.camera' died
I/ServiceManager( 782): service 'media.audio_policy' died
I/Netd ( 1050): Netd 1.0 starting
I/ ( 1049): ServiceManager: 0x8c6fed8
E/ ( 1049): Failed to switch to AID_MEDIA user, error -1
W/GoogleTVMediaApi( 1049): InitializeGTVMediaLibraries not implemented
W/AVAPIService( 1049): InstantiateAVAPIService not implemented
W/AudioHardwareInterface( 1049): Using stubbed audio hardware. No sound will be produced.
D/AudioHardwareInterface( 1049): setMode(NORMAL)
There is a new version of the emulator coming (extremely soon). In the interim you can check your AVD parameters. Mine are as follows:
hw.lcd.density=213
hw.keyboard.charmap=Emulator
sdcard.size=1G
skin.name=720p
skin.path=add-ons/addon-google_tv_addon-google-12/skins/720p
hw.cpu.arch=x86
abi.type=x86
vm.heapSize=256
hw.ramSize=1024
disk.dataPartition.size=128
image.sysdir.1=add-ons/addon-google_tv_addon-google-12/images/x86/
The error arise because of "Bad heap size parameters ".
So resize the heap size:for me, I change heap size from 64 to 128.
In edit Android Virtual Device.