Git Product home page Git Product logo

Comments (7)

cholcombe973 avatar cholcombe973 commented on May 24, 2024

I added some println statements to see if maybe the db connection was null or if the statement length wasn't right. Nothing obvious is coming up. This is the query that is breaking. When I execute it from the sqlite CLI it returns nothing.

path="/home/ubuntu/test/test1" mtime=1479232483 nsec=800923063 size=0
db: 0x7fcdaad82008
len_with_nul: 84
sql: SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?

from rusqlite.

cholcombe973 avatar cholcombe973 commented on May 24, 2024

Here's the backtrace:

#0  sqlite3WhereClauseClear (pWC=0x7fffea45f560) at sqlite3.c:123127
#1  0x00007fffee1cc5b1 in whereInfoFree (db=0x7fffea582008, pWInfo=0x7fffea45f408) at sqlite3.c:125022
#2  0x00007fffee20c044 in sqlite3Select (pParse=pParse@entry=0x7fffea454808, p=<optimized out>, 
    pDest=pDest@entry=0x7fffffff2a30) at sqlite3.c:115416
#3  0x00007fffee237bde in yy_reduce (yyruleno=111, yypParser=0x7fffea465008) at sqlite3.c:130315
#4  sqlite3Parser (yyp=yyp@entry=0x7fffea465008, yymajor=yymajor@entry=1, yyminor=..., 
    pParse=pParse@entry=0x7fffea454808) at sqlite3.c:331
#5  0x00007fffee23b9f0 in sqlite3RunParser (pParse=pParse@entry=0x7fffea454808, 
    zSql=zSql@entry=0x7fffea589300 "SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?", pzErrMsg=pzErrMsg@entry=0x7fffffff2b60) at sqlite3.c:132342
#6  0x00007fffee23c082 in sqlite3Prepare (db=db@entry=0x7fffea582008, 
    zSql=zSql@entry=0x7fffea589300 "SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?", nBytes=nBytes@entry=84, saveSqlFlag=saveSqlFlag@entry=1, pReprepare=pReprepare@entry=0x0, 
    ppStmt=ppStmt@entry=0x7fffffff2da8, pzTail=0x0) at sqlite3.c:109991
#7  0x00007fffee23c40a in sqlite3LockAndPrepare (db=0x7fffea582008, 
    zSql=0x7fffea589300 "SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?", 
    nBytes=84, saveSqlFlag=1, pOld=0x0, ppStmt=0x7fffffff2da8, pzTail=0x0) at sqlite3.c:110083
#8  0x00007fffee23c6e6 in sqlite3_prepare_v2 (db=<optimized out>, zSql=<optimized out>, nBytes=<optimized out>, 
    ppStmt=<optimized out>, pzTail=<optimized out>) at sqlite3.c:110159
#9  0x00005555556ae20e in rusqlite::{{impl}}::prepare (sql=..., self=<optimized out>, conn=<optimized out>)
    at /home/chris/repos/rusqlite/src/lib.rs:665

from rusqlite.

gwenn avatar gwenn commented on May 24, 2024

Do you know which version of SQLite you are using (the one rusqlite is linked to) ?
You can call println!("{:?}", libsqlite3_sys::sqlite3_version) or SELECT sqlite_version().
Thanks.

from rusqlite.

cholcombe973 avatar cholcombe973 commented on May 24, 2024

I believe it's this:

ii  libsqlite3-0:amd64                   3.11.0-1ubuntu1                   amd64        SQLite 3 shared library
ii  libsqlite3-0-dbg                     3.11.0-1ubuntu1                   amd64        SQLite 3 debugging symbols
ii  libsqlite3-dev:amd64                 3.11.0-1ubuntu1                   amd64        SQLite 3 development files

from rusqlite.

gwenn avatar gwenn commented on May 24, 2024

Why pWC->a is null (sqlite3.c:123127) ?
Maybe an allocation problem in whereClauseInsert ?

from rusqlite.

cholcombe973 avatar cholcombe973 commented on May 24, 2024

I'm not sure if the problem is my FFI Ceph bindings I created or the sqlite bindings. Yeah the pWC->a null is very strange. It could be that my bindings are messing something up and sqlite is blowing up because of it or maybe my stuff isn't related. I can't tell yet.

from rusqlite.

cholcombe973 avatar cholcombe973 commented on May 24, 2024

Ok we can close this issue. I tracked it down with valgrind. My library was using some bogus pointers and it was causing sqlite to blow up. There's no problem with the sqlite library :)

from rusqlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.