[tor-bugs] #20440 [Metrics/metrics-lib]: endless wait in BlockingIteratorImpl
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Oct 24 06:51:18 UTC 2016
#20440: endless wait in BlockingIteratorImpl
-------------------------------------+---------------------
Reporter: iwakeh | Owner: karsten
Type: defect | Status: new
Priority: High | Milestone:
Component: Metrics/metrics-lib | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-------------------------------------+---------------------
As reported by David:
Onionoo updater didn't stop after supposedly successful run.
Here's the relevant thread dump part:
{{{
"Thread-0" #8 prio=5 os_prio=0 tid=0x00007f0d602f4000 nid=0x21a7 in
Object.wait() [0x00007f0d435e0000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007157e4ee0> (a
org.torproject.descriptor.impl.BlockingIteratorImpl)
at java.lang.Object.wait(Object.java:502)
at
org.torproject.descriptor.impl.BlockingIteratorImpl.add(BlockingIteratorImpl.java:40)
- locked <0x00000007157e4ee0> (a
org.torproject.descriptor.impl.BlockingIteratorImpl)
at
org.torproject.descriptor.impl.DescriptorReaderImpl$DescriptorReaderRunnable.readDescriptors(DescriptorReaderImpl.java:291)
at
org.torproject.descriptor.impl.DescriptorReaderImpl$DescriptorReaderRunnable.run(DescriptorReaderImpl.java:188)
at java.lang.Thread.run(Thread.java:745)
}}}
This is the while loop in BlockingIteratorImpl.add
{{{
while (this.queue.size() >= this.maxQueueSize) {
try {
wait();
} catch (InterruptedException e) {
/* nothing to be done */
}
}
}}}
As there are no consumers anymore and the queue is full the while-loop
doesn't stop.
--
Ticket URL: <https://troodi.torproject.org/projects/tor/ticket/20440>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list