dariober / ASCIIGenome

Text Only Genome Viewer!
http://asciigenome.readthedocs.io/en/latest/description.html
MIT License
206 stars 14 forks source link

Cannot create sqlite database: [SQLITE_IOERR_LOCK] I/O error in the advisory file locking logic (disk I/O error) #87

Closed dariober closed 6 years ago

dariober commented 6 years ago

It appears that on some file systems or some configurations thereof, the sqlite database has I/O issues. E.g. on lustre:

java -jar ~/Tritume/ASCIIGenome/build/libs/ASCIIGenome.jar /scratch/dberaldi/git_repos/cnv_facets/test/data/annotation.bed 

Initializing coordinates... Done from: /scratch/dberaldi/git_repos/cnv_facets/test/data/annotation.bed
Header line specifying VCF version not found. Setting version to: VCFv4.1
org.sqlite.SQLiteException: [SQLITE_IOERR_LOCK]  I/O error in the advisory file locking logic (disk I/O error)
    at org.sqlite.core.DB.newSQLException(DB.java:909)
    at org.sqlite.core.DB.newSQLException(DB.java:921)
    at org.sqlite.core.DB.throwex(DB.java:886)
    at org.sqlite.core.NativeDB._exec_utf8(Native Method)
    at org.sqlite.core.NativeDB._exec(NativeDB.java:87)
    at org.sqlite.jdbc3.JDBC3Statement.executeUpdate(JDBC3Statement.java:116)
    at sortBgzipIndex.MakeTabixIndex.createSQLiteDb(MakeTabixIndex.java:267)
    at sortBgzipIndex.MakeTabixIndex.sortByChromThenPos(MakeTabixIndex.java:204)
    at sortBgzipIndex.MakeTabixIndex.<init>(MakeTabixIndex.java:61)
    at tracks.TrackIntervalFeature.<init>(TrackIntervalFeature.java:79)
    at tracks.TrackSet.<init>(TrackSet.java:81)
    at samTextViewer.Main.main(Main.java:119)
null
java.lang.NullPointerException
    at sortBgzipIndex.MakeTabixIndex.sortByChromThenPos(MakeTabixIndex.java:205)
    at sortBgzipIndex.MakeTabixIndex.<init>(MakeTabixIndex.java:61)
    at tracks.TrackIntervalFeature.<init>(TrackIntervalFeature.java:79)
    at tracks.TrackSet.<init>(TrackSet.java:81)
    at samTextViewer.Main.main(Main.java:119)
Cannot add /scratch/dberaldi/git_repos/cnv_facets/test/data/annotation.bed; skipping

This problem seems to be all within sqlite3 rather than with ASCIIGenome. This works:

sqlite3 ~/example.db 'CREATE TABLE foo (date text)';

But the same fails when trying to write to lustre:

sqlite3 /scratch/dberaldi/example.db 'CREATE TABLE foo (date text)';
Error: disk I/O error

(Permissions to read/write checked as well as disk space availability)

dariober commented 6 years ago

Fixed in b895ef3 (upcoming version 1.15.0)