1*795d594fSAndroid Build Coastguard WorkerTesting contended locking where lock is released before callback ends. 2*795d594fSAndroid Build Coastguard WorkerLocker thread 1 for NamedLock[Lock testLockUncontend] contended-LOCKING NamedLock[Lock testLockUncontend] 3*795d594fSAndroid Build Coastguard WorkerReleasing NamedLock[Lock testLockUncontend] during monitorEnter event. 4*795d594fSAndroid Build Coastguard WorkerLocker thread 1 for NamedLock[Lock testLockUncontend] LOCKED NamedLock[Lock testLockUncontend] 5*795d594fSAndroid Build Coastguard WorkerTesting throwing exceptions in monitor_enter 6*795d594fSAndroid Build Coastguard WorkerLocker thread 3 for NamedLock[Lock testLockThrowEnter] contended-LOCKING NamedLock[Lock testLockThrowEnter] 7*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorEnter 8*795d594fSAndroid Build Coastguard WorkerLocker thread 3 for NamedLock[Lock testLockThrowEnter] LOCKED NamedLock[Lock testLockThrowEnter] 9*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 10*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorEnter of NamedLock[Lock testLockThrowEnter] 11*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testLockThrowEnter], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 12*795d594fSAndroid Build Coastguard WorkerTesting throwing exceptions in monitor_entered 13*795d594fSAndroid Build Coastguard WorkerLocker thread 5 for NamedLock[Lock testLockThrowEntered] contended-LOCKING NamedLock[Lock testLockThrowEntered] 14*795d594fSAndroid Build Coastguard WorkerLocker thread 5 for NamedLock[Lock testLockThrowEntered] LOCKED NamedLock[Lock testLockThrowEntered] 15*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorEntered 16*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 17*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorEntered of NamedLock[Lock testLockThrowEntered] 18*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testLockThrowEntered], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 19*795d594fSAndroid Build Coastguard WorkerTesting throwing exceptions in both monitorEnter & MonitorEntered 20*795d594fSAndroid Build Coastguard WorkerLocker thread 7 for NamedLock[Lock testLockThrowBoth] contended-LOCKING NamedLock[Lock testLockThrowBoth] 21*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorEnter 22*795d594fSAndroid Build Coastguard WorkerLocker thread 7 for NamedLock[Lock testLockThrowBoth] LOCKED NamedLock[Lock testLockThrowBoth] 23*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorEntered 24*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 25*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorEntered of NamedLock[Lock testLockThrowBoth] 26*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testLockThrowBoth], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 27*795d594fSAndroid Build Coastguard WorkerTesting throwing exception in MonitorWait event 28*795d594fSAndroid Build Coastguard WorkerLocker thread 8 for NamedLock[Lock testThrowWait] start-monitor-wait NamedLock[Lock testThrowWait] timeout: 0 29*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorWait 30*795d594fSAndroid Build Coastguard WorkerLocker thread 8 for NamedLock[Lock testThrowWait] monitor-waited NamedLock[Lock testThrowWait] timed_out: false 31*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 32*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during MonitorWait of NamedLock[Lock testThrowWait] 33*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testThrowWait], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 34*795d594fSAndroid Build Coastguard WorkerTesting throwing exception in MonitorWait event with illegal aruments 35*795d594fSAndroid Build Coastguard WorkerLocker thread 9 for NamedLock[Lock testThrowIllegalWait] start-monitor-wait NamedLock[Lock testThrowIllegalWait] timeout: -100000 36*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorWait timeout = -100000 37*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 38*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorWait of NamedLock[Lock testThrowIllegalWait] 39*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testThrowIllegalWait], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 40*795d594fSAndroid Build Coastguard WorkerTesting throwing exception in MonitorWaited event 41*795d594fSAndroid Build Coastguard WorkerLocker thread 10 for NamedLock[Lock testThrowWaited] start-monitor-wait NamedLock[Lock testThrowWaited] timeout: 0 42*795d594fSAndroid Build Coastguard WorkerLocker thread 10 for NamedLock[Lock testThrowWaited] monitor-waited NamedLock[Lock testThrowWaited] timed_out: false 43*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorWaited 44*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 45*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorWaited of NamedLock[Lock testThrowWaited] 46*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testThrowWaited], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 47*795d594fSAndroid Build Coastguard WorkerTesting throwing exception in MonitorWaited event caused by timeout 48*795d594fSAndroid Build Coastguard WorkerLocker thread 12 for NamedLock[Lock testThrowWaitedTimeout] start-monitor-wait NamedLock[Lock testThrowWaitedTimeout] timeout: 5000 49*795d594fSAndroid Build Coastguard WorkerLocker thread 12 for NamedLock[Lock testThrowWaitedTimeout] monitor-waited NamedLock[Lock testThrowWaitedTimeout] timed_out: true 50*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorWaited 51*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 52*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorWaited of NamedLock[Lock testThrowWaitedTimeout] 53*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testThrowWaitedTimeout], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 54*795d594fSAndroid Build Coastguard WorkerTesting throwing exception in MonitorWaited event caused by interrupt 55*795d594fSAndroid Build Coastguard WorkerLocker thread 13 for NamedLock[Lock testThrowWaitedInterrupt] start-monitor-wait NamedLock[Lock testThrowWaitedInterrupt] timeout: 0 56*795d594fSAndroid Build Coastguard WorkerLocker thread 13 for NamedLock[Lock testThrowWaitedInterrupt] monitor-waited NamedLock[Lock testThrowWaitedInterrupt] timed_out: false 57*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorWaited 58*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: Exception thrown by other thread! 59*795d594fSAndroid Build Coastguard Worker Caused by: art.Monitors$TestException: throwing exception during monitorWaited of NamedLock[Lock testThrowWaitedInterrupt] 60*795d594fSAndroid Build Coastguard Workerlock state is: MonitorUsage{ monitor: NamedLock[Lock testThrowWaitedInterrupt], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 61*795d594fSAndroid Build Coastguard WorkerTesting ObjectMonitorInfo inside of events 62*795d594fSAndroid Build Coastguard WorkerLocker thread 15 for NamedLock[Lock testMonitorInfoInEvents] contended-LOCKING NamedLock[Lock testMonitorInfoInEvents] 63*795d594fSAndroid Build Coastguard WorkerMonitor usage in MonitorEnter: MonitorUsage{ monitor: NamedLock[Lock testMonitorInfoInEvents], owner: Locker thread 14 for NamedLock[Lock testMonitorInfoInEvents], entryCount: 1, waiters: [], notify_waiters: [] } 64*795d594fSAndroid Build Coastguard WorkerLocker thread 15 for NamedLock[Lock testMonitorInfoInEvents] LOCKED NamedLock[Lock testMonitorInfoInEvents] 65*795d594fSAndroid Build Coastguard WorkerMonitor usage in MonitorEntered: MonitorUsage{ monitor: NamedLock[Lock testMonitorInfoInEvents], owner: Locker thread 15 for NamedLock[Lock testMonitorInfoInEvents], entryCount: 1, waiters: [], notify_waiters: [] } 66*795d594fSAndroid Build Coastguard WorkerLocker thread 15 for NamedLock[Lock testMonitorInfoInEvents] start-monitor-wait NamedLock[Lock testMonitorInfoInEvents] timeout: 0 67*795d594fSAndroid Build Coastguard WorkerMonitor usage in MonitorWait: MonitorUsage{ monitor: NamedLock[Lock testMonitorInfoInEvents], owner: Locker thread 15 for NamedLock[Lock testMonitorInfoInEvents], entryCount: 1, waiters: [], notify_waiters: [] } 68*795d594fSAndroid Build Coastguard WorkerLocker thread 15 for NamedLock[Lock testMonitorInfoInEvents] monitor-waited NamedLock[Lock testMonitorInfoInEvents] timed_out: false 69*795d594fSAndroid Build Coastguard WorkerMonitor usage in MonitorWaited: MonitorUsage{ monitor: NamedLock[Lock testMonitorInfoInEvents], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 70*795d594fSAndroid Build Coastguard WorkerTesting that the monitor can be stolen during the MonitorWaited event. 71*795d594fSAndroid Build Coastguard WorkerLocker thread 17 for NamedLock[test testWaitEnterInterleaving] start-monitor-wait NamedLock[test testWaitEnterInterleaving] timeout: 0 72*795d594fSAndroid Build Coastguard WorkerLocker thread 17 for NamedLock[test testWaitEnterInterleaving] monitor-waited NamedLock[test testWaitEnterInterleaving] timed_out: false 73*795d594fSAndroid Build Coastguard Workerlocking controller3 in controller2 MonitorWaited event 74*795d594fSAndroid Build Coastguard WorkerController3 now holds the lock the monitor wait will try to re-acquire 75*795d594fSAndroid Build Coastguard WorkerTesting that we can lock and release the monitor in the MonitorWait event 76*795d594fSAndroid Build Coastguard WorkerLocker thread 20 for NamedLock[test testWaitMonitorEnter] start-monitor-wait NamedLock[test testWaitMonitorEnter] timeout: 0 77*795d594fSAndroid Build Coastguard WorkerIn wait monitor usage: MonitorUsage{ monitor: NamedLock[test testWaitMonitorEnter], owner: Locker thread 20 for NamedLock[test testWaitMonitorEnter], entryCount: 1, waiters: [], notify_waiters: [] } 78*795d594fSAndroid Build Coastguard WorkerIn wait monitor usage sync: MonitorUsage{ monitor: NamedLock[test testWaitMonitorEnter], owner: Locker thread 20 for NamedLock[test testWaitMonitorEnter], entryCount: 2, waiters: [], notify_waiters: [] } 79*795d594fSAndroid Build Coastguard WorkerLocker thread 20 for NamedLock[test testWaitMonitorEnter] monitor-waited NamedLock[test testWaitMonitorEnter] timed_out: false 80*795d594fSAndroid Build Coastguard WorkerTesting that we can lock and release the monitor in the MonitorWaited event 81*795d594fSAndroid Build Coastguard WorkerLocker thread 22 for NamedLock[test testWaitedMonitorEnter] start-monitor-wait NamedLock[test testWaitedMonitorEnter] timeout: 0 82*795d594fSAndroid Build Coastguard WorkerLocker thread 22 for NamedLock[test testWaitedMonitorEnter] monitor-waited NamedLock[test testWaitedMonitorEnter] timed_out: false 83*795d594fSAndroid Build Coastguard WorkerIn waited monitor usage: MonitorUsage{ monitor: NamedLock[test testWaitedMonitorEnter], owner: <NULL>, entryCount: 0, waiters: [], notify_waiters: [] } 84*795d594fSAndroid Build Coastguard WorkerIn waited monitor usage sync: MonitorUsage{ monitor: NamedLock[test testWaitedMonitorEnter], owner: Locker thread 22 for NamedLock[test testWaitedMonitorEnter], entryCount: 1, waiters: [], notify_waiters: [] } 85*795d594fSAndroid Build Coastguard WorkerTesting we can perform recursive lock in MonitorEntered 86*795d594fSAndroid Build Coastguard WorkerLocker thread 25 for NamedLock[test testRecursiveMontiorEnteredLock] contended-LOCKING NamedLock[test testRecursiveMontiorEnteredLock] 87*795d594fSAndroid Build Coastguard WorkerLocker thread 25 for NamedLock[test testRecursiveMontiorEnteredLock] LOCKED NamedLock[test testRecursiveMontiorEnteredLock] 88*795d594fSAndroid Build Coastguard WorkerIn MonitorEntered usage: MonitorUsage{ monitor: NamedLock[test testRecursiveMontiorEnteredLock], owner: Locker thread 25 for NamedLock[test testRecursiveMontiorEnteredLock], entryCount: 1, waiters: [], notify_waiters: [] } 89*795d594fSAndroid Build Coastguard WorkerIn MonitorEntered sync: MonitorUsage{ monitor: NamedLock[test testRecursiveMontiorEnteredLock], owner: Locker thread 25 for NamedLock[test testRecursiveMontiorEnteredLock], entryCount: 2, waiters: [], notify_waiters: [] } 90*795d594fSAndroid Build Coastguard WorkerTesting the lock state if MonitorEnter throws in a native method 91*795d594fSAndroid Build Coastguard WorkerNativeLockStateThrowEnter thread contended-LOCKING NamedLock[test testNativeLockStateThrowEnter] 92*795d594fSAndroid Build Coastguard WorkerUnlocking controller1 in MonitorEnter 93*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorEnter 94*795d594fSAndroid Build Coastguard WorkerNativeLockStateThrowEnter thread LOCKED NamedLock[test testNativeLockStateThrowEnter] 95*795d594fSAndroid Build Coastguard WorkerMonitorEnter returned: -1 96*795d594fSAndroid Build Coastguard WorkerLock state is: MonitorUsage{ monitor: NamedLock[test testNativeLockStateThrowEnter], owner: NativeLockStateThrowEnter thread, entryCount: 1, waiters: [], notify_waiters: [] } 97*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: throwing exception during monitorEnter of NamedLock[test testNativeLockStateThrowEnter] 98*795d594fSAndroid Build Coastguard WorkerTesting the lock state if MonitorEntered throws in a native method 99*795d594fSAndroid Build Coastguard WorkerNativeLockStateThrowEntered thread contended-LOCKING NamedLock[test testNativeLockStateThrowEntered] 100*795d594fSAndroid Build Coastguard WorkerUnlocking controller1 in MonitorEnter 101*795d594fSAndroid Build Coastguard WorkerNativeLockStateThrowEntered thread LOCKED NamedLock[test testNativeLockStateThrowEntered] 102*795d594fSAndroid Build Coastguard WorkerThrowing exception in MonitorEntered 103*795d594fSAndroid Build Coastguard WorkerMonitorEnter returned: -1 104*795d594fSAndroid Build Coastguard WorkerLock state is: MonitorUsage{ monitor: NamedLock[test testNativeLockStateThrowEntered], owner: NativeLockStateThrowEntered thread, entryCount: 1, waiters: [], notify_waiters: [] } 105*795d594fSAndroid Build Coastguard WorkerCaught exception: art.Monitors$TestException: throwing exception during monitorEntered of NamedLock[test testNativeLockStateThrowEntered] 106