[sqlite] Getting a crash on 32-bit Linux

2015-04-15 Thread Ron Aaron
Astonishingly, the problem went away when I switched from using "clang" 
to using "gcc", on Linux 32 bit.

The actual problem was a 'memcpy' crash, due to incorrect stack 
alignment.  Normally, this is a gcc problem on 64-bit, but here it 
turned up on Linux 32 bit.  Perhaps something to do with compiler flags, 
though I don't set the 'arch' or 'tune' to anything.

So.  Problem solved, and nothing really to do with sqlite per se; but I 
do wish compilers would do less on my behalf...


-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Dan Kennedy
On 04/14/2015 10:00 PM, Ron Aaron wrote:
> Just updated with the version from sqlite.org and have the same problem:

The line numbers still don't match the 3.8.9 amalgamation on the 
website. Are you running [make sqlite3.c] yourself or downloading 
sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?

Are you able to share the test app with us so that we can reproduce the 
crash?

What is output if you run [where full 7] in gdb?

Thanks,
Dan.





>
>
> #0  findInodeInfo (pFile=0x9434118, ppInode=0x9434120) at sqlite3.c:26091
> #1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0 
> , h=5, pId=0x9434118, zFilename=0x9434208 
> "/home/ron/proj/8th/test.db", ctrlFlags=0)
> at sqlite3.c:30092
> #2  0x084fa69e in unixOpen (pVfs=0x89422b0 , 
> zPath=0x9434208 "/home/ron/proj/8th/test.db", pFile=0x9434118, flags=262,
> pOutFlags=0xd074) at sqlite3.c:30697
> #3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0 
> , zPath=0x9434208 "/home/ron/proj/8th/test.db", 
> pFile=0x9434118, flags=262,
> pFlagsOut=0xd074) at sqlite3.c:16093
> #4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0 
> , ppPager=0x91c6af0, zFilename=0x92a3cf0 
> "test.db", nExtra=76, flags=0,
> vfsFlags=262, xReinit=0x8516110 ) at sqlite3.c:45520
> #5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0 
> , zFilename=0x92a3cf0 "test.db", db=0x9192fd0, 
> ppBtree=0x919318c, flags=0,
> vfsFlags=262) at sqlite3.c:54119
> #6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db", 
> ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
> #7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db", 
> ppDb=0x91a2028) at sqlite3.c:127601
>
>
> On 4/14/15 17:31, Ron Aaron wrote:
>> I'm using the one from fossil...
>>
>>
>> On 4/14/15 17:12, Richard Hipp wrote:
>>> On 4/14/15, Ron Aaron  wrote:
 I just updated to the 3.8.9 version of SQLite for my project, and am
 compiling for 32-bit linux (on a 64-bit box).


 I'm getting a consistent crash in findInodeInfo, with this backtrace:


  #0  findInodeInfo (pFile=0x9438118, ppInode=0x9438120) at
  sqlite3.c:26091
>>> Corresponds to this source code line:
>>> https://www.sqlite.org/src/info/25b80a3d?ln=710
>>>
  #1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0
  , h=5, pId=0x9438118, zFilename=0x9438208
  "/home/ron/proj/8th/test.db", ctrlFlags=0)
   at sqlite3.c:30092
>>> Corresponds to this source code line:
>>> https://www.sqlite.org/src/info/25b80a3d?ln=4711
>>>
>>> So I think you must be using a non-standard build of the sqlite3.c
>>> amalgamation file, huh?
>>>
  #2  0x084fa69e in unixOpen (pVfs=0x89422b0 
 ,
  zPath=0x9438208 "/home/ron/proj/8th/test.db", pFile=0x9438118,
  flags=262, pOutFlags=0xd064)
   at sqlite3.c:30697
  #3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0
  , zPath=0x9438208
  "/home/ron/proj/8th/test.db", pFile=0x9438118, flags=262,
  pFlagsOut=0xd064)
   at sqlite3.c:16093
  #4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0
  , ppPager=0x91c6af0, zFilename=0x92a7cf0
  "test.db", nExtra=76, flags=0, vfsFlags=262,
   xReinit=0x8516110 ) at sqlite3.c:45520
  #5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0
  , zFilename=0x92a7cf0 "test.db", 
 db=0x9192fd0,
  ppBtree=0x919318c, flags=0, vfsFlags=262)
   at sqlite3.c:54119
  #6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db",
  ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
  #7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db",
  ppDb=0x91a2028) at sqlite3.c:127601


 Nothing has changed in my test code, and I haven't got a similar 
 problem
 on 32-bit OS X;  however, it's certainly conceivable I'm not using the
 right flags when compiling SQLite:

  gcc   -I.  -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_AUTHORIZATION
  -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_LOCKING_STYLE=0
  -DSQLITE_SYSTEM_MALLOC=1 -DSQLITE_OMIT_COMPILEOPTION_DIAGS
  -DSQLITE_OMIT_TRACE -O0 -c -o sqlite3.o sqlite3.c


 The crash occurs whether I work in a chroot lin 32 environment or a
 virtual machine running 'native'.  The test application is statically
 linked.


 Any clues would be appreciated!


 Thanks,

 Ron



 -- 
 Ron Aaron, CTO
 Aaron High-Tech, Ltd.
 +972.52.652.5543
 
 ___
 sqlite-users mailing list
 sqlite-users at mailinglists.sqlite.org
 http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

>>
>



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron

On 4/14/15 21:06, Richard Hipp wrote:
> On 4/14/15, Ron Aaron  wrote:
>> Something is very wrong, then.  The file I downloaded from the
>> sqlite.org site, and unzipped, has these:
> Yes.  My previous email had the wrong version of sqlite3..  Version
> 3.8.9 states:
>
> Size:  5507061 bytes
> Lines:  154633
> MD5: a99b92d9e510a8107999c474dca017d7
> SHA1: 49f1c3ae347e1327b5aaa6c7f76126bdf09c6f42
>
> So apparently you have the right sqlite3.c.  And yet line 26091 of
> that file is a blank line that is in between two procedures.  It is
> not a part of the findInodeInfo() procedure.  The findInodeInfo()
> function is 528 lines further down in the file.
>
> Do you have any idea why the line numbers on your stack track do not
> align with line numbers in the source file?  Are you sure you used the
> correct source code file in your build?

Given that my lin32 compile is done in a schroot environment, it could 
perhaps be the case that an incorrect sqlite is getting picked up, 
though I don't see how.

I'll have to investigate this further tomorrow; I thank you all for your 
time, and I'll let you know what I determine.

Best regards,
Ron

>
>>
>> ~/src/sqlite-amalgamation-3080900$ ls -l
>> total 11856
>> -rw-r--r--@ 1 ron  staff   147581 Apr  8 17:38 shell.c
>> -rw-r--r--@ 1 ron  staff  5507061 Apr  8 17:38 sqlite3.c
>> -rw-r--r--@ 1 ron  staff   376915 Apr  8 17:38 sqlite3.h
>> -rw-r--r--@ 1 ron  staff27763 Apr  8 17:38 sqlite3ext.h
>>
>>
>> ~/src/sqlite-amalgamation-3080900$ md5 sqlite3.c
>> MD5 (sqlite3.c) = a99b92d9e510a8107999c474dca017d7
>>
>>
>> On 4/14/15 20:41, Richard Hipp wrote:
>>> On 4/14/15, Ron Aaron  wrote:
 On 4/14/15 18:13, Dan Kennedy wrote:
> On 04/14/2015 10:00 PM, Ron Aaron wrote:
>> Just updated with the version from sqlite.org and have the same
>> problem:
> The line numbers still don't match the 3.8.9 amalgamation on the
> website. Are you running [make sqlite3.c] yourself or downloading
> sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
 sqlite-amalgamation-3080900.zip
>>> The sqlite3.c file in that ZIP archive should be 5516034 bytes in
>>> size, 154880 lines long, and have an MD5 hash of
>>> bef3e840d1e44e0e453a165f5b468ad7 and a SHA1 hash of
>>> 5ac3fb37f936c0748e1834ac633ce422870ea274.  Please verify that you are
>>> using the correct sqlite3.c source file.
>>>
>>> D. Richard Hipp
>>> drh at sqlite.org
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users at mailinglists.sqlite.org
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>> --
>> Ron Aaron, CTO
>> Aaron High-Tech, Ltd.
>> +972.52.652.5543
>> 
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>

-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
Yes:


I issued the command:  unzip ~/Downloads/sqlite-amalgamation-3080900.zip


file reports: Downloads/sqlite-amalgamation-3080900.zip: Zip archive 
data, at least v1.0 to extract


md5 sum: 02e9c3a6daa8b8587cf6bef828c2e33f


On 4/14/15 21:05, Nelson, Erik - 2 wrote:
> Ron Aaron wrote on Tuesday, April 14, 2015 1:51 PM
>
>> Something is very wrong, then.  The file I downloaded from the sqlite.org 
>> site, and unzipped, has these:
>> -rw-r--r--@ 1 ron  staff  5507061 Apr  8 17:38 sqlite3.c
> Can you confirm that this file came from the .zip file, not the .gz file?
>
>>> On 4/14/15 18:13, Dan Kennedy wrote:
 On 04/14/2015 10:00 PM, Ron Aaron wrote:
> Just updated with the version from sqlite.org and have the same problem:
 The line numbers still don't match the 3.8.9 amalgamation on the
 website. Are you running [make sqlite3.c] yourself or downloading
 sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
>>> sqlite-amalgamation-3080900.zip
>> The sqlite3.c file in that ZIP archive should be 5516034 bytes in
>> size, 154880 lines long, and have an MD5 hash of
>> bef3e840d1e44e0e453a165f5b468ad7 and a SHA1 hash of
>> 5ac3fb37f936c0748e1834ac633ce422870ea274.  Please verify that you are
>> using the correct sqlite3.c source file.
> --
> This message, and any attachments, is for the intended recipient(s) only, may 
> contain information that is privileged, confidential and/or proprietary and 
> subject to important terms and conditions available at 
> http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
> recipient, please delete this message.
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
Something is very wrong, then.  The file I downloaded from the 
sqlite.org site, and unzipped, has these:


~/src/sqlite-amalgamation-3080900$ ls -l
total 11856
-rw-r--r--@ 1 ron  staff   147581 Apr  8 17:38 shell.c
-rw-r--r--@ 1 ron  staff  5507061 Apr  8 17:38 sqlite3.c
-rw-r--r--@ 1 ron  staff   376915 Apr  8 17:38 sqlite3.h
-rw-r--r--@ 1 ron  staff27763 Apr  8 17:38 sqlite3ext.h


~/src/sqlite-amalgamation-3080900$ md5 sqlite3.c
MD5 (sqlite3.c) = a99b92d9e510a8107999c474dca017d7


On 4/14/15 20:41, Richard Hipp wrote:
> On 4/14/15, Ron Aaron  wrote:
>>
>> On 4/14/15 18:13, Dan Kennedy wrote:
>>> On 04/14/2015 10:00 PM, Ron Aaron wrote:
 Just updated with the version from sqlite.org and have the same problem:
>>> The line numbers still don't match the 3.8.9 amalgamation on the
>>> website. Are you running [make sqlite3.c] yourself or downloading
>>> sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
>> sqlite-amalgamation-3080900.zip
> The sqlite3.c file in that ZIP archive should be 5516034 bytes in
> size, 154880 lines long, and have an MD5 hash of
> bef3e840d1e44e0e453a165f5b468ad7 and a SHA1 hash of
> 5ac3fb37f936c0748e1834ac633ce422870ea274.  Please verify that you are
> using the correct sqlite3.c source file.
>
> D. Richard Hipp
> drh at sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron


On 4/14/15 18:13, Dan Kennedy wrote:
> On 04/14/2015 10:00 PM, Ron Aaron wrote:
>> Just updated with the version from sqlite.org and have the same problem:
>
> The line numbers still don't match the 3.8.9 amalgamation on the 
> website. Are you running [make sqlite3.c] yourself or downloading 
> sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
sqlite-amalgamation-3080900.zip

>
> Are you able to share the test app with us so that we can reproduce 
> the crash?
I can't do that, unfortunately.  I'll try to make an independent test 
scenario.  I do appreciate your efforts!
>
> What is output if you run [where full 7] in gdb?

A pile of output:

ok> "test.db" db:open
CALL_or_compile: 0x92014b8 xt 0x82e5990 name open

Program received signal SIGSEGV, Segmentation fault.
findInodeInfo (pFile=0x928a110, ppInode=0x928a118) at sqlite3.c:26091
26091
(gdb) where full 7
#0  findInodeInfo (pFile=0x928a110, ppInode=0x928a118) at sqlite3.c:26091
 rc = 0
 fd = 5
 fileId = {dev = 613319152320380928, ino = 4432731307}
 statbuf = {st_dev = 25, __pad1 = 420, __st_ino = 85073599, 
st_mode = 33188, st_nlink = 1, st_uid = 1000, st_gid = 1000, st_rdev = 
0, __pad2 = 420,
   st_size = 0, st_blksize = 4096, st_blocks = 16, st_atim = 
{tv_sec = 1429027578, tv_nsec = 801386751}, st_mtim = {tv_sec = 1429027578,
 tv_nsec = 801386751}, st_ctim = {tv_sec = 1429027578, 
tv_nsec = 801386751}, st_ino = 85073599}
 pInode = 0x0
#1  0x085d31c4 in fillInUnixFile (pVfs=0x89422b0 , 
h=5, pId=0x928a110, zFilename=0x928a200 "/home/ron/proj/8th/test.db", 
ctrlFlags=0)
 at sqlite3.c:30092
 pLockingStyle = 0x8917cec 
 pNew = 0x928a110
 rc = 0
#2  0x084fa62e in unixOpen (pVfs=0x89422b0 , 
zPath=0x928a200 "/home/ron/proj/8th/test.db", pFile=0x928a110, flags=262,
 pOutFlags=0xd288) at sqlite3.c:30697
 p = 0x928a110
 fd = 5
 openFlags = 32834
 eType = 256
 noLock = 0
 rc = 0
 ctrlFlags = 0
 isExclusive = 0
 isDelete = 0
 isCreate = 4
 isReadonly = 0
 isReadWrite = 2
 syncDir = 0
 zTmpname = 
"\226\b\370d\230\b\033\000\000\000S\f6\b\000`\236\000\310d\230\b\002\000\000\000F\000\000\000C\000\000\000H\000\000\000\234`\240\b\000\000\375\367`\t\375\367I\000\000\000s\000\000\000\000\300\222\b\033\000\000\000\370d\230\b\200\002\000\000\000\340(\t\000`\236\b\002\000\000\000\230\320\377\377\221\267\065\b\221\267\065\b\001\000\000\000X\250\375\367\221\267\065\b@?\b<\276\226\bT\320\377\377\370d\230\b\240*\226\b\330\320\377\377T\320\377\377\000\300\222\b
 
\031\226\b\350\320\377\377d\320\377\377\212\273\065\b 
\031\226\b\001\000\000\000\344\320\377\377\350\320\377\377\324\320\377\377\240*\226\b\244\320\377\377\000\300\222\b\344\320\377\377
 
\031\226\b\264\320\377\377"...
 zName = 0x928a200 "/home/ron/proj/8th/test.db"
#3  0x0851a3e3 in sqlite3OsOpen (pVfs=0x89422b0 , 
zPath=0x928a200 "/home/ron/proj/8th/test.db", pFile=0x928a110, flags=262,
 pFlagsOut=0xd288) at sqlite3.c:16093
 rc = 153570696
#4  0x08515c18 in sqlite3PagerOpen (pVfs=0x89422b0 
, ppPager=0x9286008, zFilename=0x926e248 
"test.db", nExtra=76, flags=0,
 vfsFlags=262, xReinit=0x85160a0 ) at sqlite3.c:45520
 fout = 262
 pPtr = 0x928a21c "/home/ron/proj/8th/test.db-journal"
 pPager = 0x928a008
 rc = 0
 tempFile = 0
 memDb = 0
 readOnly = 0
 journalFileSize = 80
---Type  to continue, or q  to quit---
 zPathname = 0x9274d88 "/home/ron/proj/8th/test.db"
 nPathname = 26
 useJournal = 1
 pcacheSize = 48
 szPageDflt = 1024
 zUri = 0x926e250 ""
 nUri = 1
#5  0x08514882 in sqlite3BtreeOpen (pVfs=0x89422b0 
, zFilename=0x926e248 "test.db", db=0x9192b48, 
ppBtree=0x9192d04, flags=0,
 vfsFlags=262) at sqlite3.c:54119
 pBt = 0x9286008
 p = 0x919fa08
 mutexOpen = 0x0
 rc = 0
 nReserve = 8 '\b'
 zDbHeader = 
"\000\263'Q\bH+\031\t'\264\202\b\001\000\000\000\t\270O\b\350a!\t\000\300\222\b'\264\202\b\000\300\222\b\000\000\000\000H+\031\t\000\300\222\b~\347P\bH+\031\t\000\000\000\000'\264\202\b\001\000\000\000\000\300\222\b\000\000\000\000\001\000\000\000\374\002\000\200\000\000\000\000Ha!\t\a\000\000\000\032\264\202"
 isTempDb = 0
 isMemdb = 0
#6  0x0850de27 in openDatabase (zFilename=0x919f9d0 "test.db", 
ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
 db = 0x9192b48
 rc = 0
 isThreadsafe = 0
 zOpen = 0x926e248 "test.db"
 zErrMsg = 0x0
(More stack frames follow...)
(gdb)



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Nelson, Erik - 2
Ron Aaron wrote on Tuesday, April 14, 2015 1:51 PM

>Something is very wrong, then.  The file I downloaded from the sqlite.org 
>site, and unzipped, has these:
>-rw-r--r--@ 1 ron  staff  5507061 Apr  8 17:38 sqlite3.c

Can you confirm that this file came from the .zip file, not the .gz file?

>> On 4/14/15 18:13, Dan Kennedy wrote:
>>> On 04/14/2015 10:00 PM, Ron Aaron wrote:
 Just updated with the version from sqlite.org and have the same problem:
>>> The line numbers still don't match the 3.8.9 amalgamation on the
>>> website. Are you running [make sqlite3.c] yourself or downloading
>>> sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
>> sqlite-amalgamation-3080900.zip
> The sqlite3.c file in that ZIP archive should be 5516034 bytes in
> size, 154880 lines long, and have an MD5 hash of
> bef3e840d1e44e0e453a165f5b468ad7 and a SHA1 hash of
> 5ac3fb37f936c0748e1834ac633ce422870ea274.  Please verify that you are
> using the correct sqlite3.c source file.

--
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.


[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
Just updated with the version from sqlite.org and have the same problem:


#0  findInodeInfo (pFile=0x9434118, ppInode=0x9434120) at sqlite3.c:26091
#1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0 , 
h=5, pId=0x9434118, zFilename=0x9434208 "/home/ron/proj/8th/test.db", 
ctrlFlags=0)
 at sqlite3.c:30092
#2  0x084fa69e in unixOpen (pVfs=0x89422b0 , 
zPath=0x9434208 "/home/ron/proj/8th/test.db", pFile=0x9434118, flags=262,
 pOutFlags=0xd074) at sqlite3.c:30697
#3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0 , 
zPath=0x9434208 "/home/ron/proj/8th/test.db", pFile=0x9434118, flags=262,
 pFlagsOut=0xd074) at sqlite3.c:16093
#4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0 
, ppPager=0x91c6af0, zFilename=0x92a3cf0 
"test.db", nExtra=76, flags=0,
 vfsFlags=262, xReinit=0x8516110 ) at sqlite3.c:45520
#5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0 
, zFilename=0x92a3cf0 "test.db", db=0x9192fd0, 
ppBtree=0x919318c, flags=0,
 vfsFlags=262) at sqlite3.c:54119
#6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db", 
ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
#7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db", 
ppDb=0x91a2028) at sqlite3.c:127601


On 4/14/15 17:31, Ron Aaron wrote:
> I'm using the one from fossil...
>
>
> On 4/14/15 17:12, Richard Hipp wrote:
>> On 4/14/15, Ron Aaron  wrote:
>>> I just updated to the 3.8.9 version of SQLite for my project, and am
>>> compiling for 32-bit linux (on a 64-bit box).
>>>
>>>
>>> I'm getting a consistent crash in findInodeInfo, with this backtrace:
>>>
>>>
>>>  #0  findInodeInfo (pFile=0x9438118, ppInode=0x9438120) at
>>>  sqlite3.c:26091
>> Corresponds to this source code line:
>> https://www.sqlite.org/src/info/25b80a3d?ln=710
>>
>>>  #1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0
>>>  , h=5, pId=0x9438118, zFilename=0x9438208
>>>  "/home/ron/proj/8th/test.db", ctrlFlags=0)
>>>   at sqlite3.c:30092
>> Corresponds to this source code line:
>> https://www.sqlite.org/src/info/25b80a3d?ln=4711
>>
>> So I think you must be using a non-standard build of the sqlite3.c
>> amalgamation file, huh?
>>
>>>  #2  0x084fa69e in unixOpen (pVfs=0x89422b0 ,
>>>  zPath=0x9438208 "/home/ron/proj/8th/test.db", pFile=0x9438118,
>>>  flags=262, pOutFlags=0xd064)
>>>   at sqlite3.c:30697
>>>  #3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0
>>>  , zPath=0x9438208
>>>  "/home/ron/proj/8th/test.db", pFile=0x9438118, flags=262,
>>>  pFlagsOut=0xd064)
>>>   at sqlite3.c:16093
>>>  #4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0
>>>  , ppPager=0x91c6af0, zFilename=0x92a7cf0
>>>  "test.db", nExtra=76, flags=0, vfsFlags=262,
>>>   xReinit=0x8516110 ) at sqlite3.c:45520
>>>  #5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0
>>>  , zFilename=0x92a7cf0 "test.db", 
>>> db=0x9192fd0,
>>>  ppBtree=0x919318c, flags=0, vfsFlags=262)
>>>   at sqlite3.c:54119
>>>  #6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db",
>>>  ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
>>>  #7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db",
>>>  ppDb=0x91a2028) at sqlite3.c:127601
>>>
>>>
>>> Nothing has changed in my test code, and I haven't got a similar 
>>> problem
>>> on 32-bit OS X;  however, it's certainly conceivable I'm not using the
>>> right flags when compiling SQLite:
>>>
>>>  gcc   -I.  -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_AUTHORIZATION
>>>  -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_LOCKING_STYLE=0
>>>  -DSQLITE_SYSTEM_MALLOC=1 -DSQLITE_OMIT_COMPILEOPTION_DIAGS
>>>  -DSQLITE_OMIT_TRACE -O0 -c -o sqlite3.o sqlite3.c
>>>
>>>
>>> The crash occurs whether I work in a chroot lin 32 environment or a
>>> virtual machine running 'native'.  The test application is statically
>>> linked.
>>>
>>>
>>> Any clues would be appreciated!
>>>
>>>
>>> Thanks,
>>>
>>> Ron
>>>
>>>
>>>
>>> -- 
>>> Ron Aaron, CTO
>>> Aaron High-Tech, Ltd.
>>> +972.52.652.5543
>>> 
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users at mailinglists.sqlite.org
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>>
>

-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
I'm using the one from fossil...


On 4/14/15 17:12, Richard Hipp wrote:
> On 4/14/15, Ron Aaron  wrote:
>> I just updated to the 3.8.9 version of SQLite for my project, and am
>> compiling for 32-bit linux (on a 64-bit box).
>>
>>
>> I'm getting a consistent crash in findInodeInfo, with this backtrace:
>>
>>
>>  #0  findInodeInfo (pFile=0x9438118, ppInode=0x9438120) at
>>  sqlite3.c:26091
> Corresponds to this source code line:
> https://www.sqlite.org/src/info/25b80a3d?ln=710
>
>>  #1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0
>>  , h=5, pId=0x9438118, zFilename=0x9438208
>>  "/home/ron/proj/8th/test.db", ctrlFlags=0)
>>   at sqlite3.c:30092
> Corresponds to this source code line:
> https://www.sqlite.org/src/info/25b80a3d?ln=4711
>
> So I think you must be using a non-standard build of the sqlite3.c
> amalgamation file, huh?
>
>>  #2  0x084fa69e in unixOpen (pVfs=0x89422b0 ,
>>  zPath=0x9438208 "/home/ron/proj/8th/test.db", pFile=0x9438118,
>>  flags=262, pOutFlags=0xd064)
>>   at sqlite3.c:30697
>>  #3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0
>>  , zPath=0x9438208
>>  "/home/ron/proj/8th/test.db", pFile=0x9438118, flags=262,
>>  pFlagsOut=0xd064)
>>   at sqlite3.c:16093
>>  #4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0
>>  , ppPager=0x91c6af0, zFilename=0x92a7cf0
>>  "test.db", nExtra=76, flags=0, vfsFlags=262,
>>   xReinit=0x8516110 ) at sqlite3.c:45520
>>  #5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0
>>  , zFilename=0x92a7cf0 "test.db", db=0x9192fd0,
>>  ppBtree=0x919318c, flags=0, vfsFlags=262)
>>   at sqlite3.c:54119
>>  #6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db",
>>  ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
>>  #7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db",
>>  ppDb=0x91a2028) at sqlite3.c:127601
>>
>>
>> Nothing has changed in my test code, and I haven't got a similar problem
>> on 32-bit OS X;  however, it's certainly conceivable I'm not using the
>> right flags when compiling SQLite:
>>
>>  gcc   -I.  -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_AUTHORIZATION
>>  -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_LOCKING_STYLE=0
>>  -DSQLITE_SYSTEM_MALLOC=1 -DSQLITE_OMIT_COMPILEOPTION_DIAGS
>>  -DSQLITE_OMIT_TRACE -O0 -c -o sqlite3.o sqlite3.c
>>
>>
>> The crash occurs whether I work in a chroot lin 32 environment or a
>> virtual machine running 'native'.  The test application is statically
>> linked.
>>
>>
>> Any clues would be appreciated!
>>
>>
>> Thanks,
>>
>> Ron
>>
>>
>>
>> --
>> Ron Aaron, CTO
>> Aaron High-Tech, Ltd.
>> +972.52.652.5543
>> 
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>

-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
I just updated to the 3.8.9 version of SQLite for my project, and am 
compiling for 32-bit linux (on a 64-bit box).


I'm getting a consistent crash in findInodeInfo, with this backtrace:


#0  findInodeInfo (pFile=0x9438118, ppInode=0x9438120) at
sqlite3.c:26091
#1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0
, h=5, pId=0x9438118, zFilename=0x9438208
"/home/ron/proj/8th/test.db", ctrlFlags=0)
 at sqlite3.c:30092
#2  0x084fa69e in unixOpen (pVfs=0x89422b0 ,
zPath=0x9438208 "/home/ron/proj/8th/test.db", pFile=0x9438118,
flags=262, pOutFlags=0xd064)
 at sqlite3.c:30697
#3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0
, zPath=0x9438208
"/home/ron/proj/8th/test.db", pFile=0x9438118, flags=262,
pFlagsOut=0xd064)
 at sqlite3.c:16093
#4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0
, ppPager=0x91c6af0, zFilename=0x92a7cf0
"test.db", nExtra=76, flags=0, vfsFlags=262,
 xReinit=0x8516110 ) at sqlite3.c:45520
#5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0
, zFilename=0x92a7cf0 "test.db", db=0x9192fd0,
ppBtree=0x919318c, flags=0, vfsFlags=262)
 at sqlite3.c:54119
#6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db",
ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
#7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db",
ppDb=0x91a2028) at sqlite3.c:127601


Nothing has changed in my test code, and I haven't got a similar problem 
on 32-bit OS X;  however, it's certainly conceivable I'm not using the 
right flags when compiling SQLite:

gcc   -I.  -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_AUTHORIZATION
-DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_LOCKING_STYLE=0
-DSQLITE_SYSTEM_MALLOC=1 -DSQLITE_OMIT_COMPILEOPTION_DIAGS
-DSQLITE_OMIT_TRACE -O0 -c -o sqlite3.o sqlite3.c


The crash occurs whether I work in a chroot lin 32 environment or a 
virtual machine running 'native'.  The test application is statically 
linked.


Any clues would be appreciated!


Thanks,

Ron



-- 
Ron Aaron, CTO
Aaron High-Tech, Ltd.
+972.52.652.5543



[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Richard Hipp
On 4/14/15, Ron Aaron  wrote:
> Something is very wrong, then.  The file I downloaded from the
> sqlite.org site, and unzipped, has these:

Yes.  My previous email had the wrong version of sqlite3..  Version
3.8.9 states:

Size:  5507061 bytes
Lines:  154633
MD5: a99b92d9e510a8107999c474dca017d7
SHA1: 49f1c3ae347e1327b5aaa6c7f76126bdf09c6f42

So apparently you have the right sqlite3.c.  And yet line 26091 of
that file is a blank line that is in between two procedures.  It is
not a part of the findInodeInfo() procedure.  The findInodeInfo()
function is 528 lines further down in the file.

Do you have any idea why the line numbers on your stack track do not
align with line numbers in the source file?  Are you sure you used the
correct source code file in your build?

>
>
> ~/src/sqlite-amalgamation-3080900$ ls -l
> total 11856
> -rw-r--r--@ 1 ron  staff   147581 Apr  8 17:38 shell.c
> -rw-r--r--@ 1 ron  staff  5507061 Apr  8 17:38 sqlite3.c
> -rw-r--r--@ 1 ron  staff   376915 Apr  8 17:38 sqlite3.h
> -rw-r--r--@ 1 ron  staff27763 Apr  8 17:38 sqlite3ext.h
>
>
> ~/src/sqlite-amalgamation-3080900$ md5 sqlite3.c
> MD5 (sqlite3.c) = a99b92d9e510a8107999c474dca017d7
>
>
> On 4/14/15 20:41, Richard Hipp wrote:
>> On 4/14/15, Ron Aaron  wrote:
>>>
>>> On 4/14/15 18:13, Dan Kennedy wrote:
 On 04/14/2015 10:00 PM, Ron Aaron wrote:
> Just updated with the version from sqlite.org and have the same
> problem:
 The line numbers still don't match the 3.8.9 amalgamation on the
 website. Are you running [make sqlite3.c] yourself or downloading
 sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
>>> sqlite-amalgamation-3080900.zip
>> The sqlite3.c file in that ZIP archive should be 5516034 bytes in
>> size, 154880 lines long, and have an MD5 hash of
>> bef3e840d1e44e0e453a165f5b468ad7 and a SHA1 hash of
>> 5ac3fb37f936c0748e1834ac633ce422870ea274.  Please verify that you are
>> using the correct sqlite3.c source file.
>>
>> D. Richard Hipp
>> drh at sqlite.org
>> ___
>> sqlite-users mailing list
>> sqlite-users at mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
> --
> Ron Aaron, CTO
> Aaron High-Tech, Ltd.
> +972.52.652.5543
> 
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Richard Hipp
On 4/14/15, Ron Aaron  wrote:
>
>
> On 4/14/15 18:13, Dan Kennedy wrote:
>> On 04/14/2015 10:00 PM, Ron Aaron wrote:
>>> Just updated with the version from sqlite.org and have the same problem:
>>
>> The line numbers still don't match the 3.8.9 amalgamation on the
>> website. Are you running [make sqlite3.c] yourself or downloading
>> sqlite-amalgamation-3080900.zip or sqlite3-autoconf-3080900.tar.gz?
> sqlite-amalgamation-3080900.zip

The sqlite3.c file in that ZIP archive should be 5516034 bytes in
size, 154880 lines long, and have an MD5 hash of
bef3e840d1e44e0e453a165f5b468ad7 and a SHA1 hash of
5ac3fb37f936c0748e1834ac633ce422870ea274.  Please verify that you are
using the correct sqlite3.c source file.

D. Richard Hipp
drh at sqlite.org


[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Richard Hipp
On 4/14/15, Ron Aaron  wrote:
> I just updated to the 3.8.9 version of SQLite for my project, and am
> compiling for 32-bit linux (on a 64-bit box).
>
>
> I'm getting a consistent crash in findInodeInfo, with this backtrace:
>
>
> #0  findInodeInfo (pFile=0x9438118, ppInode=0x9438120) at
> sqlite3.c:26091

Corresponds to this source code line:
https://www.sqlite.org/src/info/25b80a3d?ln=710

> #1  0x085d3234 in fillInUnixFile (pVfs=0x89422b0
> , h=5, pId=0x9438118, zFilename=0x9438208
> "/home/ron/proj/8th/test.db", ctrlFlags=0)
>  at sqlite3.c:30092

Corresponds to this source code line:
https://www.sqlite.org/src/info/25b80a3d?ln=4711

So I think you must be using a non-standard build of the sqlite3.c
amalgamation file, huh?

> #2  0x084fa69e in unixOpen (pVfs=0x89422b0 ,
> zPath=0x9438208 "/home/ron/proj/8th/test.db", pFile=0x9438118,
> flags=262, pOutFlags=0xd064)
>  at sqlite3.c:30697
> #3  0x0851a453 in sqlite3OsOpen (pVfs=0x89422b0
> , zPath=0x9438208
> "/home/ron/proj/8th/test.db", pFile=0x9438118, flags=262,
> pFlagsOut=0xd064)
>  at sqlite3.c:16093
> #4  0x08515c88 in sqlite3PagerOpen (pVfs=0x89422b0
> , ppPager=0x91c6af0, zFilename=0x92a7cf0
> "test.db", nExtra=76, flags=0, vfsFlags=262,
>  xReinit=0x8516110 ) at sqlite3.c:45520
> #5  0x085148f2 in sqlite3BtreeOpen (pVfs=0x89422b0
> , zFilename=0x92a7cf0 "test.db", db=0x9192fd0,
> ppBtree=0x919318c, flags=0, vfsFlags=262)
>  at sqlite3.c:54119
> #6  0x0850de97 in openDatabase (zFilename=0x91a1610 "test.db",
> ppDb=0x91a2028, flags=6, zVfs=0x0) at sqlite3.c:127475
> #7  0x0850d73a in sqlite3_open (zFilename=0x91a1610 "test.db",
> ppDb=0x91a2028) at sqlite3.c:127601
>
>
> Nothing has changed in my test code, and I haven't got a similar problem
> on 32-bit OS X;  however, it's certainly conceivable I'm not using the
> right flags when compiling SQLite:
>
> gcc   -I.  -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_AUTHORIZATION
> -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_LOCKING_STYLE=0
> -DSQLITE_SYSTEM_MALLOC=1 -DSQLITE_OMIT_COMPILEOPTION_DIAGS
> -DSQLITE_OMIT_TRACE -O0 -c -o sqlite3.o sqlite3.c
>
>
> The crash occurs whether I work in a chroot lin 32 environment or a
> virtual machine running 'native'.  The test application is statically
> linked.
>
>
> Any clues would be appreciated!
>
>
> Thanks,
>
> Ron
>
>
>
> --
> Ron Aaron, CTO
> Aaron High-Tech, Ltd.
> +972.52.652.5543
> 
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org