[sqlite] Crash bug in Sqlite

2020-01-03 Thread Yongheng Chen
Hi, We found a crash bug in sqlite. Here’s the POC: — CREATE VIRTUAL TABLE v0 USING rtree ( v3 AS( '1994-01-01' ) CHECK( v3 ) CHECK( v3 NOT LIKE 'y' ) GENERATED ALWAYS AS( ( SELECT 10.10 * AVG ( v3 ) FROM v0 WHERE v1 = v3 ) ) , v2 , v1 ) ; SELECT count ( * ) , max ( v3 ) FROM v0 ; CREATE TAB

[sqlite] Crash bug in sqlite

2020-01-03 Thread Yongheng Chen
Hi, We found a crash bug in sqlite. Here’s the POC: — CREATE VIRTUAL TABLE v0 USING fts4 ( v1 AS( typeof ( v5 ) ) , v6 UNIQUE GENERATED ALWAYS AS( v5 ) , v2 INT , v3 INT UNIQUE GENERATED ALWAYS AS( NULL ) , v4 INTEGER UNIQUE , v5 DOUBLE PRIMARY KEY CHECK( v4 ) , v7 VARCHAR(20) UNIQUE ) ; INSERT

[sqlite] Crash Bug In sqlite

2019-12-31 Thread Yongheng Chen
Hi, We found a crash bug in sqlite. Here’s the POC: — CREATE VIRTUAL TABLE v0 USING fts4 ( v1 , v2 , v3 , v4 ) ; INSERT INTO v0 ( v1 ) VALUES ( 10 ) ,( 10 ) ; CREATE TABLE v5 ( v6 UNIQUE NOT NULL PRIMARY KEY UNIQUE ) ; INSERT INTO v5 ( v6 , v6 ) SELECT nullif ( DISTINCT zeroblob ( julianday ()

Re: [sqlite] Crash bug in sqlite

2019-12-24 Thread Richard Hipp
On 12/24/19, Yongheng Chen wrote: > Hi, > > We found a crash bug in sqlite. Introduced yesterday afternoon by check-in https://sqlite.org/src/info/eb95dac7f6482c36 -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailingl

[sqlite] Crash bug in sqlite

2019-12-24 Thread Yongheng Chen
Hi, We found a crash bug in sqlite. Here’s the PoC: — CREATE TABLE v0 ( v1 INTEGER PRIMARY KEY ) ; INSERT INTO v0 ( v1 ) VALUES ( 0 ) ,( 1 ) ,( 10 ) ON CONFLICT DO NOTHING ; CREATE VIRTUAL TABLE v2 USING rtree ( v5 UNIQUE ON CONFLICT ABORT , v4 , v3 ) ; SELECT 'MED BOX' - 'a' FROM v0 LEFT JOIN

Re: [sqlite] Crash Bug in Sqlite

2019-12-19 Thread Jose Isaias Cabrera
Yongheng Chen, on Thursday, December 19, 2019 04:29 PM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > — > CREATE TABLE v0 ( v1 , v2 ) ; > SELECT 10 , 1 UNION SELECT v2 , dense_rank () OVER( ORDER BY - 10 ) FROM > v0 ; > — > > This bug exists in both the latest developmen

[sqlite] Crash Bug in Sqlite

2019-12-19 Thread Yongheng Chen
Hi, We found another crash in Sqlite. Here’s the POC: — CREATE TABLE v0 ( v1 , v2 ) ; SELECT 10 , 1 UNION SELECT v2 , dense_rank () OVER( ORDER BY - 10 ) FROM v0 ; — This bug exists in both the latest development code and the release code. Yongheng & Rui ___

Re: [sqlite] Crash bug in Sqlite

2019-12-19 Thread Jose Isaias Cabrera
Yongheng Chen, on Thursday, December 19, 2019 01:21 PM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > — > CREATE TABLE v0 ( v1 INTEGER PRIMARY KEY ) ; > CREATE VIEW v2 ( v3 ) AS SELECT DISTINCT ( SELECT DISTINCT v1 , v1 , v1 , > v3 , v1 , v3 , v1 , 10.10 ) ; > CREATE

[sqlite] Crash bug in Sqlite

2019-12-19 Thread Yongheng Chen
Hi, We found another crash in Sqlite. Here’s the POC: — CREATE TABLE v0 ( v1 INTEGER PRIMARY KEY ) ; CREATE VIEW v2 ( v3 ) AS SELECT DISTINCT ( SELECT DISTINCT v1 , v1 , v1 , v3 , v1 , v3 , v1 , 10.10 ) ; CREATE TABLE v4 ( v5 INTEGER PRIMARY KEY , v6 INT ); DELETE FROM v0 WHERE NULL BETWEEN (

Re: [sqlite] Crash bug in Sqlite

2019-12-19 Thread Jose Isaias Cabrera
Yongheng Chen, on Thursday, December 19, 2019 09:54 AM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > — > CREATE TABLE v0 ( v7 FLOAT , v3 DOUBLE , v6 TEXT , v1 INTEGER UNIQUE , v5 > DOUBLE , v2 VARCHAR(20) UNIQUE , v4 ) ; > REPLACE INTO v0 ( v6 , v3 , v2 ) VALUES ( 10 ,

[sqlite] Crash bug in Sqlite

2019-12-19 Thread Yongheng Chen
Hi, We found another crash in Sqlite. Here’s the POC: — CREATE TABLE v0 ( v7 FLOAT , v3 DOUBLE , v6 TEXT , v1 INTEGER UNIQUE , v5 DOUBLE , v2 VARCHAR(20) UNIQUE , v4 ) ; REPLACE INTO v0 ( v6 , v3 , v2 ) VALUES ( 10 , 10 , 10 ); CREATE VIRTUAL TABLE v8 USING zipfile ( v9 DOUBLE ) ; REPLACE INTO v8

Re: [sqlite] Crash bug in Sqlite

2019-12-18 Thread Jose Isaias Cabrera
Yongheng Chen, on Wednesday, December 18, 2019 10:45 AM, wrote... > > Hi, > > We found another crash in Sqlite. Here’s the POC: > > — > CREATE TABLE v0 ( v2 INTEGER UNIQUE ON CONFLICT IGNORE , v1 TEXT PRIMARY > KEY ) ; > CREATE VIEW v3 ( v4 ) AS SELECT v2 IN ( 9223372036854775808 , ( printf () > I

[sqlite] Crash bug in Sqlite

2019-12-18 Thread Yongheng Chen
Hi, We found another crash in Sqlite. Here’s the POC: — CREATE TABLE v0 ( v2 INTEGER UNIQUE ON CONFLICT IGNORE , v1 TEXT PRIMARY KEY ) ; CREATE VIEW v3 ( v4 ) AS SELECT v2 IN ( 9223372036854775808 , ( printf () IN ( 0 , 0 ) ) , 10 , 10 , 10 ) AS AVG_YEARLY FROM v0 ; CREATE TABLE v5 ( v6 , v7 ) ;

Re: [sqlite] Crash Bug in Sqlite

2019-12-17 Thread Yongheng Chen
It’s Yongheng & Rui. Sorry for the typo. > On Dec 17, 2019, at 4:58 PM, Jose Isaias Cabrera wrote: > > > Yongheng Chen, on Tuesday, December 17, 2019 04:21 PM, wrote... >> >> Hi, >> >> We found a bug that crashes Sqlite. Here’s the test case: >> >> —— >> CREATE TABLE v0 ( v1 UNIQUE , v2 VARC

Re: [sqlite] Crash Bug in Sqlite

2019-12-17 Thread Yongheng Chen
We just took a look at the bug. The value of the accessed address in the crash point can be controlled by the value in the second line of the test input, which means: —— ……. CREATE VIEW v3 ( v4 ) AS SELECT max ( ( SELECT count ( v1 ) OVER( ORDER BY 1234 ASC ) ) ) FROM v0 ; ….. —— — Then add

Re: [sqlite] Crash Bug in Sqlite

2019-12-17 Thread Jose Isaias Cabrera
Yongheng Chen, on Tuesday, December 17, 2019 04:21 PM, wrote... > > Hi, > > We found a bug that crashes Sqlite. Here’s the test case: > > —— > CREATE TABLE v0 ( v1 UNIQUE , v2 VARCHAR(80) NULL PRIMARY KEY ) ; > CREATE VIEW v3 ( v4 ) AS SELECT max ( ( SELECT count ( v1 ) OVER( ORDER > BY 10 ASC ) )

[sqlite] Crash Bug in Sqlite

2019-12-17 Thread Yongheng Chen
Hi, We found a bug that crashes Sqlite. Here’s the test case: —— CREATE TABLE v0 ( v1 UNIQUE , v2 VARCHAR(80) NULL PRIMARY KEY ) ; CREATE VIEW v3 ( v4 ) AS SELECT max ( ( SELECT count ( v1 ) OVER( ORDER BY 10 ASC ) ) ) FROM v0 ; SELECT * FROM v3 WHERE - 'b' >= v4 AND v4 > 10 OR ( v4 BETWEEN 1

Re: [sqlite] Crash Bug Report

2019-12-09 Thread Yongheng Chen
Thanks for the fix. > On Dec 9, 2019, at 9:43 AM, Richard Hipp wrote: > > On 12/8/19, Yongheng Chen wrote: >> >> We found one crash bug in sqlite, > > Simplified test case: > > CREATE TABLE t1(a); > CREATE VIEW v2(b) AS WITH t3 AS (SELECT b FROM v2) VALUES(1); > ALTER TABLE t1 RENAME TO t4;

Re: [sqlite] Crash Bug Report

2019-12-09 Thread Richard Hipp
On 12/8/19, Yongheng Chen wrote: > > We found one crash bug in sqlite, Simplified test case: CREATE TABLE t1(a); CREATE VIEW v2(b) AS WITH t3 AS (SELECT b FROM v2) VALUES(1); ALTER TABLE t1 RENAME TO t4; Notice how the definition of the V2 view refers to itself. The ALTER TABLE command was fai

Re: [sqlite] Crash Bug Report

2019-12-08 Thread D Burgess
3.30.1 x86_64 Linux Same problem here. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Tim Streater
On 08 Dec 2019, at 21:55, Simon Slavin wrote: > On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > >> The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. > > SQLite version 3.28.0 2019-04-15 14:49:49 > Enter ".help" for usage hints. > Connected to a transient in-memory databa

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Simon Slavin
simon@178 sqlite-tools-osx-x86-3300100 % ./sqlite3 SQLite version 3.30.1 2019-10-10 20:19:45 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE v0 ( v1 ) ; sqlite> CREATE TABLE v2 ( v3 ) ; sqlit

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Jose Isaias Cabrera
Yongheng Chen, on Sunday, December 8, 2019 02:51 PM, wrote... > > Hi, > > We found one crash bug in sqlite, which causes a dead loop and then OOM. > > CREATE TABLE v0 ( v1 ) ; > CREATE TABLE v2 ( v3 ) ; > CREATE VIEW v4 AS WITH x AS ( SELECT x () OVER( ) FROM v4 ) SELECT v3 AS x > FROM v2 ;

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Yongheng Chen
I haven’t tested many versions. But the most up-to-date master branch and the release version has this bug. > On Dec 8, 2019, at 4:55 PM, Simon Slavin wrote: > > On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > >> The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. > >

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Simon Slavin
On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. SQLite version 3.28.0 2019-04-15 14:49:49 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database

[sqlite] Crash Bug Report

2019-12-08 Thread Yongheng Chen
Hi, We found one crash bug in sqlite, which causes a dead loop and then OOM. CREATE TABLE v0 ( v1 ) ; CREATE TABLE v2 ( v3 ) ; CREATE VIEW v4 AS WITH x AS ( SELECT x () OVER( ) FROM v4 ) SELECT v3 AS x FROM v2 ; DROP TRIGGER IF EXISTS x ; ALTER TABLE v2 RENAME TO t3; The bug exists

[sqlite] crash at VCRUNTIME140D!MoveSmall

2019-09-26 Thread HA Thi Tham
Hi, I have a crash at sqlite (encryption extension). Here is code: sequence_t SQLiteDataFile::lastSequence(const string& keyStoreName) const { sequence_t seq = 0; compile(_getLastSeqStmt, "SELECT lastSeq FROM kvmeta WHERE name=?"); UsingStatement u(_getLastSeqStmt);

Re: [sqlite] crash at sqlite3DbMallocRawNN

2019-09-18 Thread HA Thi Tham
Hi Richard, Thanks for the tips. I'll base on that to investigate on my app. Regards, Tham On Tue, Aug 20, 2019 at 8:18 PM Richard Hipp wrote: > Faults in the memory allocation routines of SQLite are almost always > due to heap corruption caused by other unrelated parts of the > application.

Re: [sqlite] crash at sqlite3DbMallocRawNN

2019-08-20 Thread Richard Hipp
Faults in the memory allocation routines of SQLite are almost always due to heap corruption caused by other unrelated parts of the application. In other words, some other part of the application is misusing the memory heap, and SQLite merely has the misfortune of being the first innocent party to

[sqlite] crash at sqlite3DbMallocRawNN

2019-08-20 Thread HA Thi Tham
Hi, I have a crash at sqlite when reading a row in database (detailed stacktrace in the attachment). It happens rarely in our customer machine. We cannot reproduce it. Can you please give some suggestions when this can happen and maybe how to fix it. FAULTING_SOURCE_LINE: c:\jenkins\workspace\co

Re: [sqlite] Crash in sqlite3fts5BufferAppendBlob

2019-05-28 Thread bhandari_nikhil
Please help as to what parameters could have gone wrong when I see the crash here: #0 sqlite3Fts5BufferAppendBlob (pRc=pRc@entry=0xf54139c8, pBuf=pBuf@entry=0xf5afeb90, nData=*4294967295*, pData=0xf49fff76 "90246ture") at sqlite3.c:180474 #1 0xf717b6f8 in fts5WriteAppendTerm (p=p@entry=0xf54139

[sqlite] Crash in sqlite3fts5BufferAppendBlob

2019-05-27 Thread nikhil bhandari
I am facing a crash in sqlite3fts5BufferAppendBlob. Following is the backtrace: #0  sqlite3Fts5BufferAppendBlob (pRc=pRc@entry=0xf54139c8, pBuf=pBuf@entry=0xf5afeb90, nData=4294967295, pData=0xf49fff76 "90246ture") at sqlite3.c:180474#1  0xf717b6f8 in fts5WriteAppendTerm (p=p@entry=0xf54139a8,

Re: [sqlite] Sqlite Crash in sqlite3DbMallocRawNN.

2018-11-13 Thread Jens Alfke
> On Nov 13, 2018, at 2:18 AM, Hegde, Deepakakumar (D.) > wrote: > > #0 sqlite3DbMallocRawNN (db=db@entry=0x1dea20, n=176093659143 > ) at > /workspace/workspace/Trigger-Build-Host_Job/host/yunos6.0/third_party/sqlite/sqlite3.c:24732 176093659143 = 0x290007 Looks kind of like it was su

[sqlite] Sqlite Crash in sqlite3DbMallocRawNN.

2018-11-13 Thread Ramu, Bhavya (B.)
Hi All, We are facing a problem in which sqlite library function sqlite3DbMallocRawNN() is getting crashed inside the sqlite3_prepare_v2() function to prepare the statement. As per the analysis "n" value input to this seems to have a big value causing the crash. checked the input value to sqli

Re: [sqlite] Sqlite Crash in sqlite3DbMallocRawNN.

2018-11-13 Thread Richard Hipp
On 11/13/18, Hegde, Deepakakumar (D.) wrote: > Hi All, > > > We are facing a problem in which sqlite library function > sqlite3DbMallocRawNN() is getting crashed inside the sqlite3_prepare_v2() > function to prepare the statement. This sort of thing is almost always the result of heap corruption

[sqlite] Fw: Sqlite Crash in sqlite3DbMallocRawNN.

2018-11-13 Thread Hegde, Deepakakumar (D.)
sqlite-users@mailinglists.sqlite.org From: Hegde, Deepakakumar (D.) Sent: Tuesday, November 13, 2018 3:48 PM To: 'SQLite mailing list'; General Discussion of SQLite Database Subject: Sqlite Crash in sqlite3DbMallocRawNN. Hi All, We are facing a

[sqlite] Sqlite Crash in sqlite3DbMallocRawNN.

2018-11-13 Thread Hegde, Deepakakumar (D.)
Hi All, We are facing a problem in which sqlite library function sqlite3DbMallocRawNN() is getting crashed inside the sqlite3_prepare_v2() function to prepare the statement. As per the analysis "n" value input to this seems to have a big value causing the crash. checked the input value to sq

Re: [sqlite] union + window functions = sqlite crash (version 3.25.2)

2018-10-23 Thread Dan Kennedy
On 10/23/2018 03:13 AM, Peter Ďurica wrote: Table with sample data: *create table t(a int, b int);* *insert into t values(1,11);* *insert into t values(2,12);* now query using any window function (row_number, rank, ) after UNION or UNION ALL will cause sqlite.exe crash (no regular error) fo

Re: [sqlite] union + window functions = sqlite crash (version 3.25.2)

2018-10-23 Thread Keith Medcalf
On Monday, 22 October, 2018 14:13, Peter Ďurica wrote: >Table with sample data: >*create table t(a int, b int);* >*insert into t values(1,11);* >*insert into t values(2,12);* ... What is up with the asterisks, they make copying VERY VERY VERY VERY difficult. If you want to put "stars" around

Re: [sqlite] union + window functions = sqlite crash (version 3.25.2)

2018-10-23 Thread David Yip
I dug a little more into this with a debug build; was able to get the same crash trace with the slightly smaller query CREATE TABLE t(a); SELECT 1, 1 UNION ALL SELECT a, RANK() OVER (ORDER BY a) FROM t; which fails the pTab!=0 assertion in sqlite3ColumnsFromExprList. It seems lik

[sqlite] union + window functions = sqlite crash (version 3.25.2)

2018-10-23 Thread Peter Ďurica
Table with sample data: *create table t(a int, b int);* *insert into t values(1,11);* *insert into t values(2,12);* now query using any window function (row_number, rank, ) after UNION or UNION ALL will cause sqlite.exe crash (no regular error) for example: *select a, rank() over(order by b)

[sqlite] Crash on failure in database corruption detection, and patch

2018-09-30 Thread Even Rouault
Hi, oss-fuzz on GDAL has spotted a crashing bug in SQLite: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10750 (not accessible yet) Here's the way to reproduce it: $ valgrind ~/install-sqlite-3.25.1/bin/sqlite3 corrupt.db \ "SELECT 1 FROM gpkg_tile_matrix WHERE table_name = 'my'

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-30 Thread Vlad Khokholkov
I tried to make the issue more detailed (as you asked me in the beginning). Each attached file is referenced in the letter. Regards, Vladimir. сб, 29 сент. 2018 г. в 23:37, Richard Hipp : > On 9/29/18, Vlad Khokholkov wrote: > > Yes, you are right that is a link to compiler. > > Please, see sou

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Vlad Khokholkov
Yes, you are right that is a link to compiler. Please, see source code in the attached to prior letter file (SQLiteDebug.zip). Do you see attached files? Regards, Vladimir. сб, 29 сент. 2018 г. в 23:09, Richard Hipp : > On 9/29/18, Vlad Khokholkov wrote: > > a) Download already fetched compil

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Vlad Khokholkov
Good day! To answer your questions I prepare a simple test example where I can reproduce the crash (see file 'SQLiteDebug.zip'). The results of its execution please see in files ('SQLite_expected1.png', 'SQLite_expected2.png', 'SQLite_expected3.png', 'SQLite_unexpected.png') - crash is in 'SQLite_

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Richard Hipp
On 9/29/18, Vlad Khokholkov wrote: > Yes, you are right that is a link to compiler. > Please, see source code in the attached to prior letter file > (SQLiteDebug.zip). > Do you see attached files? Yes, thank you. I now see the source code buried amongst the other attachments. -- D. Richard Hip

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Richard Hipp
On 9/29/18, Vlad Khokholkov wrote: > a) Download already fetched compiler files and library from the link: > https://jmp.sh/v/bYhfdyV4ombZcWXVs98Z (Please, download it in next 23 > hours, otherwise link will be invalidated and I need to re-share it) That ZIP archive does not contain any source

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Simon Slavin
On 29 Sep 2018, at 1:53am, Vlad Khokholkov wrote: > Unfortunately, today I download the latest version of SQLite (3.25.2) and > got crash on the first 'sqlite3_prepare_v2' call. Thank you for posting. Can you tell us 1) What the crash error message is. 2) What statement you are passing to sq

Re: [sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Richard Hipp
Please send additional information. We are unable to reproduce or fix the problem without further data. On 9/28/18, Vlad Khokholkov wrote: > Good day! > > First of all thanks a lot for this really nice project! > I use it in different projects (including the projects where the DB file is >> 120

[sqlite] Crash observation in certain conditions (SQLite v.3.25.2)

2018-09-29 Thread Vlad Khokholkov
Good day! First of all thanks a lot for this really nice project! I use it in different projects (including the projects where the DB file is > 120 Gb), it works perfectly!!! Unfortunately, today I download the latest version of SQLite (3.25.2) and got crash on the first 'sqlite3_prepare_v2' call

Re: [sqlite] crash dropping table

2018-04-18 Thread Simon Slavin
On 18 Apr 2018, at 5:59pm, Mark Wagner wrote: > I will try to produce a repro case that I can share out (the database I was > testing on has lots of personal data that I will first try to delete). Before you do anything else to it, make a copy and use the SQLite shell to do PRAGMA integri

Re: [sqlite] crash dropping table

2018-04-18 Thread Mark Wagner
I will try to produce a repro case that I can share out (the database I was testing on has lots of personal data that I will first try to delete). Thanks for the responses. @David Note that those weren't the precise commands (i.e. drop command was "drop table x;"). On Wed, Apr 18, 2018 at 9:56

Re: [sqlite] crash dropping table

2018-04-18 Thread Simon Slavin
On 18 Apr 2018, at 4:47pm, Mark Wagner wrote: > I have a simple test case wherein I delete from a number of tables and then > drop one of those tables. This crashes sqlite3. > > So something like this: > > begin; > delete from x; > delete from y; > delete from z; > drop x; << crashes here >

Re: [sqlite] crash dropping table

2018-04-18 Thread David Raymond
crash) What journal mode is the database using? Etc... -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Mark Wagner Sent: Wednesday, April 18, 2018 11:48 AM To: SQLite mailing list Subject: [sqlite] crash dropping table I have a simp

Re: [sqlite] crash dropping table

2018-04-18 Thread Richard Hipp
On 4/18/18, Mark Wagner wrote: > I have a simple test case wherein I delete from a number of tables and then > drop one of those tables. This crashes sqlite3. > > So something like this: > > begin; > delete from x; > delete from y; > delete from z; > drop x; << crashes here Can you send in a re

Re: [sqlite] crash dropping table

2018-04-18 Thread Kees Nuyt
On Wed, 18 Apr 2018 15:47:47 +, Mark Wagner wrote: > Sorry for my ignorance but is there a procedure for > submitting bugs for things like this? The procedure is to mail bugs to this mailing list, including version info, so you did exactly the right thing. -- Regards, Kees Nuyt ___

[sqlite] crash dropping table

2018-04-18 Thread Mark Wagner
I have a simple test case wherein I delete from a number of tables and then drop one of those tables. This crashes sqlite3. So something like this: begin; delete from x; delete from y; delete from z; drop x; << crashes here Sorry for my ignorance but is there a procedure for submitting bugs fo

Re: [sqlite] Crash when writing header

2018-02-13 Thread Richard Hipp
On 2/13/18, Chris Brody wrote: > I was wondering what would happen if there would be an application crash, > system crash, or power failure while SQLite is updating the file header? > > Did I miss an explanation somewhere? The content is replicated either in the rollback-journal or in the write-h

[sqlite] Crash when writing header

2018-02-13 Thread Chris Brody
I was wondering what would happen if there would be an application crash, system crash, or power failure while SQLite is updating the file header? Did I miss an explanation somewhere? -- From: David Raymond Date: Tue, Feb 6, 2018 at 12:04 PM Subject: Re: [sqlite] Header corruption To: SQ

Re: [sqlite] Crash in libsqlite3 with sqlite-3.21.0 and KDE plasmashell

2018-01-19 Thread Leonard Lausen
Thanks for your prompt reply Richard. With this information I will go back to the KDE developers and let you know once/if there is further and detailed evidence for sqlites fault. Best regards Leonard Richard Hipp writes: > On 1/19/18, Leonard Lausen wrote: >> >> A crash in sqlite crashes pla

Re: [sqlite] Crash in libsqlite3 with sqlite-3.21.0 and KDE plasmashell

2018-01-18 Thread Richard Hipp
On 1/19/18, Leonard Lausen wrote: > > A crash in sqlite crashes plasmashell. Downstream bug > https://bugs.kde.org/show_bug.cgi?id=388140. Please find the backtrace > below: > (1) These kinds of things are almost always the result of heap corruption in the application. In other words, there is n

[sqlite] Crash in libsqlite3 with sqlite-3.21.0 and KDE plasmashell

2018-01-18 Thread Leonard Lausen
A crash in sqlite crashes plasmashell. Downstream bug https://bugs.kde.org/show_bug.cgi?id=388140. Please find the backtrace below: -- Backtrace: Application: Plasma (plasmashell), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-17 Thread Matthew Towler
Hi > I think it is now back to Matthew to come up with a new test case that > actually demonstrates his problem. I believe I stated in my earlier message that the example test code did not show the issue - apologies that you spent time re-proving this. What would really help me to achieve a fa

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-16 Thread Richard Hipp
On 1/16/18, Dominique Devienne wrote: > You're not compiling in C++11 mode, are you? > Probably use -std=c++11 or perhaps -std=gnu++11 on your g++ command line. Did that. It compiles now. But it also just works. There is no slowdown. Everything is very fast, regardless of which SQLite version

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-16 Thread Dominique Devienne
On Tue, Jan 16, 2018 at 4:10 PM, Richard Hipp wrote: > On 1/16/18, Matthew Towler wrote: > > > > Firstly, here is a C++11 example application. > > Does not compile. These are the errors: > > x2.cpp:53:2: warning: missing terminating " character > R"(SELECT AbundanceId FROM[ABUNDANCE] > ^

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-16 Thread Richard Hipp
On 1/16/18, Matthew Towler wrote: > > Firstly, here is a C++11 example application. Does not compile. These are the errors: x2.cpp:53:2: warning: missing terminating " character R"(SELECT AbundanceId FROM[ABUNDANCE] ^ x2.cpp:53:1: error: missing terminating " character R"(SELECT Abu

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-16 Thread Matthew Towler
Hello again, Thanks for the responses, here is some additional information. > Is it hanging, or is it crashing? Your statement of the problem is unclear > on this point. It depends on the version. 3.8.0 gives an access violation (a crash) the other versions I have tried hang, in that the call

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-11 Thread Luuk
On 11-01-18 18:01, Matthew Towler wrote: > Hi > > I believe I have found a bug in sqlite, which my tests show was introduced > between versions 3.7.17 and 3.8.0 and remains present in all versions up to > and including 3.21.0 (I have also tested 3.8.11, 3.9.3, 3.12.2 all of which > hang. I beli

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-11 Thread Simon Slavin
On 11 Jan 2018, at 5:01pm, Matthew Towler wrote: > With versions prior to 3.8.0 the query returns in under a second (which is > very impressive!). A query without all the sub-selects (so just selecting > some specific ID values from the main table) always works correctly (which is > why I had

Re: [sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-11 Thread Richard Hipp
On 1/11/18, Matthew Towler wrote: > for the > volumes of data I have sqlite hangs Is it hanging, or is it crashing? Your statement of the problem is unclear on this point. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@m

[sqlite] Crash when querying a unique index containing 12 columns using sub-selects

2018-01-11 Thread Matthew Towler
Hi I believe I have found a bug in sqlite, which my tests show was introduced between versions 3.7.17 and 3.8.0 and remains present in all versions up to and including 3.21.0 (I have also tested 3.8.11, 3.9.3, 3.12.2 all of which hang. I believe it closely related to, and probably just a bigge

Re: [sqlite] Crash while rollback database in journal_mode=DELETE

2017-04-09 Thread Taewon Park
Thank you for your quick reply! > If so, please tell us the email address that is associated with your SEE license. Unfortunately I'm using my own implementation, not SEE. Of course via SQLite3 C API interface, such as sqlite3CodecAttach and etc. ___ sq

Re: [sqlite] Crash while rollback database in journal_mode=DELETE

2017-04-07 Thread Richard Hipp
On 4/7/17, Taewon Park wrote: > > Because of changed default page size, My application has different > page-sized encrypted databases : 1024 and 4096. > Are you using the SQLite encryption extension (SEE) for this? If so, please tell us the email address that is associated with your SEE license.

[sqlite] Crash while rollback database in journal_mode=DELETE

2017-04-07 Thread Taewon Park
Hello, I'm developing an application with C++ and sqlite C api, and I updated SQLite 3.17.0 from 3.7.12 recently. Because of changed default page size, My application has different page-sized encrypted databases : 1024 and 4096. After the crash while writing something in 4096 page-sized database

Re: [sqlite] SQLIte crash in sqlite3_db_release_memory

2017-03-10 Thread Richard Hipp
On 3/10/17, Anthrathodiyil, Sabeel (S.) wrote: > Hi, > I am facing a crash while invoking "sqlite3_db_release_memory" the crash is > from pcache1RemoveFromHash. SQLite 3.7.10 is running on ARM A5 with > Freescale MQX as OS. > > Any probable reasons in term of the SQLite operations that are done w

Re: [sqlite] SQLIte crash in sqlite3_db_release_memory

2017-03-10 Thread Simon Slavin
On 10 Mar 2017, at 2:05pm, Anthrathodiyil, Sabeel (S.) wrote: > Stack trace is as below > -- > pcache1RemoveFromHash > pcache1EnforceMaxPage > pcache1Shrink > sqlite3PcacheShrink > > The sequence of SQLite operations being followed which lead to crash is in > the f

[sqlite] SQLIte crash in sqlite3_db_release_memory

2017-03-10 Thread Anthrathodiyil, Sabeel (S.)
Hi, I am facing a crash while invoking "sqlite3_db_release_memory" the crash is from pcache1RemoveFromHash. SQLite 3.7.10 is running on ARM A5 with Freescale MQX as OS. Stack trace is as below -- pcache1RemoveFromHash pcache1EnforceMaxPage pcache1Shrink sqlite3Pcache

Re: [sqlite] Crash on Android

2017-02-28 Thread Hick Gunter
An: SQLite mailing list Betreff: [sqlite] Crash on Android Hi All, Any thoughts on this will be greatly appreciated. I am having an issue only on a specific tablet when it is running Android 4.2.2. When Android is upgraded to 4.4.2 problems appears to be gone. I still want to understand roo

Re: [sqlite] Crash on Android

2017-02-27 Thread Daniel Anderson
looks like a race condition! but it could also be uninitialized variable, but this is rarer these day as most compiler flag uninitialized var. unless your uninitialized var happen to be in a struct, this is why constructor are so important for struct/class 2017-02-27 11:28 GMT-05:00 Jeff Arc

[sqlite] Crash on Android

2017-02-27 Thread Jeff Archer
Hi All, Any thoughts on this will be greatly appreciated. I am having an issue only on a specific tablet when it is running Android 4.2.2. When Android is upgraded to 4.4.2 problems appears to be gone. I still want to understand root cause to know if problem is really gone. My environment is a

Re: [sqlite] Crash Report

2016-09-18 Thread Richard Hipp
On 9/18/16, Keith Medcalf wrote: > > Somewhere between: > > 2016-09-03 16:23:42 672c21bcf09c5bfb67e061456a56be45409c4f34 > > 2016-09-09 20:23:59 19e2e5950541f1a93eed994cc2b1eaf64b68e858 > > where the former works and the later crashes (with a wunderful new fangled > Windows 10 content free error

[sqlite] Crash Report

2016-09-18 Thread Keith Medcalf
Somewhere between: 2016-09-03 16:23:42 672c21bcf09c5bfb67e061456a56be45409c4f34 2016-09-09 20:23:59 19e2e5950541f1a93eed994cc2b1eaf64b68e858 where the former works and the later crashes (with a wunderful new fangled Windows 10 content free error message) ((I do not have all versions from the

[sqlite] Crash in shell on Windows with redirected stdout

2016-04-18 Thread David Welch
Hi, I'm getting a crash in the sqlite shell on Windows 7 in sqlite3 version 3.12.1. I can reprduce it with the console commands echo "SELECT 1;" > tmp.sql sqlite3 :memory: -init tmp.sql >log What seems to happen is that sqlite3_initialise is never called and consequently the mallo

[sqlite] Crash when running complex FT5 queries

2016-02-25 Thread Dan Kennedy
On 02/25/2016 03:04 AM, Gergely Lukacsy (glukacsy) wrote: > Hi, > > > > We run into a reproducible crash on FTS5 search when searching something > complex such as: > > > > "(word1* word2* word3*) OR word1* OR word2* OR word3*" > > > > It might be that we are doing something wrong, but any insight

[sqlite] Crash when running complex FT5 queries

2016-02-24 Thread Gergely Lukacsy (glukacsy)
Hi, We run into a reproducible crash on FTS5 search when searching something complex such as: "(word1* word2* word3*) OR word1* OR word2* OR word3*" It might be that we are doing something wrong, but any insight is appreciated. The actual crashing call is a sqlite3_step/1 call: while

[sqlite] crash

2015-10-23 Thread E.Pasma
12 okt 2015, om 20:22, R.Smith: > > On 2015-10-12 07:40 PM, Richard Hipp wrote: >> On 10/12/15, R.Smith wrote: >>> More explicitly - would these be valid queries: >>> >>> SELECT props.* >>>FROM ( >>> SELECT 1 as id, JSON_OBJECT('i',5,'n','James') AS obj UNION >>> ALL >>> SELECT

[sqlite] crash

2015-10-12 Thread R.Smith
On 2015-10-12 07:40 PM, Richard Hipp wrote: > On 10/12/15, R.Smith wrote: >> More explicitly - would these be valid queries: >> >> SELECT props.* >> FROM ( >> SELECT 1 as id, JSON_OBJECT('i',5,'n','James') AS obj UNION ALL >> SELECT 2, JSON_OBJECT('i',6,'n','Jill') UNION ALL >>

[sqlite] crash

2015-10-12 Thread R.Smith
On 2015-10-12 04:05 PM, Richard Hipp wrote: > On 10/12/15, R.Smith wrote: >> Two questions - >> 1 - would referencing a table alias formed from a table in the same FROM >> clause be valid in future? Or is this just for JSON purposes? >> >> 2 - would this be allowed to reference ANY aliased table

[sqlite] crash

2015-10-12 Thread Richard Hipp
On 10/12/15, R.Smith wrote: > > More explicitly - would these be valid queries: > > SELECT props.* >FROM ( > SELECT 1 as id, JSON_OBJECT('i',5,'n','James') AS obj UNION ALL > SELECT 2, JSON_OBJECT('i',6,'n','Jill') UNION ALL > SELECT 3, JSON_OBJECT('i',7,'n','John') > ) AS T1

[sqlite] crash

2015-10-12 Thread R.Smith
This posted in response to a bug notification on the dev list, but I moved it here for a question: On 2015-10-11 12:45 PM, Richard Hipp wrote: > On 10/11/15, Gilles Vollant wrote: >> I made a lot of very nice thing using json1, >> >> But I've an exception in the DLL just trying: >> >> CREATE TAB

[sqlite] crash

2015-10-12 Thread Richard Hipp
On 10/12/15, R.Smith wrote: > > Two questions - > 1 - would referencing a table alias formed from a table in the same FROM > clause be valid in future? Or is this just for JSON purposes? > > 2 - would this be allowed to reference ANY aliased table, or only one > that can be simplified/factored to

[sqlite] crash

2015-10-12 Thread Ian Zimmerman
Please do not "repurpose" (trying to be polite here) threads. Thanks. -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.

[sqlite] SQLite crash

2015-08-12 Thread Dan Kennedy
On 08/12/2015 02:15 AM, Robert Weiss wrote: > The bug seems to be repeatable. At least, it happened again today. > I haven't used gdb in a long time. Here's my first crack at it; what else > should I do? > $ gdb sqliteGNU gdb (GDB) 7.8Copyright (C) 2014 Free Software Foundation, > Inc.License G

[sqlite] SQLite crash

2015-08-11 Thread Robert Weiss
It will take a little while to compile with MSVC. ?In the meantime I removed -DSQLITE_DEFAULT_WORKER_THREADS=4 from the compilation flags and the index was created successfully. ?Haste makes waste? Thanks, everyone.Bob Weiss On Tuesday, August 11, 2015 1:55 PM, Joe Mistachkin wrote: R

[sqlite] SQLite crash

2015-08-11 Thread Robert Weiss
[continuing from previous gdb output]:(gdb) thread apply all where 15 Thread 6 (Thread 12300.0xa64):#0 ?0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1 ?0x in ?? () Thread 5 (Thread 12300.0x389c):#0 ?0x77791f92 in ntdll!ZwWaitForWorkViaWorkerFactory ()

[sqlite] SQLite crash

2015-08-11 Thread Robert Weiss
The bug seems to be repeatable. ?At least, it happened again today. I haven't used gdb in a long time. ?Here's my first crack at it; what else should I do? $ gdb sqliteGNU gdb (GDB) 7.8Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later

[sqlite] SQLite crash

2015-08-11 Thread Jan Nijtmans
Op 11 aug. 2015 17:06 schreef "Robert Weiss" het volgende: > > In the meantime I removed -DSQLITE_DEFAULT_WORKER_THREADS=4 from the compilation flags and the index was created successfully. Haste makes waste? > Thanks, everyone.Bob Weiss That explains it! Your build of sqlite starts win32 thread

[sqlite] SQLite crash

2015-08-11 Thread Dan Kennedy
On 08/11/2015 12:23 AM, Robert Weiss wrote: > Dan Kennedy-- > What address, precisely, should I use to send the database to you? When I > "reply" to your message I get the whole SQLite discussion group, which is > what I want to avoid (no offense intended, guys and gals). > BTW, the problem does

[sqlite] SQLite crash

2015-08-11 Thread Joe Mistachkin
Robert Weiss wrote: > > [continuing from previous gdb output]:(gdb) thread apply all where 15 > Thread 6 (Thread 12300.0xa64):#0 ?0x74d66d61 in sysfer!FirstHookFunc () > from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1 ?0x in ?? () > Anyhow, the cause of this appears to be the "sysfer.dll"

[sqlite] SQLite crash

2015-08-10 Thread Robert Weiss
Dan Kennedy-- What address, precisely, should I use to send the database to you? ?When I "reply" to your message I get the whole SQLite discussion group, which is what I want to avoid (no offense intended, guys and gals). BTW, the problem does not seem to occur in version 3.8.10.2. Robert Weiss

  1   2   3   >