Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2017-01-02 Thread Anatolii K
I created separate topic for this bug https://groups.google.com/forum/#!topic/h2-database/rhSoRhzeZzk -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-22 Thread Anatolii K
Please try attached test. It fails after 10-60 seconds run org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: File corrupted in chunk 28, expected page length 4..32, got -1621686845 [1.4.193/6]"; SQL statement: update account set balance = ? where id = ? [5-193]

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-22 Thread Thomas Mueller Graf
Hi, I didn't see a failure either. Regards, Thomas On Thu, Dec 22, 2016 at 10:13 AM, Noel Grandin wrote: > > > On 2016/12/21 7:24 PM, Anatolii K wrote: > >> Test attached >> >> > Are you definitely testing with the latest HEAD? Because I ran your test > for 10 minutes

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-22 Thread Noel Grandin
On 2016/12/21 7:24 PM, Anatolii K wrote: Test attached Are you definitely testing with the latest HEAD? Because I ran your test for 10 minutes without problems. On 64-bit JDK 1.8.0_111 -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
Test attached On Wednesday, December 21, 2016 at 8:41:44 PM UTC+5, Thomas Mueller Graf wrote: > > Hi, > > I guess that bug would be on my plate... I recently made changes there > (trying to improve concurrency). I'm sorry about that. Having a test case > would be great! > > Regards, > Thomas >

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
org.h2.jdbc.JdbcSQLException: General error: "java.nio.BufferUnderflowException"; SQL statement: UPDATE account set balance = ? where id = ? [5-193] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
The bug is reproduced only in multi-thread application On Wednesday, December 21, 2016 at 8:41:44 PM UTC+5, Thomas Mueller Graf wrote: > > Hi, > > I guess that bug would be on my plate... I recently made changes there > (trying to improve concurrency). I'm sorry about that. Having a test case

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Thomas Mueller Graf
Hi, I guess that bug would be on my plate... I recently made changes there (trying to improve concurrency). I'm sorry about that. Having a test case would be great! Regards, Thomas On Wed, Dec 21, 2016 at 3:56 PM, Noel Grandin wrote: > Can we get a full stack trace

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Noel Grandin
Can we get a full stack trace for that failure.​ -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group,

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
Without split it also failed (url jdbc:h2:nioMemLZF:db): Caused by: java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:500) On Wednesday, December 21, 2016 at 7:50:31 PM UTC+5, Noel Grandin wrote: > > then let's fix that problem, but I'm not really keen on trying to

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Noel Grandin
then let's fix that problem, but I'm not really keen on trying to fix a combination crash like that. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
I have very big in-memory database ~ 1TB. Without split H2 crashes On Wednesday, December 21, 2016 at 7:43:13 PM UTC+5, Noel Grandin wrote: > > I'm sorry, but that's just a silly combination to be using. > > You should only using be "split:" for FAT filesystems, and you should > certainly not

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Noel Grandin
I'm sorry, but that's just a silly combination to be using. You should only using be "split:" for FAT filesystems, and you should certainly not be using it in combination with "nioMemLZF:" -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
After applying this patch I'm getting following error with nioMemLZF (url= jdbc:h2:split:30:nioMemLZF:db): org.h2.jdbc.JdbcSQLException: General error: "java.nio.BufferUnderflowException"; SQL statement: UPDATE account set balance = ? where id = ? [5-193] at

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Anatolii K
Thank you for quick help! On Wednesday, December 21, 2016 at 3:55:32 PM UTC+5, Noel Grandin wrote: > > It appears I was wrong about this, we already implement reading/writing > without synchronisation for all of our other > file implementations, I just missed that you are using the "split:"

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Noel Grandin
It appears I was wrong about this, we already implement reading/writing without synchronisation for all of our other file implementations, I just missed that you are using the "split:" stuff. I have pushed a fix for this. -- You received this message because you are subscribed to the Google

Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-20 Thread Noel Grandin
Not without changing the structure considerably - FileBase inherits from java.nio.channels.FileChannel, which has a position field, and multiple things changing that at the same time would cause problems. We'd probably need to switch to using Java's asynchronous IO API to avoid that, which is

[h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-20 Thread Anatolii K
Hi I see a lot of thread blocked at java.lang.Thread.State: BLOCKED (on object monitor) at org.h2.store.fs.FileBase.read(FileBase.java:39) - waiting to lock <0x0006f1dfcdd0> (a org.h2.store.fs.FileSplit) at org.h2.mvstore.DataUtils.readFully(DataUtils.java:421) at