BUG# Multiple Thread try to execute some Query

Friday, 21 September 2012 · 13 messages · last reply 19 Nov 2012
SL
Samuel Lacmene21 Sep 2012 16:18 #
Hi basex-team, I'm Samuel Lacmene, a software developer by B&IT Solution. In context to change our xml-based database, we have done some research and comparison and have decided to use baseX. I was running a performance test on the database and I found a BUG (See the error message below). I started 100 Java-threads, they should try to query parallel some data in the database and all threads had the job to execute the same request 10 or 20 times. This error occured for 3 Queries in this test, after running the same time more time, I remarked that the error occurs randomly. Can you please tell me if you have an issue for this BUG? Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk at mailman.uni-konstanz.de Version: BaseX 7.3 Java: Oracle Corporation, 1.7.0 OS: Windows 7, amd64 Stack Trace: java.nio.channels.OverlappingFileLockException sun.nio.ch.SharedFileLockTable.checkList(Unknown Source) sun.nio.ch.SharedFileLockTable.add(Unknown Source) sun.nio.ch.FileChannelImpl.tryLock(Unknown Source) org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:183) org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:170) org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:81) org.basex.data.DiskData.init(DiskData.java:116) org.basex.data.DiskData.<init>(DiskData.java:86) org.basex.core.cmd.Open.open(Open.java:76) org.basex.query.QueryResources.open(QueryResources.java:234) org.basex.query.QueryResources.collection(QueryResources.java:179) org.basex.query.func.FNGen.collection(FNGen.java:117) org.basex.query.func.FNGen.value(FNGen.java:70) org.basex.query.func.StandardFunc.compile(StandardFunc.java:48) org.basex.query.path.Path.compile(Path.java:69) org.basex.query.flwor.For.compile(For.java:53) org.basex.query.flwor.For.compile(For.java:21) org.basex.query.flwor.GFLWOR.compile(GFLWOR.java:91) org.basex.query.flwor.FLWR.compile(FLWR.java:32) org.basex.query.flwor.Let.compile(Let.java:50) org.basex.query.flwor.Let.compile(Let.java:22) org.basex.query.flwor.GFLWOR.compile(GFLWOR.java:91) org.basex.query.flwor.FLWR.compile(FLWR.java:32) org.basex.query.QueryContext.analyze(QueryContext.java:231) org.basex.query.QueryContext.compile(QueryContext.java:215) org.basex.query.QueryProcessor.compile(QueryProcessor.java:65) org.basex.core.cmd.AQuery.query(AQuery.java:79) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:326) org.basex.core.Command.exec(Command.java:305) org.basex.core.Command.execute(Command.java:77) org.basex.server.ClientListener.run(ClientListener.java:150) Best regards Samuel Lacmene PS: Besuchen Sie doch mal wieder unsere Website unter www.buit-solutions.com wenn Sie erfahren möchten, welche Lösungen wir für Ihre Geschäftsprozesse anbieten. B&IT Solutions Dipl.-Kfm. Rudolf Markus Petri Lietzenburger Str. 77 10719 Berlin Tel:0049 30 8867 6099 Fax:0049 30 8867 6159 Mail:samuel.lacmene at buit-solutions.com Web: www.buit-solutions.com
CG
Christian Grün24 Sep 2012 00:10 #
Dear Samuel Lacmene , sorry for the delay, and thanks for the bug report. First of all, I'd be interested if the bug persists with the latest stable snapshot [1]? If that should be the case, I'be glad if you could provide us with a small example [2] that allows us to reproduce the issue. Thanks in advance, Christian [1] http://files.basex.org/releases/latest/ [2] http://sscce.org/
SL
Samuel Lacmene26 Sep 2012 15:31 #
Dear Christian, Thank you for the answer. I have tried to reproduce the BUG with the last Snapshot, but it still persists. So, I wrote a small example based on the factbook.xml, the bug occurred in the first 2 tests and then it has disappeared (See the example in the attachment). I have remarked that, to have more chance to see the BUG, you have to stop and start the basex-server and run the example. Best regards Samuel
Quoted text · Christian Grün · 14 lines
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen at gmail.com] Gesendet: Montag, 24. September 2012 00:10 An: samuel.lacmene at buit-solutions.com Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query Dear Samuel Lacmene , sorry for the delay, and thanks for the bug report. First of all, I'd be interested if the bug persists with the latest stable snapshot [1]? If that should be the case, I'be glad if you could provide us with a small example [2] that allows us to reproduce the issue. Thanks in advance, Christian [1] http://files.basex.org/releases/latest/ [2] http://sscce.org/
CG
Christian Grün26 Sep 2012 15:33 #
Manuel, thanks for the excellent example code. I'll give you feedback as soon as I have more information. Christian
Quoted text · Samuel Lacmene · 36 lines
On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > Dear Christian, > > Thank you for the answer. I have tried to reproduce the BUG with the last > Snapshot, but it still persists. > So, I wrote a small example based on the factbook.xml, the bug occurred in > the first 2 tests and then it has disappeared (See the example in the > attachment). > > I have remarked that, to have more chance to see the BUG, you have to stop > and start the basex-server and run the example. > > Best regards > Samuel > > > -----Ursprüngliche Nachricht----- > Von: Christian Grün [mailto:christian.gruen at gmail.com] > Gesendet: Montag, 24. September 2012 00:10 > An: samuel.lacmene at buit-solutions.com > Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > > > Dear Samuel Lacmene , > > sorry for the delay, and thanks for the bug report. First of all, I'd > be interested if the bug persists with the latest stable snapshot [1]? > If that should be the case, I'be glad if you could provide us with a > small example [2] that allows us to reproduce the issue. > > Thanks in advance, > Christian > > [1] http://files.basex.org/releases/latest/ > [2] http://sscce.org/
CG
Christian Grünin reply to Samuel Lacmene, 26 Sep 2012, 15:3126 Sep 2012 16:14 #
..some first feedback: your example causes no problems when being run from the command line. However, I managed to reproduce the bug when running your example from within Eclipse. The error won’t occur when I suppress the dump to stdout, or forward it to a file. Two questions that might help to narrow down the issue: - did you also use for Eclipse for testing? - do you manage to reproduce the bug when running the example outside Eclipse? - what happens if you suppress the text output? Thanks, Christian
Quoted text · Samuel Lacmene · 36 lines
On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > Dear Christian, > > Thank you for the answer. I have tried to reproduce the BUG with the last > Snapshot, but it still persists. > So, I wrote a small example based on the factbook.xml, the bug occurred in > the first 2 tests and then it has disappeared (See the example in the > attachment). > > I have remarked that, to have more chance to see the BUG, you have to stop > and start the basex-server and run the example. > > Best regards > Samuel > > > -----Ursprüngliche Nachricht----- > Von: Christian Grün [mailto:christian.gruen at gmail.com] > Gesendet: Montag, 24. September 2012 00:10 > An: samuel.lacmene at buit-solutions.com > Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > > > Dear Samuel Lacmene , > > sorry for the delay, and thanks for the bug report. First of all, I'd > be interested if the bug persists with the latest stable snapshot [1]? > If that should be the case, I'be glad if you could provide us with a > small example [2] that allows us to reproduce the issue. > > Thanks in advance, > Christian > > [1] http://files.basex.org/releases/latest/ > [2] http://sscce.org/
SL
Samuel Lacmene26 Sep 2012 17:40 #
... - did you also use for Eclipse for testing? Yes, I do. - do you manage to reproduce the bug when running the example outside Eclipse? I did not try it, because the bug occurs randomly. You should try it a lot of time to trigger it. Another possibility to increase the probability to see the bug is to run complex requests. - what happens if you suppress the text output? It persists. I think that has nothing to do with the text output or eclipse. It is probably a bug in the transaction manager. Best Regards, Samuel ----------------------------------------------------------------- ..some first feedback: your example causes no problems when being run from the command line. However, I managed to reproduce the bug when running your example from within Eclipse. The error won’t occur when I suppress the dump to stdout, or forward it to a file. Two questions that might help to narrow down the issue: - did you also use for Eclipse for testing? - do you manage to reproduce the bug when running the example outside Eclipse? - what happens if you suppress the text output? Thanks, Christian
Quoted text · Samuel Lacmene · 36 lines
On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > Dear Christian, > > Thank you for the answer. I have tried to reproduce the BUG with the last > Snapshot, but it still persists. > So, I wrote a small example based on the factbook.xml, the bug occurred in > the first 2 tests and then it has disappeared (See the example in the > attachment). > > I have remarked that, to have more chance to see the BUG, you have to stop > and start the basex-server and run the example. > > Best regards > Samuel > > > -----Ursprüngliche Nachricht----- > Von: Christian Grün [mailto:christian.gruen at gmail.com] > Gesendet: Montag, 24. September 2012 00:10 > An: samuel.lacmene at buit-solutions.com > Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > > > Dear Samuel Lacmene , > > sorry for the delay, and thanks for the bug report. First of all, I'd > be interested if the bug persists with the latest stable snapshot [1]? > If that should be the case, I'be glad if you could provide us with a > small example [2] that allows us to reproduce the issue. > > Thanks in advance, > Christian > > [1] http://files.basex.org/releases/latest/ > [2] http://sscce.org/
CG
Christian Grün26 Sep 2012 18:38 #
Quoted text · Samuel Lacmene · 4 lines
> I did not try it, because the bug occurs randomly. You should try it a lot > of time to trigger it. > Another possibility to increase the probability to see the bug is to run > complex requests.
I agree that this looks like a classical concurrency bug, but I still have a hard time narrowing it down, as I didn't manage yet to reproduce the problem without Eclipse and without stdout. Your test looks actually pretty similar to numerous other test cases that we've been using for a long time, e.g. the following one: https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java Maybe there's a small, but important difference that I missed by comparing the approaches? One more thought.. Have you done some testing with Java 6? I may be completely wrong, but I’m wondering if this bug is related to Java 7. We came across some other concurrency issues that did not happen with JDK/JRE 6 (some of which have already been fixed in the latest Java 7 patches). Next, you could try to adjust the maximum number of parallel readers, and see what happens. This can be done by editing the .basex configuration file [1] and adjust the PARALLEL option [2]. If the error should persist when setting the number to "1", this could indicate that the problem is not related to our concurrency model, but the (un)locking of database files. In the past, we had similar problems with deleting and re-creating files. It may sound strange, but File.delete() won't always delete a file, even if there is no lock attached to it.. Christian [1] http://docs.basex.org/wiki/Configuration#Configuration_Files [2] http://docs.basex.org/wiki/Options#PARALLEL
Quoted text · Samuel Lacmene · 57 lines
> ----------------------------------------------------------------- > > > ..some first feedback: your example causes no problems when being run > from the command line. > > However, I managed to reproduce the bug when running your example from > within Eclipse. The error won’t occur when I suppress the dump to > stdout, or forward it to a file. > > Two questions that might help to narrow down the issue: > > - did you also use for Eclipse for testing? > - do you manage to reproduce the bug when running the example outside > Eclipse? > - what happens if you suppress the text output? > > Thanks, > Christian > ___________________________________ > > On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene > <samuel.lacmene at buit-solutions.com> wrote: >> Dear Christian, >> >> Thank you for the answer. I have tried to reproduce the BUG with the last >> Snapshot, but it still persists. >> So, I wrote a small example based on the factbook.xml, the bug occurred in >> the first 2 tests and then it has disappeared (See the example in the >> attachment). >> >> I have remarked that, to have more chance to see the BUG, you have to stop >> and start the basex-server and run the example. >> >> Best regards >> Samuel >> >> >> -----Ursprüngliche Nachricht----- >> Von: Christian Grün [mailto:christian.gruen at gmail.com] >> Gesendet: Montag, 24. September 2012 00:10 >> An: samuel.lacmene at buit-solutions.com >> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query >> >> >> Dear Samuel Lacmene , >> >> sorry for the delay, and thanks for the bug report. First of all, I'd >> be interested if the bug persists with the latest stable snapshot [1]? >> If that should be the case, I'be glad if you could provide us with a >> small example [2] that allows us to reproduce the issue. >> >> Thanks in advance, >> Christian >> >> [1] http://files.basex.org/releases/latest/ >> [2] http://sscce.org/
SL
Samuel Lacmene27 Sep 2012 18:11 #
I have only tested it with Java 7. I have adjusted the PARALLEL option to 1, my test runs until now without problem and I hope that it will stay so. I will let you know, if this setting walk for me or not. Thank, Samuel --------------------------
Quoted text · Christian Grün · 4 lines
> I did not try it, because the bug occurs randomly. You should try it a lot > of time to trigger it. > Another possibility to increase the probability to see the bug is to run > complex requests.
I agree that this looks like a classical concurrency bug, but I still have a hard time narrowing it down, as I didn't manage yet to reproduce the problem without Eclipse and without stdout. Your test looks actually pretty similar to numerous other test cases that we've been using for a long time, e.g. the following one: https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java Maybe there's a small, but important difference that I missed by comparing the approaches? One more thought.. Have you done some testing with Java 6? I may be completely wrong, but I’m wondering if this bug is related to Java 7. We came across some other concurrency issues that did not happen with JDK/JRE 6 (some of which have already been fixed in the latest Java 7 patches). Next, you could try to adjust the maximum number of parallel readers, and see what happens. This can be done by editing the .basex configuration file [1] and adjust the PARALLEL option [2]. If the error should persist when setting the number to "1", this could indicate that the problem is not related to our concurrency model, but the (un)locking of database files. In the past, we had similar problems with deleting and re-creating files. It may sound strange, but File.delete() won't always delete a file, even if there is no lock attached to it.. Christian [1] http://docs.basex.org/wiki/Configuration#Configuration_Files [2] http://docs.basex.org/wiki/Options#PARALLEL
Quoted text · Christian Grün · 57 lines
> ----------------------------------------------------------------- > > > ..some first feedback: your example causes no problems when being run > from the command line. > > However, I managed to reproduce the bug when running your example from > within Eclipse. The error won’t occur when I suppress the dump to > stdout, or forward it to a file. > > Two questions that might help to narrow down the issue: > > - did you also use for Eclipse for testing? > - do you manage to reproduce the bug when running the example outside > Eclipse? > - what happens if you suppress the text output? > > Thanks, > Christian > ___________________________________ > > On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene > <samuel.lacmene at buit-solutions.com> wrote: >> Dear Christian, >> >> Thank you for the answer. I have tried to reproduce the BUG with the last >> Snapshot, but it still persists. >> So, I wrote a small example based on the factbook.xml, the bug occurred in >> the first 2 tests and then it has disappeared (See the example in the >> attachment). >> >> I have remarked that, to have more chance to see the BUG, you have to stop >> and start the basex-server and run the example. >> >> Best regards >> Samuel >> >> >> -----Ursprüngliche Nachricht----- >> Von: Christian Grün [mailto:christian.gruen at gmail.com] >> Gesendet: Montag, 24. September 2012 00:10 >> An: samuel.lacmene at buit-solutions.com >> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query >> >> >> Dear Samuel Lacmene , >> >> sorry for the delay, and thanks for the bug report. First of all, I'd >> be interested if the bug persists with the latest stable snapshot [1]? >> If that should be the case, I'be glad if you could provide us with a >> small example [2] that allows us to reproduce the issue. >> >> Thanks in advance, >> Christian >> >> [1] http://files.basex.org/releases/latest/ >> [2] http://sscce.org/
CG
Christian Grün27 Sep 2012 18:22 #
Thanks. I have asked Lukas, another member of our team, to do some more testing; he will soon tell you about his experiences.
Quoted text · Samuel Lacmene · 111 lines
On Thu, Sep 27, 2012 at 6:11 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > I have only tested it with Java 7. > > I have adjusted the PARALLEL option to 1, my test runs until now without > problem and I hope that it will stay so. > I will let you know, if this setting walk for me or not. > > Thank, > Samuel > > > -------------------------- > > >> I did not try it, because the bug occurs randomly. You should try it a lot >> of time to trigger it. >> Another possibility to increase the probability to see the bug is to run >> complex requests. > > I agree that this looks like a classical concurrency bug, but I still > have a hard time narrowing it down, as I didn't manage yet to > reproduce the problem without Eclipse and without stdout. Your test > looks actually pretty similar to numerous other test cases that we've > been using for a long time, e.g. the following one: > > https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java > > Maybe there's a small, but important difference that I missed by > comparing the approaches? > > One more thought.. Have you done some testing with Java 6? I may be > completely wrong, but I’m wondering if this bug is related to Java 7. > We came across some other concurrency issues that did not happen with > JDK/JRE 6 (some of which have already been fixed in the latest Java 7 > patches). > > Next, you could try to adjust the maximum number of parallel readers, > and see what happens. This can be done by editing the .basex > configuration file [1] and adjust the PARALLEL option [2]. If the > error should persist when setting the number to "1", this could > indicate that the problem is not related to our concurrency model, but > the (un)locking of database files. In the past, we had similar > problems with deleting and re-creating files. It may sound strange, > but File.delete() won't always delete a file, even if there is no lock > attached to it.. > > Christian > > [1] http://docs.basex.org/wiki/Configuration#Configuration_Files > [2] http://docs.basex.org/wiki/Options#PARALLEL > >> ----------------------------------------------------------------- >> >> >> ..some first feedback: your example causes no problems when being run >> from the command line. >> >> However, I managed to reproduce the bug when running your example from >> within Eclipse. The error won’t occur when I suppress the dump to >> stdout, or forward it to a file. >> >> Two questions that might help to narrow down the issue: >> >> - did you also use for Eclipse for testing? >> - do you manage to reproduce the bug when running the example outside >> Eclipse? >> - what happens if you suppress the text output? >> >> Thanks, >> Christian >> ___________________________________ >> >> On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene >> <samuel.lacmene at buit-solutions.com> wrote: >>> Dear Christian, >>> >>> Thank you for the answer. I have tried to reproduce the BUG with the last >>> Snapshot, but it still persists. >>> So, I wrote a small example based on the factbook.xml, the bug occurred >>> in >>> the first 2 tests and then it has disappeared (See the example in the >>> attachment). >>> >>> I have remarked that, to have more chance to see the BUG, you have to >>> stop >>> and start the basex-server and run the example. >>> >>> Best regards >>> Samuel >>> >>> >>> -----Ursprüngliche Nachricht----- >>> Von: Christian Grün [mailto:christian.gruen at gmail.com] >>> Gesendet: Montag, 24. September 2012 00:10 >>> An: samuel.lacmene at buit-solutions.com >>> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query >>> >>> >>> Dear Samuel Lacmene , >>> >>> sorry for the delay, and thanks for the bug report. First of all, I'd >>> be interested if the bug persists with the latest stable snapshot [1]? >>> If that should be the case, I'be glad if you could provide us with a >>> small example [2] that allows us to reproduce the issue. >>> >>> Thanks in advance, >>> Christian >>> >>> [1] http://files.basex.org/releases/latest/ >>> [2] http://sscce.org/
LK
Lukas Kircherin reply to Samuel Lacmene, 27 Sep 2012, 18:1128 Sep 2012 14:23 #
Hi Samuel, testing on my machine (OSX 10.8, Java 7) I can only report what you already came across yourself: - activating/deactivation output makes no difference - Java 6/7 makes no difference - limiting PARALLEL option to 1 seems to resolve the issue As we couldn't figure out the problem on the fly I've created an [issue] on Github. Feel free to add anything if you think it might help. Thanks for your report so far! I hope the current workaround is good enough to keep you going until we figured out the real problem. Cheers, Lukas [issued] https://github.com/BaseXdb/basex/issues/574
Quoted text · Samuel Lacmene · 121 lines
On Thu, Sep 27, 2012 at 6:11 PM, Samuel Lacmene < samuel.lacmene at buit-solutions.com> wrote: > I have only tested it with Java 7. > > I have adjusted the PARALLEL option to 1, my test runs until now without > problem and I hope that it will stay so. > I will let you know, if this setting walk for me or not. > > Thank, > Samuel > > > -------------------------- > > > > I did not try it, because the bug occurs randomly. You should try it a > lot > > of time to trigger it. > > Another possibility to increase the probability to see the bug is to run > > complex requests. > > I agree that this looks like a classical concurrency bug, but I still > have a hard time narrowing it down, as I didn't manage yet to > reproduce the problem without Eclipse and without stdout. Your test > looks actually pretty similar to numerous other test cases that we've > been using for a long time, e.g. the following one: > > > https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java > > Maybe there's a small, but important difference that I missed by > comparing the approaches? > > One more thought.. Have you done some testing with Java 6? I may be > completely wrong, but I’m wondering if this bug is related to Java 7. > We came across some other concurrency issues that did not happen with > JDK/JRE 6 (some of which have already been fixed in the latest Java 7 > patches). > > Next, you could try to adjust the maximum number of parallel readers, > and see what happens. This can be done by editing the .basex > configuration file [1] and adjust the PARALLEL option [2]. If the > error should persist when setting the number to "1", this could > indicate that the problem is not related to our concurrency model, but > the (un)locking of database files. In the past, we had similar > problems with deleting and re-creating files. It may sound strange, > but File.delete() won't always delete a file, even if there is no lock > attached to it.. > > Christian > > [1] http://docs.basex.org/wiki/Configuration#Configuration_Files > [2] http://docs.basex.org/wiki/Options#PARALLEL > > > ----------------------------------------------------------------- > > > > > > ..some first feedback: your example causes no problems when being run > > from the command line. > > > > However, I managed to reproduce the bug when running your example from > > within Eclipse. The error won’t occur when I suppress the dump to > > stdout, or forward it to a file. > > > > Two questions that might help to narrow down the issue: > > > > - did you also use for Eclipse for testing? > > - do you manage to reproduce the bug when running the example outside > > Eclipse? > > - what happens if you suppress the text output? > > > > Thanks, > > Christian > > ___________________________________ > > > > On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene > > <samuel.lacmene at buit-solutions.com> wrote: > >> Dear Christian, > >> > >> Thank you for the answer. I have tried to reproduce the BUG with the > last > >> Snapshot, but it still persists. > >> So, I wrote a small example based on the factbook.xml, the bug occurred > in > >> the first 2 tests and then it has disappeared (See the example in the > >> attachment). > >> > >> I have remarked that, to have more chance to see the BUG, you have to > stop > >> and start the basex-server and run the example. > >> > >> Best regards > >> Samuel > >> > >> > >> -----Ursprüngliche Nachricht----- > >> Von: Christian Grün [mailto:christian.gruen at gmail.com] > >> Gesendet: Montag, 24. September 2012 00:10 > >> An: samuel.lacmene at buit-solutions.com > >> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > >> > >> > >> Dear Samuel Lacmene , > >> > >> sorry for the delay, and thanks for the bug report. First of all, I'd > >> be interested if the bug persists with the latest stable snapshot [1]? > >> If that should be the case, I'be glad if you could provide us with a > >> small example [2] that allows us to reproduce the issue. > >> > >> Thanks in advance, > >> Christian > >> > >> [1] http://files.basex.org/releases/latest/ > >> [2] http://sscce.org/ > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >
SL
Samuel Lacmene4 Oct 2012 17:22 #
Thank you guys. This configuration resolves the problem for me.
Quoted text · Lukas Kircher · 134 lines
-----Ursprüngliche Nachricht----- Von: Lukas Kircher [mailto:lukaskircher1 at gmail.com] Gesendet: Freitag, 28. September 2012 14:23 An: samuel.lacmene at buit-solutions.com Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query Hi Samuel, testing on my machine (OSX 10.8, Java 7) I can only report what you already came across yourself: - activating/deactivation output makes no difference - Java 6/7 makes no difference - limiting PARALLEL option to 1 seems to resolve the issue As we couldn't figure out the problem on the fly I've created an [issue] on Github. Feel free to add anything if you think it might help. Thanks for your report so far! I hope the current workaround is good enough to keep you going until we figured out the real problem. Cheers, Lukas [issued] https://github.com/BaseXdb/basex/issues/574 On Thu, Sep 27, 2012 at 6:11 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > I have only tested it with Java 7. > > I have adjusted the PARALLEL option to 1, my test runs until now without problem and I hope that it will stay so. > I will let you know, if this setting walk for me or not. > > Thank, > Samuel > > > -------------------------- > > > I did not try it, because the bug occurs randomly. You should try it a lot > > of time to trigger it. > > Another possibility to increase the probability to see the bug is to run > > complex requests. > > I agree that this looks like a classical concurrency bug, but I still > have a hard time narrowing it down, as I didn't manage yet to > reproduce the problem without Eclipse and without stdout. Your test > looks actually pretty similar to numerous other test cases that we've > been using for a long time, e.g. the following one: > > https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java > > Maybe there's a small, but important difference that I missed by > comparing the approaches? > > One more thought.. Have you done some testing with Java 6? I may be > completely wrong, but I’m wondering if this bug is related to Java 7. > We came across some other concurrency issues that did not happen with > JDK/JRE 6 (some of which have already been fixed in the latest Java 7 > patches). > > Next, you could try to adjust the maximum number of parallel readers, > and see what happens. This can be done by editing the .basex > configuration file [1] and adjust the PARALLEL option [2]. If the > error should persist when setting the number to "1", this could > indicate that the problem is not related to our concurrency model, but > the (un)locking of database files. In the past, we had similar > problems with deleting and re-creating files. It may sound strange, > but File.delete() won't always delete a file, even if there is no lock > attached to it.. > > Christian > > [1] http://docs.basex.org/wiki/Configuration#Configuration_Files > [2] http://docs.basex.org/wiki/Options#PARALLEL > > > ----------------------------------------------------------------- > > > > > > ..some first feedback: your example causes no problems when being run > > from the command line. > > > > However, I managed to reproduce the bug when running your example from > > within Eclipse. The error won’t occur when I suppress the dump to > > stdout, or forward it to a file. > > > > Two questions that might help to narrow down the issue: > > > > - did you also use for Eclipse for testing? > > - do you manage to reproduce the bug when running the example outside > > Eclipse? > > - what happens if you suppress the text output? > > > > Thanks, > > Christian > > ___________________________________ > > > > On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene > > <samuel.lacmene at buit-solutions.com> wrote: > >> Dear Christian, > >> > >> Thank you for the answer. I have tried to reproduce the BUG with the last > >> Snapshot, but it still persists. > >> So, I wrote a small example based on the factbook.xml, the bug occurred in > >> the first 2 tests and then it has disappeared (See the example in the > >> attachment). > >> > >> I have remarked that, to have more chance to see the BUG, you have to stop > >> and start the basex-server and run the example. > >> > >> Best regards > >> Samuel > >> > >> > >> -----Ursprüngliche Nachricht----- > >> Von: Christian Grün [mailto:christian.gruen at gmail.com] > >> Gesendet: Montag, 24. September 2012 00:10 > >> An: samuel.lacmene at buit-solutions.com > >> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > >> > >> > >> Dear Samuel Lacmene , > >> > >> sorry for the delay, and thanks for the bug report. First of all, I'd > >> be interested if the bug persists with the latest stable snapshot [1]? > >> If that should be the case, I'be glad if you could provide us with a > >> small example [2] that allows us to reproduce the issue. > >> > >> Thanks in advance, > >> Christian > >> > >> [1] http://files.basex.org/releases/latest/ > >> [2] http://sscce.org/ > > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
CG
Christian Grün18 Nov 2012 23:30 #
Hi Samuel, it has been a while ago, but I finally had a look at the issue you reported [1], and I’d be glad if you could have a look at the latest snapshot [2]. I cannot promise anything, but at least I didn't manage anymore to reproduce the original bug in my last tests. Thanks in advance, Christian [1] https://github.com/BaseXdb/basex/issues/574 [2] http://files.basex.org/releases/latest/
Quoted text · Samuel Lacmene · 160 lines
On Thu, Oct 4, 2012 at 5:22 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > Thank you guys. This configuration resolves the problem for me. > > -----Ursprüngliche Nachricht----- > Von: Lukas Kircher [mailto:lukaskircher1 at gmail.com] > Gesendet: Freitag, 28. September 2012 14:23 > > An: samuel.lacmene at buit-solutions.com > Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > > > Hi Samuel, > > testing on my machine (OSX 10.8, Java 7) I can only report > what you already came across yourself: > > - activating/deactivation output makes no difference > - Java 6/7 makes no difference > - limiting PARALLEL option to 1 seems to resolve the issue > > As we couldn't figure out the problem on the fly I've created > an [issue] on Github. Feel free to add anything if you think it > might help. > > Thanks for your report so far! I hope the current workaround > is good enough to keep you going until we figured out the real > problem. > > > Cheers, > Lukas > > > [issued] https://github.com/BaseXdb/basex/issues/574 > > > On Thu, Sep 27, 2012 at 6:11 PM, Samuel Lacmene > <samuel.lacmene at buit-solutions.com> wrote: >> >> I have only tested it with Java 7. >> >> I have adjusted the PARALLEL option to 1, my test runs until now without >> problem and I hope that it will stay so. >> I will let you know, if this setting walk for me or not. >> >> Thank, >> Samuel >> >> >> -------------------------- >> >> >> > I did not try it, because the bug occurs randomly. You should try it a >> > lot >> > of time to trigger it. >> > Another possibility to increase the probability to see the bug is to run >> > complex requests. >> >> I agree that this looks like a classical concurrency bug, but I still >> have a hard time narrowing it down, as I didn't manage yet to >> reproduce the problem without Eclipse and without stdout. Your test >> looks actually pretty similar to numerous other test cases that we've >> been using for a long time, e.g. the following one: >> >> >> https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java >> >> Maybe there's a small, but important difference that I missed by >> comparing the approaches? >> >> One more thought.. Have you done some testing with Java 6? I may be >> completely wrong, but I’m wondering if this bug is related to Java 7. >> We came across some other concurrency issues that did not happen with >> JDK/JRE 6 (some of which have already been fixed in the latest Java 7 >> patches). >> >> Next, you could try to adjust the maximum number of parallel readers, >> and see what happens. This can be done by editing the .basex >> configuration file [1] and adjust the PARALLEL option [2]. If the >> error should persist when setting the number to "1", this could >> indicate that the problem is not related to our concurrency model, but >> the (un)locking of database files. In the past, we had similar >> problems with deleting and re-creating files. It may sound strange, >> but File.delete() won't always delete a file, even if there is no lock >> attached to it.. >> >> Christian >> >> [1] http://docs.basex.org/wiki/Configuration#Configuration_Files >> [2] http://docs.basex.org/wiki/Options#PARALLEL >> >> > ----------------------------------------------------------------- >> > >> > >> > ..some first feedback: your example causes no problems when being run >> > from the command line. >> > >> > However, I managed to reproduce the bug when running your example from >> > within Eclipse. The error won’t occur when I suppress the dump to >> > stdout, or forward it to a file. >> > >> > Two questions that might help to narrow down the issue: >> > >> > - did you also use for Eclipse for testing? >> > - do you manage to reproduce the bug when running the example outside >> > Eclipse? >> > - what happens if you suppress the text output? >> > >> > Thanks, >> > Christian >> > ___________________________________ >> > >> > On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene >> > <samuel.lacmene at buit-solutions.com> wrote: >> >> Dear Christian, >> >> >> >> Thank you for the answer. I have tried to reproduce the BUG with the >> >> last >> >> Snapshot, but it still persists. >> >> So, I wrote a small example based on the factbook.xml, the bug occurred >> >> in >> >> the first 2 tests and then it has disappeared (See the example in the >> >> attachment). >> >> >> >> I have remarked that, to have more chance to see the BUG, you have to >> >> stop >> >> and start the basex-server and run the example. >> >> >> >> Best regards >> >> Samuel >> >> >> >> >> >> -----Ursprüngliche Nachricht----- >> >> Von: Christian Grün [mailto:christian.gruen at gmail.com] >> >> Gesendet: Montag, 24. September 2012 00:10 >> >> An: samuel.lacmene at buit-solutions.com >> >> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some >> >> Query >> >> >> >> >> >> Dear Samuel Lacmene , >> >> >> >> sorry for the delay, and thanks for the bug report. First of all, I'd >> >> be interested if the bug persists with the latest stable snapshot [1]? >> >> If that should be the case, I'be glad if you could provide us with a >> >> small example [2] that allows us to reproduce the issue. >> >> >> >> Thanks in advance, >> >> Christian >> >> >> >> [1] http://files.basex.org/releases/latest/ >> >> [2] http://sscce.org/ >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >
SL
Samuel Lacmene19 Nov 2012 13:39 #
Hi Christian, I have downloaded the latest snapshot [1]. After awhile testing, I could not reproduce the bug. I used also the default setting of basex (I didn't change the value of PARALLEL), and my test computer has Windows 7 and Java 6. I thint that this snapshot solved the problem. Thanks you for the support, Samuel [1] http://files.basex.org/releases/latest/
Quoted text · Christian Grün · 174 lines
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen at gmail.com] Gesendet: Sonntag, 18. November 2012 23:30 An: samuel.lacmene at buit-solutions.com Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query Hi Samuel, it has been a while ago, but I finally had a look at the issue you reported [1], and I’d be glad if you could have a look at the latest snapshot [2]. I cannot promise anything, but at least I didn't manage anymore to reproduce the original bug in my last tests. Thanks in advance, Christian [1] https://github.com/BaseXdb/basex/issues/574 [2] http://files.basex.org/releases/latest/ On Thu, Oct 4, 2012 at 5:22 PM, Samuel Lacmene <samuel.lacmene at buit-solutions.com> wrote: > Thank you guys. This configuration resolves the problem for me. > > -----Ursprüngliche Nachricht----- > Von: Lukas Kircher [mailto:lukaskircher1 at gmail.com] > Gesendet: Freitag, 28. September 2012 14:23 > > An: samuel.lacmene at buit-solutions.com > Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some Query > > > Hi Samuel, > > testing on my machine (OSX 10.8, Java 7) I can only report > what you already came across yourself: > > - activating/deactivation output makes no difference > - Java 6/7 makes no difference > - limiting PARALLEL option to 1 seems to resolve the issue > > As we couldn't figure out the problem on the fly I've created > an [issue] on Github. Feel free to add anything if you think it > might help. > > Thanks for your report so far! I hope the current workaround > is good enough to keep you going until we figured out the real > problem. > > > Cheers, > Lukas > > > [issued] https://github.com/BaseXdb/basex/issues/574 > > > On Thu, Sep 27, 2012 at 6:11 PM, Samuel Lacmene > <samuel.lacmene at buit-solutions.com> wrote: >> >> I have only tested it with Java 7. >> >> I have adjusted the PARALLEL option to 1, my test runs until now without >> problem and I hope that it will stay so. >> I will let you know, if this setting walk for me or not. >> >> Thank, >> Samuel >> >> >> -------------------------- >> >> >> > I did not try it, because the bug occurs randomly. You should try it a >> > lot >> > of time to trigger it. >> > Another possibility to increase the probability to see the bug is to run >> > complex requests. >> >> I agree that this looks like a classical concurrency bug, but I still >> have a hard time narrowing it down, as I didn't manage yet to >> reproduce the problem without Eclipse and without stdout. Your test >> looks actually pretty similar to numerous other test cases that we've >> been using for a long time, e.g. the following one: >> >> >> https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/ServerStressTest.java >> >> Maybe there's a small, but important difference that I missed by >> comparing the approaches? >> >> One more thought.. Have you done some testing with Java 6? I may be >> completely wrong, but I’m wondering if this bug is related to Java 7. >> We came across some other concurrency issues that did not happen with >> JDK/JRE 6 (some of which have already been fixed in the latest Java 7 >> patches). >> >> Next, you could try to adjust the maximum number of parallel readers, >> and see what happens. This can be done by editing the .basex >> configuration file [1] and adjust the PARALLEL option [2]. If the >> error should persist when setting the number to "1", this could >> indicate that the problem is not related to our concurrency model, but >> the (un)locking of database files. In the past, we had similar >> problems with deleting and re-creating files. It may sound strange, >> but File.delete() won't always delete a file, even if there is no lock >> attached to it.. >> >> Christian >> >> [1] http://docs.basex.org/wiki/Configuration#Configuration_Files >> [2] http://docs.basex.org/wiki/Options#PARALLEL >> >> > ----------------------------------------------------------------- >> > >> > >> > ..some first feedback: your example causes no problems when being run >> > from the command line. >> > >> > However, I managed to reproduce the bug when running your example from >> > within Eclipse. The error won’t occur when I suppress the dump to >> > stdout, or forward it to a file. >> > >> > Two questions that might help to narrow down the issue: >> > >> > - did you also use for Eclipse for testing? >> > - do you manage to reproduce the bug when running the example outside >> > Eclipse? >> > - what happens if you suppress the text output? >> > >> > Thanks, >> > Christian >> > ___________________________________ >> > >> > On Wed, Sep 26, 2012 at 3:31 PM, Samuel Lacmene >> > <samuel.lacmene at buit-solutions.com> wrote: >> >> Dear Christian, >> >> >> >> Thank you for the answer. I have tried to reproduce the BUG with the >> >> last >> >> Snapshot, but it still persists. >> >> So, I wrote a small example based on the factbook.xml, the bug occurred >> >> in >> >> the first 2 tests and then it has disappeared (See the example in the >> >> attachment). >> >> >> >> I have remarked that, to have more chance to see the BUG, you have to >> >> stop >> >> and start the basex-server and run the example. >> >> >> >> Best regards >> >> Samuel >> >> >> >> >> >> -----Ursprüngliche Nachricht----- >> >> Von: Christian Grün [mailto:christian.gruen at gmail.com] >> >> Gesendet: Montag, 24. September 2012 00:10 >> >> An: samuel.lacmene at buit-solutions.com >> >> Betreff: Re: [basex-talk] BUG# Multiple Thread try to execute some >> >> Query >> >> >> >> >> >> Dear Samuel Lacmene , >> >> >> >> sorry for the delay, and thanks for the bug report. First of all, I'd >> >> be interested if the bug persists with the latest stable snapshot [1]? >> >> If that should be the case, I'be glad if you could provide us with a >> >> small example [2] that allows us to reproduce the issue. >> >> >> >> Thanks in advance, >> >> Christian >> >> >> >> [1] http://files.basex.org/releases/latest/ >> >> [2] http://sscce.org/ >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >

⚡Generated with XQuery