{"push_id":1067111037,"size":1,"distinct_size":1,"ref":"refs/heads/mm6.0","head":"43ced0f5e979da0e37d3e44ceeba22f1df4aef3d","before":"cd13c29d7825a6bbb4a2161e46429f538ec7f248","commits":[{"sha":"43ced0f5e979da0e37d3e44ceeba22f1df4aef3d","author":{"email":"5ff1e791b534cb2bff48df645f55908995b541f1@intel.com","name":"chao.bi"},"message":"Race in WapPushManager under multi-thread environment\n\nWhen multiple threads call WapPushManager functions simultaneously,\nit might hit race that one thread is closing a SqliteDatabase object\nwhile another thread is using it.\n\nFollowing is an example:\n\n    Thread A                                    Thread B\n\ncall getDatabaseLocked()                          ---\n       |                                           |\nmDatabase is NULL,so A create Database            ---\n       |                                           |\ngetDatabaseLocked() return the new                ---\ncreated Database                                  ---\n       |                                           |\n      ---                                 call getDatabaseLocked() and return\n      ---                                 the Database created by A\n       |                                           |\nCall SQLiteDatabase.close()                       ---\nclose() -> releaseReference()                     ---\nthe reference count is decreased to 0             ---\n       |                                           |\n      ---                                  Attempt to call any operation of Database\n      ---                                  Object, but hit exception because this\n      ---                                  Database Object's reference count is 0\n\nFor WapPushManager, seems it always close the database object right after\nit open&query it, this is not necessary and would hit above race under multi-thread\nenvironment.\n\nChange-Id: I68fac046f806c8d9328fbe0d9c8a08e6bfddbef1\nSigned-off-by: wangbo3 <bo.c.wang@intel.com>\nSigned-off-by: chao.bi <chao.bi@intel.com>\nSigned-off-by: Zhiquan Liu <zhiquan.liu@intel.com>","distinct":true,"url":"https://api.github.com/repos/BlissRoms/platform_frameworks_base/commits/43ced0f5e979da0e37d3e44ceeba22f1df4aef3d"}]}