)]}'
{
  "log": [
    {
      "commit": "c3f114037dbf028896310609fd28cf2b3da99c4d",
      "tree": "e463aeb3604177cd93cea8a58936a8dce4b34ee5",
      "parents": [
        "d0d0b52da375bfa85947a4257198791f615f18a8"
      ],
      "author": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Wed Oct 30 14:40:09 2013 -0700"
      },
      "committer": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Thu Oct 31 12:31:16 2013 -0700"
      },
      "message": "\u003cpthread.h\u003e fixes and pthread cleanup.\n\n\u003cpthread.h\u003e was missing nonnull attributes, noreturn on pthread_exit,\nand had incorrect cv qualifiers for several standard functions.\n\nI\u0027ve also marked the non-standard stuff (where I count glibc rather\nthan POSIX as \"standard\") so we can revisit this cruft for LP64 and\ntry to ensure we\u0027re compatible with glibc.\n\nI\u0027ve also broken out the pthread_cond* functions into a new file.\n\nI\u0027ve made the remaining pthread files (plus ptrace) part of the bionic code\nand fixed all the warnings.\n\nI\u0027ve added a few more smoke tests for chunks of untested pthread functionality.\n\nWe no longer need the libc_static_common_src_files hack for any of the\npthread implementation because we long since stripped out the rest of\nthe armv5 support, and this hack was just to ensure that __get_tls in libc.a\nwent via the kernel if necessary.\n\nThis patch also finishes the job of breaking up the pthread.c monolith, and\nadds a handful of new tests.\n\nChange-Id: Idc0ae7f5d8aa65989598acd4c01a874fe21582c7\n"
    },
    {
      "commit": "faca92f2f17cea192c5fbde4d869aa7620315196",
      "tree": "e8cbfe294c0b00a9de2c928d4cbe9ac915fd0ca7",
      "parents": [
        "126601dd3f5303b50033dcb88945d928aa764aa4"
      ],
      "author": {
        "name": "Jean-Baptiste Queru",
        "email": "jbq@google.com",
        "time": "Mon Mar 26 15:25:19 2012 -0700"
      },
      "committer": {
        "name": "Jean-Baptiste Queru",
        "email": "jbq@google.com",
        "time": "Mon Mar 26 15:38:59 2012 -0700"
      },
      "message": "Handle pthread-related changes (mutex/atfork)\n\nFirst commit:\n\nRevert \"Revert \"am be741d47: am 2f460fbe: am 73b5cad9: Merge \"bionic: Fix wrong kernel_id in pthread descriptor after fork()\"\"\"\n\nThis reverts commit 06823da2f0c8b4a4ce4c45113032f03df85c94b8.\n\nSecond commit:\n\nbionic: fix atfork hanlder_mutex deadlock\n\nThis cherry-picks commit 34e89c232dd5645fe3b5f9b40856d8e3e4cae57a\n\nAfter applying the kernel_id fix, the system refused to boot up and we\ngot following crash log:\nI/DEBUG   (  113): pid: 618, tid: 618  \u003e\u003e\u003e org.simalliance.openmobileapi.service:remote \u003c\u003c\u003c\nI/DEBUG   (  113): signal 16 (SIGSTKFLT), code -6 (?), fault addr --------\nI/DEBUG   (  113):  eax fffffe00  ebx b77de994  ecx 00000080  edx 00724002\nI/DEBUG   (  113):  esi 00000000  edi 00004000\nI/DEBUG   (  113):  xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000 xss 0000007b\nI/DEBUG   (  113):  eip b7761351  ebp bfdf3de8  esp bfdf3dc4  flags 00000202\nI/DEBUG   (  113):     #00  eip: 00015351  /system/lib/libc.so\nI/DEBUG   (  113):     #01  eip: 0000d13c  /system/lib/libc.so (pthread_mutex_lock)\nI/DEBUG   (  113):     #02  eip: 00077b48  /system/lib/libc.so (__bionic_atfork_run_prepare)\nI/DEBUG   (  113):     #03  eip: 00052cdb  /system/lib/libc.so (fork)\nI/DEBUG   (  113):     #04  eip: 0009ae91  /system/lib/libdvm.so (_Z18dvmOptimizeDexFileillPKcjjb)\nI/DEBUG   (  113):     #05  eip: 000819d6  /system/lib/libdvm.so (_Z14dvmJarFileOpenPKcS0_PP7JarFileb)\nI/DEBUG   (  113):     #06  eip: 000b175e  /system/lib/libdvm.so (_ZL40Dalvik_dalvik_system_DexFile_openDexFilePKjP6JValue)\nI/DEBUG   (  113):     #07  eip: 0011fb94  /system/lib/libdvm.so\n\nRoot cause:\nThe atfork uses the mutex handler_mutex to protect the atfork_head. The\nparent will call __bionic_atfork_run_prepare() to lock the handler_mutex,\nand need both the parent and child to unlock their own copy of handler_mutex\nafter fork. At that time, the owner of hanlder_mutex is set as the parent.\nIf we apply the kernel_id fix, then the child\u0027s kernel_id will be set as\nchild\u0027s tid.\nThe handler_mutex is a recursive lock, and pthread_mutex_unlock(\u0026hander_mutex)\nwill fail because the mutex owner is the parent, while the current tid\n(__get_thread()-\u003ekernel_id) is child, not matched with the mutex owner.\nAt that time, the handler_mutex is left in lock state.If the child wants to\nfork other process after than, then it will try to lock handler_mutex, and\nthen be deadlocked.\n\nFix:\nSince the child has its own copy of vm space from the the parent, the\nchild space\u0027s handler_mutex should be reset to the initialized state.\n\nChange-Id: I3907dd9a153418fb78862f2aa6d0302c375d9e27\nSigned-off-by: Jack Ren \u003cjack.ren@intel.com\u003e\nSigned-off-by: Chenyang Du \u003cchenyang.du@intel.com\u003e\nSigned-off-by: Bruce Beare \u003cbruce.j.beare@intel.com\u003e\n\nChange-Id: Ic8072f366a877443a60fe215f3c00b3df5a259c8\n"
    },
    {
      "commit": "06823da2f0c8b4a4ce4c45113032f03df85c94b8",
      "tree": "eacafbaa2b301b0e28ab145cb4f28e10ae2fd212",
      "parents": [
        "76d56cf4a94e875a8b621025e2780775247adb6e"
      ],
      "author": {
        "name": "Guang Zhu",
        "email": "guangzhu@google.com",
        "time": "Mon Mar 12 22:05:36 2012 -0700"
      },
      "committer": {
        "name": "Guang Zhu",
        "email": "guangzhu@google.com",
        "time": "Mon Mar 12 22:05:36 2012 -0700"
      },
      "message": "Revert \"am be741d47: am 2f460fbe: am 73b5cad9: Merge \"bionic: Fix wrong kernel_id in pthread descriptor after fork()\"\"\n\nThis reverts commit 76d56cf4a94e875a8b621025e2780775247adb6e, reversing\nchanges made to c59ba4595be25a1213955233fcf9bcd1afe6438e.\n\nBug: 6157577\n"
    },
    {
      "commit": "d8bc6e7119450f263afcf89c8b581f6aaa23d186",
      "tree": "00a129ca73e415545e7a629ceb1ec4e7bbe525ef",
      "parents": [
        "a58c88c235bfeeb17ac495991e66f7b906935852"
      ],
      "author": {
        "name": "Jack Ren",
        "email": "jack.ren@intel.com",
        "time": "Tue Jan 17 16:27:42 2012 +0800"
      },
      "committer": {
        "name": "Jack Ren",
        "email": "jack.ren@intel.com",
        "time": "Mon Mar 12 23:14:56 2012 +0800"
      },
      "message": "bionic: Fix wrong kernel_id in pthread descriptor after fork()\n\nAfter forking, the kernel_id field in the phtread_internal_t returned by pthread_self()\nis incorrect --- it\u0027s the tid from the parent, not the new tid of the\nchild.\n\nThe root cause is that: currently the kernel_id is set by\n_init_thread(), which is called in 2 cases:\n(1) called by __libc_init_common(). That happens when the execv( ) is\ncalled after fork( ). But when the zygote tries to fork the android\napplication, the child application doesn\u0027t call execv( ), instread, it\ntries to call the Java main method directly.\n(2) called by pthread_create(). That happens when a new thread is\ncreated.\n\nFor the lead thread which is the thread created by fork(), it should\ncall execv() but it doesn\u0027t, as described in (1) above. So its kernel_id\nwill inherit the parent\u0027s kernel_id.\n\nFixed it in this patch.\n\nChange-Id: I63513e82af40ec5fe51fbb69456b1843e4bc0fc7\nSigned-off-by: Chenyang Du \u003cchenyang.du@intel.com\u003e\nSigned-off-by: Jack Ren \u003cjack.ren@intel.com\u003e\nSigned-off-by: Bruce Beare \u003cbruce.j.beare@intel.com\u003e\n"
    },
    {
      "commit": "d53cae0e45dafdb3a83ccc3675051c0aee532111",
      "tree": "c8771059f9c172b0da3b05f7e4903e1225008635",
      "parents": [
        "b8ef90d67950c5d4e04f95c30e164e924f41f70a"
      ],
      "author": {
        "name": "Glenn Kasten",
        "email": "gkasten@google.com",
        "time": "Mon Jul 11 15:41:28 2011 -0700"
      },
      "committer": {
        "name": "Glenn Kasten",
        "email": "gkasten@google.com",
        "time": "Fri Sep 16 12:38:28 2011 -0700"
      },
      "message": "Add non-NDK internal API __pthread_gettid\n\nTracking bugs 5267571 and 5090073 (for deadlock detection logs).\n\nChange-Id: Icb90f91ec1525607551c2234ef921bf88296484f\n"
    }
  ]
}
