We discovered that pysqlite can build with sqlite-3.6.13, but not with sqlite-3.6.14[.1]. Using the amalgamation source for sqlite-3.6.14.1 (See Bug 270843 ) and running the tests, we encounter a Bus error almost immediately --- aggerror.test, test 4. The SQL triggering this reduces to: update t1 set a=41 where a=40; (which should change the last row in the test.db to 41 from 40). According to gdb, in this source, we are at line 30221 in sqlite3.c, and the source is: *pRowid = p->pEntry->v; A bus error on sparc means that something is misaligned (it's not p, which is 0xb30a8, but beyond that I don't know). The problem is almost certainly upstream, and appears to be a regression (at least, -3.6.13 works fine with pysqlite).
Have you reported it to SQLite upstream?
(In reply to comment #1) > Have you reported it to SQLite upstream? > No, but I can. I was wrong about amalgamation source --- somehow I got the original tar.gz file instead. Right now, I'm also looking at 14.2.
OK, I built sqlite3 from sqlite-amalgamation-3.6.14.2.tar.gz (for real this time) and used it to attempt the tests. The bus error is still there, so I'll look at sending it upstream.
(In reply to comment #3) > OK, I built sqlite3 from sqlite-amalgamation-3.6.14.2.tar.gz (for real this > time) and used it to attempt the tests. The bus error is still there, so I'll > look at sending it upstream. > sqlite - Ticket #3882
Created attachment 192727 [details, diff] sqlite-3.6.14.2-fix_alignment.patch Please test this patch.
(In reply to comment #5) > Created an attachment (id=192727) [edit] > sqlite-3.6.14.2-fix_alignment.patch > > Please test this patch. > With that patch, the entire test suite for sqlite-3.6.14.2 runs successfully. So I'd call this bug fixed once that is applied (and upstream incorporates it).
(In reply to comment #6) > (In reply to comment #5) > > Created an attachment (id=192727) [edit] > > sqlite-3.6.14.2-fix_alignment.patch > > > > Please test this patch. > > > > With that patch, the entire test suite for sqlite-3.6.14.2 runs successfully. > So I'd call this bug fixed once that is applied (and upstream incorporates it). > And I notice that it's present in sqlite-3.6.15 upstream as well.
The patch has been included in dev-db/sqlite-3.6.14.2. Please test dev-db/sqlite-3.6.14.2 (and test dev-python/pysqlite with dev-db/sqlite-3.6.14.2) and, if tests pass, add ~sparc keyword.
Header got messed up, so patch does not install. cvs thoughtfully changed the ** $Id: rowset.c,v 1.7 2009/05/22 01:00:13 drh Exp $ to ** $Id: sqlite-3.6.14.2-fix_alignment.patch,v 1.1 2009/05/28 17:53:24 arfrever Exp $ I don't remember how to prevent this from happening. :( I'll test without that part of the patch.
(In reply to comment #9) > Header got messed up, so patch does not install. cvs thoughtfully changed the > ** $Id: rowset.c,v 1.7 2009/05/22 01:00:13 drh Exp $ > to > ** $Id: sqlite-3.6.14.2-fix_alignment.patch,v 1.1 2009/05/28 17:53:24 arfrever > Exp $ > > I don't remember how to prevent this from happening. :( > > I'll test without that part of the patch. > With that patch (and the $Header update removed), all sqlite tests pass (FEATURES='userpriv test') and all pysqlite tests pass. So the patch is good. I'll try to make a version which will apply. I might end up taking out the $Header update and wait for that in the next sqlite release unless I can figure out how to make cvs ignore it.
Got it, thanks to some help from tcunha and robbat2. Patch is now good (verfied that cvs is now correct) and installs, and on sparc, sqlite-3.6.14.2 can run all tests (with FEATURES='test userpriv') as can pysqlite, Thus, ~sparc keyword added back and this bug can be closed.
I got this error: >>> Unpacking source... >>> Unpacking sqlite_docs_3_6_14.zip to /usr/tmp/portage/dev-db/sqlite-3.6.14.2/work >>> Unpacking sqlite-3.6.14.2.tar.gz to /usr/tmp/portage/dev-db/sqlite-3.6.14.2/work * Applying sandbox-fix2.patch ... [ ok ] * Applying sqlite-3.6.14.2-fix_alignment.patch ... * Failed Patch: sqlite-3.6.14.2-fix_alignment.patch ! * ( /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch ) * * Include in your bugreport the contents of: * * /usr/tmp/portage/dev-db/sqlite-3.6.14.2/temp/sqlite-3.6.14.2-fix_alignment.patch-17435.out * * ERROR: dev-db/sqlite-3.6.14.2 failed. # cat /usr/tmp/portage/dev-db/sqlite-3.6.14.2/temp/sqlite-3.6.14.2-fix_alignment.patch-17435.out ***** sqlite-3.6.14.2-fix_alignment.patch ***** =============================================== PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch =============================================== patching file src/rowset.c Hunk #1 FAILED at 60. 1 out of 2 hunks FAILED -- saving rejects to file src/rowset.c.rej =============================================== PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch =============================================== can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- src/rowset.c |+++ src/rowset.c -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ===============================================
(In reply to comment #12) > I got this error: > >>> Unpacking source... > >>> Unpacking sqlite_docs_3_6_14.zip to /usr/tmp/portage/dev-db/sqlite-3.6.14.2/work > >>> Unpacking sqlite-3.6.14.2.tar.gz to /usr/tmp/portage/dev-db/sqlite-3.6.14.2/work > * Applying sandbox-fix2.patch ... > [ ok ] > * Applying sqlite-3.6.14.2-fix_alignment.patch ... > > * Failed Patch: sqlite-3.6.14.2-fix_alignment.patch ! > * ( /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch ) > * > * Include in your bugreport the contents of: > * > * > /usr/tmp/portage/dev-db/sqlite-3.6.14.2/temp/sqlite-3.6.14.2-fix_alignment.patch-17435.out > > * > * ERROR: dev-db/sqlite-3.6.14.2 failed. > > # cat > /usr/tmp/portage/dev-db/sqlite-3.6.14.2/temp/sqlite-3.6.14.2-fix_alignment.patch-17435.out > ***** sqlite-3.6.14.2-fix_alignment.patch ***** > > =============================================== > > PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < > /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch > > =============================================== > patching file src/rowset.c > Hunk #1 FAILED at 60. > 1 out of 2 hunks FAILED -- saving rejects to file src/rowset.c.rej > =============================================== > > PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < > /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch > > =============================================== > can't find file to patch at input line 3 > Perhaps you used the wrong -p or --strip option? > The text leading up to this was: > -------------------------- > |--- src/rowset.c > |+++ src/rowset.c > -------------------------- > No file to patch. Skipping patch. > 2 out of 2 hunks ignored > =============================================== > This was briefly a problem, but it should be fixed now. I just did 'emerge --sync' on a sparc system and on an amd64 system --- on both systems the patch applies correctly and sqlite builds as expected. Look at /usr/portage/dev-db/sqlite/files/sqlite-3.6.14.2-fix_alignment.patch It should be identical to the patch attached to this file. If it is not, please remove it, 'emerge --sync', and check again.
(In reply to comment #11) Thanks for fixing the patch.
(In reply to comment #14) > (In reply to comment #11) > > Thanks for fixing the patch. > Thanks to robbat2 and tcunha for telling me how. :)