Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Unsafe concurrent access to unknown lease collection in AssignableVMs class #167

Closed
tbak opened this issue Jan 5, 2018 · 0 comments
Closed

Comments

@tbak
Copy link

tbak commented Jan 5, 2018

unknownLeaseIdsToExpire array is modified directly when invoking TaskScheduler#expireLease method. This array is not concurrent, and most likely the intent was to handle it like all the other mutations by the internal thread.

Here is an example stack trace:
fenzo.TaskScheduler:? - Error with scheduling run: null java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) at java.util.ArrayList$Itr.next(ArrayList.java:851) at com.netflix.fenzo.AssignableVMs.expireAnyUnknownLeaseIds(AssignableVMs.java:257) at com.netflix.fenzo.AssignableVMs.prepareAndGetOrderedVMs(AssignableVMs.java:270) at com.netflix.fenzo.TaskScheduler.doSchedule(TaskScheduler.java:754) at com.netflix.fenzo.TaskScheduler.doScheduling(TaskScheduler.java:736) at com.netflix.fenzo.TaskScheduler.scheduleOnce(TaskScheduler.java:711) at com.netflix.fenzo.TaskSchedulingService.scheduleOnce(TaskSchedulingService.java:275) at com.netflix.fenzo.TaskSchedulingService.access$700(TaskSchedulingService.java:73) at com.netflix.fenzo.TaskSchedulingService$1.run(TaskSchedulingService.java:140) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

tbak pushed a commit to tbak/Fenzo that referenced this issue Jan 8, 2018
@tbak tbak closed this as completed in 30b1874 Jan 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant