From: ryan <ry...@os...> - 2014-10-08 12:36:48
|
Here's a simpler version of the code: just compile and run. The setup is one thread starts the repository, and another thread closes it. An exception is thrown. ry On Tuesday, October 07, 2014 05:31:28 PM Bryan Thompson wrote: > I still do not understand the setup you have going. It sounds simple > enough, but what "app" are you clicking on? What list? > > Please reduce this to code so we can replicate the issue and then we can > take a look at it. > > For example, a unit test would be great. That way we can get the test into > the regression suite as well. > > Thanks, > Bryan > > ---- > Bryan Thompson > Chief Scientist & Founder > SYSTAP, LLC > 4501 Tower Road > Greensboro, NC 27410 > br...@sy... > http://bigdata.com > http://mapgraph.io > > 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 Tue, Oct 7, 2014 at 5:13 PM, ryan <ry...@os...> wrote: > > With that example, I'm just starting and stopping a local journal file > > directly. No webserver involved. > > > > > > Bryan Thompson <br...@sy...> wrote: > > > > Are you running the NanoSparqlServer or the sesame workbench? > > > > Bryan > > > > ---- > > Bryan Thompson > > Chief Scientist & Founder > > SYSTAP, LLC > > 4501 Tower Road > > Greensboro, NC 27410 > > br...@sy... > > http://bigdata.com > > http://mapgraph.io > > > > 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 Tue, Oct 7, 2014 at 4:29 PM, ryan <ry...@os...> wrote: > >> Here's a (non)working sample. I haven't included my RWStore.properties > >> file, > >> but I don't think it matters. > >> > >> Basically, start the app with a directory containing an > >> RWStore.properties > >> file, then click on it from the list. The repository gets created in one > >> thread, and closed in another, and it bombs. > >> > >> Thanks for your help, > >> > >> ry > >> > >> On Tuesday, October 07, 2014 10:00:29 AM Bryan Thompson wrote: > >> > Can you provide a simple Java class that illustrates the problem? The > >> > unisolated connection close logic is below. If the connection is > >> > >> already > >> > >> > closed, it should return immediately. I suspect that the problem is > >> > >> with > >> > >> > the invocation of > >> > > >> > >>> BigdataSail.*this*.connectionClosed(*this*); > >> > > >> > which notifies the base SAIL that the connection is closed. > >> > > >> > However, this problem does not show up in our tests so we would need an > >> > example in order to replicate it. > >> > > >> > Thanks, > >> > Bryan > >> > > >> > *public* *synchronized* *void* close() *throws* SailException { > >> > > >> > // assertOpen(); > >> > > >> > *if* (!openConn) { > >> > > >> > *return*; > >> > > >> > } > >> > > >> > > >> > > >> > *if* (*txLog*.isInfoEnabled()) > >> > > >> > *txLog*.info("SAIL-CLOSE-CONN: conn=" + *this*); > >> > > >> > *final* IIndexManager im = getDatabase().getIndexManager(); > >> > > >> > > >> > *if* (isDirty()) { > >> > > >> > /* > >> > > >> > * Do implicit rollback() of a dirty connection. > >> > > >> > */ > >> > > >> > rollback(); > >> > > >> > } > >> > > >> > > >> > > >> > *try* { > >> > > >> > // notify the SailBase that the connection is no longer > >> > >> in > >> > >> > use. > >> > > >> > BigdataSail.*this*.connectionClosed(*this*); > >> > > >> > } *finally* { > >> > > >> > *if* (lock != *null*) { > >> > > >> > // release the reentrant lock > >> > > >> > lock.unlock(); > >> > > >> > } > >> > > >> > *if* (unisolated && im *instanceof* Journal) { > >> > > >> > // release the permit. > >> > > >> > ((Journal) im).releaseUnisolatedConnection(); > >> > > >> > } > >> > > >> > openConn = *false*; > >> > > >> > } > >> > > >> > } > >> > > >> > ---- > >> > Bryan Thompson > >> > Chief Scientist & Founder > >> > SYSTAP, LLC > >> > 4501 Tower Road > >> > Greensboro, NC 27410 > >> > br...@sy... > >> > http://bigdata.com > >> > http://mapgraph.io > >> > > >> > 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 Tue, Oct 7, 2014 at 9:36 AM, ryan <ry...@os...> > >> > >> wrote: > >> > > Hi All, > >> > > I'm trying to add a feature to my project that will allow a user to > >> > > disconnect > >> > > from a locally-connected BigData (1.3.1) engine, start up the network > >> > > server, > >> > > and reconnect to the now-networked repository. > >> > > > >> > > The problem is that every time I I try to close my local connection, > >> > >> I get > >> > >> > > an > >> > > IllegalMonitorStateException that appears to be preventing the > >> > > network > >> > > server > >> > > from working correctly. > >> > > > >> > > The pertinent stack trace is: > >> > > java.lang.IllegalMonitorStateException > >> > > > >> > > at > >> > >> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryRelease(Reentra > >> n > >> > >> > > tReadWriteLock.java:374)> > >> > > > >> > > at > >> > >> java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQue > >> u > >> > >> > > edSynchronizer.java:1260)> > >> > > > >> > > at > >> > >> java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock(Reentr > >> a > >> > >> > > ntReadWriteLock.java:1131)> > >> > > > >> > > at > >> > >> com.bigdata.rdf.sail.BigdataSail$BigdataSailConnection.close(BigdataSail. > >> j > >> > >> > > ava:3349)> > >> > > > >> > > at > >> > >> org.openrdf.repository.sail.SailRepositoryConnection.close(SailRepository > >> C > >> > >> > > onnection.java:109) > >> > > > >> > > > >> > > With the default OpenRDF backing store, the system will wait a little > >> > >> bit, > >> > >> > > and > >> > > then close connections for you if you don't close them first. I've > >> > >> tried > >> > >> > > both > >> > > ways (closing the connection first, then the repository, and just > >> > >> closing > >> > >> > > the > >> > > repository) with no difference. > >> > > > >> > > I'm running on java 1.7, bigdata 1.3.1, on a linux host. > >> > > > >> > > I'm at a loss for troubleshooting. I'd be grateful for any advice you > >> > > might > >> > > have. > >> > > > >> > > Thanks, > >> > > ry > >> > > > >> > > -- > >> > > ...you can't have five wolves and one sheep voting on what to have > >> > > for > >> > > supper. > >> > > > >> > > --Larry Flint > >> > >> ------------------------------------------------------------------------- > >> - > >> > >> > > ---- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > >> > > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS > >> > >> Reports > >> > >> > > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > >> > > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clk > >> t > >> > >> > > rk _______________________________________________ > >> > > Bigdata-developers mailing list > >> > > Big...@li... > >> > > https://lists.sourceforge.net/lists/listinfo/bigdata-developers > >> > >> -- > >> Four boxes to be used in defense of liberty: soap, ballot, jury, ammo - > >> use in > >> that order. > >> > >> --Ed Howdershelt -- Psychos don't burst into flames when sunlight hits them. I don't [care] how crazy they are. |