Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittently crashes when sqlite3_prepare_v2 called with sqlite version 3.15.2 #976

Closed
4 of 13 tasks
romio102 opened this issue Mar 8, 2017 · 5 comments
Closed
4 of 13 tasks
Labels

Comments

@romio102
Copy link

romio102 commented Mar 8, 2017

Details for the issue

I am using sqlite in multi-threaded environment where multiple applications use sqlite queries to perform get/set operations on attributes available in sqlite db tables. Intermittently i am seeing applications crashing when get operation is performed which intern call sqlite3_prepare_v2.
Crash is not frequent. I rarely see this issue. One thing to notice that, I never hit this issue when i was using 3.8.10.2. First time i hit the issue only after updating 3.15.2.
Following is the GDB back trace for the same. Please let me know if this is a known issue and if its fixed in latest sqlite version.
#0 0x4ffc9494 in __aeabi_memcpy8 () at ../sysdeps/arm/armv7/multiarch/memcpy_impl.S:352
#1 0x4194d514 in whereLoopXfer (pFrom=0x19a560, pTo=0x1c14d0, db=) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:129646
#2 whereLoopInsert (pTemplate=pTemplate@entry=0x19a560, pBuilder=0x1c2858, pBuilder=0x1c2858) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:64414
#3 0x419700f0 in whereLoopAddBtree (pBuilder=0x1c2858, pBuilder@entry=0x0, mPrereq=7281790634533488) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:130653
#4 0x419892fc in whereLoopAddAll (pBuilder=0x0) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:131229
#5 sqlite3WhereBegin (pParse=pParse@entry=0xbec43e68, pTabList=0x0, pTabList@entry=0x1c2850, pWhere=pWhere@entry=0xbec43cd0, pOrderBy=, pDistinctSet=0x1c2e50,
wctrlFlags=48760, iAuxArg=320) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:1283
#6 0x4198d8e0 in sqlite3Select (pParse=pParse@entry=0xbec43e68, p=, pDest=0x0, pDest@entry=0xbec43e08)
at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:119546
#7 0x419b8358 in yy_reduce (yyruleno=, yypParser=0x1b2990) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:135340
#8 sqlite3Parser (pParse=0xbec43e68, yyminor=..., yymajor=, yyp=) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:5377
#9 sqlite3RunParser (pParse=pParse@entry=0xbec43e68, zSql=0xe8 <error: Cannot access memory at address 0xe8>,
zSql@entry=0x198248 "SELECT FROM

WHERE "..., pzErrMsg=0x1c1dd0, pzErrMsg@entry=0xbec43e58) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:6324
#10 0x419bdae8 in sqlite3Prepare (db=db@entry=0x19be78,
zSql=zSql@entry=0x198248 "SELECT FROM
WHERE "..., nBytes=nBytes@entry=233, saveSqlFlag=-1094435176, saveSqlFlag@entry=1, pReprepare=pReprepare@entry=0x0, ppStmt=ppStmt@entry=0xbec440d8,
pzTail=pzTail@entry=0x0) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:114126
#11 0x419bdfb4 in sqlite3LockAndPrepare (db=0x19be78,
zSql=0x198248 "SELECT FROM
WHERE "..., nBytes=233, saveSqlFlag=1, pOld=0x0, ppStmt=0xbec440d8, pzTail=0x0) at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:114217
#12 0x419be27c in sqlite3_prepare_v2 (db=,
zSql=zSql@entry=0x198248 "SELECT FROM
WHERE "..., nBytes=, ppStmt=ppStmt@entry=0xbec440d8, pzTail=pzTail@entry=0x0)
at /usr/src/debug/sqlite3/3_3.15.2.0-r0/sqlite-autoconf-3150200/sqlite3.c:114293

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.9.1
  • 3.9.0
  • Other: ___

I have also:

@justinclift
Copy link
Member

justinclift commented Mar 8, 2017

Interesting. Would you be ok to run ldd on the sqlitebrowser executable and paste the result here? It sounds like there might be a linking problem.

Er... just to confirm, you are using sqlitebrowser yeah, not straight SQLite itself?

@romio102
Copy link
Author

romio102 commented Mar 8, 2017

@justinclift ,
I downloaded SQLite tarball (sqlite-autoconf-3150200.tar.gz) from https://sqlite.org/download.html and I am using SQLite as library itself. Not using SQLite browser.
Also, i guess if its a linking problem then i should face the problem every time using SQLite APIs. But i am facing this issue once in a while and its quiet random.

@chrisjlocke
Copy link
Member

chrisjlocke commented Mar 9, 2017

Not using SQLite browser

You have posted this question on the DB Browser for SQLite support issue system. This is for support for the application DB Browser for SQLite - not SQLite itself.
You can post your question to the SQLite support group by emailing the question to sqlite-users@mailinglists.sqlite.org

@romio102
Copy link
Author

romio102 commented Mar 9, 2017

Sure. I will drop a mail to SQLite support group. Thanks for the help.

@justinclift
Copy link
Member

@romio102 No worries at all. Hopefully you get it solved. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants