|
From: Ravi P. P. <rav...@fa...> - 2015-05-10 11:08:58
|
Hi,
In the main branch of blazegraph, I found an issue in the method
getServiceRegistrars in the file
bigdata-jini/src/java/com/bigdata/jini/start/config/JiniCoreServicesConfiguration.java
When I issue the command "bigdata start" it used to hang and ultimately
bail out with an error.
After changing
if (remaining <= 0) {
to:
if (TimeUnit.NANOSECONDS.toMillis(remaining) <= 0) {
it started working. I hope this change is the right fix for the issue.
I had trouble to do login in trac, so posting here.
Regards,
Ravi
|
|
From: Bryan T. <br...@sy...> - 2015-05-11 13:50:44
|
Hello, There is a bug here. The root cause is that Object.wait(long timeout) as invoked for the signal object ignores the timeout when it is zero. Your change works because it ensures that the timeout (when expressed in milliseconds) is GT ZERO. I have filed a ticket for this and will include a fix in the next release. See http://jira.blazegraph.com/browse/BLZG-34 (we are in the process of migrating to jira to due trac problems related to the deprecation of OpenID support by Google). try { // demand some results. ServiceRegistrar[] registrars = new ServiceRegistrar[0]; final long begin = System.nanoTime(); final long nanos = unit.toNanos(timeout); long remaining = nanos; while (registrars.length < maxCount) { remaining = nanos - (System.nanoTime() - begin); if (remaining <= 0) { // Note: Avoids negative timeout for signal.wait(). break; } if (log.isDebugEnabled()) log.debug("timeout=" + TimeUnit.NANOSECONDS.toMillis(timeout) + "ms, remaining: " + TimeUnit.NANOSECONDS.toMillis(remaining) + "ms, #registrars=" + registrars.length); synchronized (signal) { try { signal.wait(TimeUnit.NANOSECONDS.toMillis(remaining)); // <== WAITS FOREVER IF TIMEOUT IS ZERO } catch(InterruptedException ex) { // fall through } if(log.isDebugEnabled()) log.debug("woke up"); } registrars = discovery.getRegistrars(); } Thanks, Bryan ---- Bryan Thompson Chief Scientist & Founder SYSTAP, LLC 4501 Tower Road Greensboro, NC 27410 br...@sy... http://blazegraph.com http://blog.bigdata.com http://mapgraph.io Blazegraph™ is our ultra high-performance graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints APIs. MapGraph™ is our disruptive new technology to use GPUs to accelerate data-parallel graph analytics. CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. On Sun, May 10, 2015 at 7:08 AM, Ravi Prakash Putchala <rav...@fa...> wrote: > Hi, > > In the main branch of blazegraph, I found an issue in the method > getServiceRegistrars in the file > bigdata-jini/src/java/com/bigdata/jini/start/config/JiniCoreServicesConfiguration.java > > When I issue the command "bigdata start" it used to hang and ultimately > bail out with an error. > > After changing > > if (remaining <= 0) { > > to: > > if (TimeUnit.NANOSECONDS.toMillis(remaining) <= 0) { > > it started working. I hope this change is the right fix for the issue. > > I had trouble to do login in trac, so posting here. > > Regards, > > Ravi > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers |
|
From: Ravi P. P. <rav...@fa...> - 2015-05-11 15:42:20
|
Thank you. Ravi On Monday 11 May 2015 07:20 PM, Bryan Thompson wrote: > Hello, > > There is a bug here. The root cause is that Object.wait(long timeout) > as invoked for the signal object ignores the timeout when it is zero. > Your change works because it ensures that the timeout (when expressed > in milliseconds) is GT ZERO. I have filed a ticket for this and will > include a fix in the next release. See > http://jira.blazegraph.com/browse/BLZG-34 (we are in the process of > migrating to jira to due trac problems related to the deprecation of > OpenID support by Google). > > try { > > // demand some results. > ServiceRegistrar[] registrars = new ServiceRegistrar[0]; > > final long begin = System.nanoTime(); > > final long nanos = unit.toNanos(timeout); > > long remaining = nanos; > > while (registrars.length < maxCount) { > > remaining = nanos - (System.nanoTime() - begin); > > if (remaining <= 0) { > > // Note: Avoids negative timeout for signal.wait(). > break; > > } > > if (log.isDebugEnabled()) > log.debug("timeout=" > + TimeUnit.NANOSECONDS.toMillis(timeout) > + "ms, remaining: " > + TimeUnit.NANOSECONDS.toMillis(remaining) > + "ms, #registrars=" + registrars.length); > > synchronized (signal) { > > try { > > > signal.wait(TimeUnit.NANOSECONDS.toMillis(remaining)); // <== WAITS > FOREVER IF TIMEOUT IS ZERO > > } catch(InterruptedException ex) { > > // fall through > > } > > if(log.isDebugEnabled()) > log.debug("woke up"); > > } > > registrars = discovery.getRegistrars(); > > } > > Thanks, > Bryan > ---- > Bryan Thompson > Chief Scientist & Founder > SYSTAP, LLC > 4501 Tower Road > Greensboro, NC 27410 > br...@sy... > http://blazegraph.com > http://blog.bigdata.com > http://mapgraph.io > > Blazegraph™ is our ultra high-performance graph database that supports > both RDF/SPARQL and Tinkerpop/Blueprints APIs. MapGraph™ is our > disruptive new technology to use GPUs to accelerate data-parallel > graph analytics. > > CONFIDENTIALITY NOTICE: This email and its contents and attachments > are for the sole use of the intended recipient(s) and are confidential > or proprietary to SYSTAP. Any unauthorized review, use, disclosure, > dissemination or copying of this email or its contents or attachments > is prohibited. If you have received this communication in error, > please notify the sender by reply email and permanently delete all > copies of the email and its contents and attachments. > > > On Sun, May 10, 2015 at 7:08 AM, Ravi Prakash Putchala > <rav...@fa...> wrote: >> Hi, >> >> In the main branch of blazegraph, I found an issue in the method >> getServiceRegistrars in the file >> bigdata-jini/src/java/com/bigdata/jini/start/config/JiniCoreServicesConfiguration.java >> >> When I issue the command "bigdata start" it used to hang and ultimately >> bail out with an error. >> >> After changing >> >> if (remaining <= 0) { >> >> to: >> >> if (TimeUnit.NANOSECONDS.toMillis(remaining) <= 0) { >> >> it started working. I hope this change is the right fix for the issue. >> >> I had trouble to do login in trac, so posting here. >> >> Regards, >> >> Ravi >> >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Bigdata-developers mailing list >> Big...@li... >> https://lists.sourceforge.net/lists/listinfo/bigdata-developers |