Giter Site home page Giter Site logo

aws-sdk-android-ht-leak's Introduction

aws-sdk-android-ht-leak

This application demonstrates HandlerThread leak of aws-sdk-android 2.8.4 by having AWSIotMqttManager reconnect repeatedly.

The leak can be observed from logcat. The number of active threads is 10 or so at first.

12-05 23:41:08.351 24413-24463/com.github.hirofumi.aws_sdk_android_ht_leak E/MainActivity: `ulimit -n` = 32768
12-05 23:41:08.513 24413-24463/com.github.hirofumi.aws_sdk_android_ht_leak E/MainActivity: length of `lsof -p 24413` = 960, number of active threads = 9
12-05 23:41:08.821 24413-24475/com.github.hirofumi.aws_sdk_android_ht_leak W/AWSIotMqttManager: onFailure: connection failed.

But it increases instantly.

12-05 23:41:38.153 24413-24463/com.github.hirofumi.aws_sdk_android_ht_leak E/MainActivity: length of `lsof -p 24413` = 7569, number of active threads = 2210

And OOME occurs.

12-05 23:41:39.493 24413-1293/com.github.hirofumi.aws_sdk_android_ht_leak W/AWSIotMqttManager: Reconnect failed 
12-05 23:41:39.497 24413-1294/com.github.hirofumi.aws_sdk_android_ht_leak W/android_ht_lea: Throwing OutOfMemoryError "Could not allocate JNI Env: Failed anonymous mmap(0x0, 8192, 0x3, 0x2, 4720, 0): Permission denied. See process maps in the log."
12-05 23:41:39.501 24413-1294/com.github.hirofumi.aws_sdk_android_ht_leak E/AndroidRuntime: FATAL EXCEPTION: Reconnect thread
    Process: com.github.hirofumi.aws_sdk_android_ht_leak, PID: 24413
    java.lang.OutOfMemoryError: Could not allocate JNI Env: Failed anonymous mmap(0x0, 8192, 0x3, 0x2, 4720, 0): Permission denied. See process maps in the log.
        at java.lang.Thread.nativeCreate(Native Method)

NB: This also leaks file descriptors because Looper requires them.

aws-sdk-android-ht-leak's People

Contributors

hirofumi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.