sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Stefan Sperling
Hi,

We have seen sqlite segfault on OpenBSD/sparc64 in the context
of running Subversion's regression test suite:
https://ci.apache.org/builders/svn-bb-openbsd/builds/498

The log files show that a simple 'svn update' triggers the problem:
https://ci.apache.org/builders/svn-bb-openbsd/builds/498/steps/Cleanup/logs/stdio
https://ci.apache.org/builders/svn-bb-openbsd/builds/498/steps/svn/logs/stdio

The trace within sqlite for this crash looks like :

Reading symbols from svn...(no debugging symbols found)...done.
[New process 486437]
Core was generated by `svn'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  sqlite3VdbeRecordUnpack (pKeyInfo=0x4868586788, nKey=-538976289,
pKey=0xdfdfdfdfdfdfdfdf, p=0x48d0b05008) at sqlite3.c:81298
81298     idx = getVarint32(aKey, szHdr);
(gdb) bt
#0  sqlite3VdbeRecordUnpack (pKeyInfo=0x4868586788, nKey=-538976289,
pKey=0xdfdfdfdfdfdfdfdf, p=0x48d0b05008) at sqlite3.c:81298
#1  0x0000004951fca230 in sqlite3VdbeExec (p=0x48a9ed9208) at sqlite3.c:89382
#2  0x0000004951fcda40 in sqlite3Step (p=<optimized out>) at sqlite3.c:83210
#3  sqlite3_step (pStmt=0x48a9ed9208) at sqlite3.c:17739


Note that on OpenBSD 0xdfdfdfdfdfdfdfdf is written to memory which
has been freed.

With sqlite compiled with debugging enabled the problem triggers a
few lines f code earlier and manifests itself as an assertion failure:

#1  0x000000e27e089f48 in *_libc___assert2 (file=0xe2eb9d90e0 "sqlite3.c",
    line=89376, func=0xe2eb9ec9d8 <__func__.59513> "sqlite3VdbeExec",
    failedexpr=0xe2eb9ee570 "pIn3->flags & MEM_Blob")
    at /usr/src/lib/libc/gen/assert.c:52
#2  0x000000e2eb72d42c in sqlite3VdbeExec (p=0xe2a3d0a408) at sqlite3.c:89376


I have been trying to isolate the problem for a couple of hours and
don't believe I'll get much further without help.

What's going on in Subversion is that a 'base node' row is being
inserted into the NODES table in the working copy database.
The query being executed is "STMT_INSERT_NODE":
-- STMT_INSERT_NODE
INSERT OR REPLACE INTO nodes (
  wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
  revision, presence, depth, kind, changed_revision, changed_date,
  changed_author, checksum, properties, translated_size, last_mod_time,
  dav_cache, symlink_target, file_external, moved_to, moved_here,
  inherited_props)
VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14,
        ?15, ?16, ?17, ?18, ?19, ?20, ?21, ?22, ?23)

The input values bound to this query by Subversion all seem fine.

I also know that Subversion was working fine before I upgraded this
sparc64 machine to a newer OpenBSD -current snapshot on March 8, at
which point among many unrelated updates the sqlite package on the
system was upgraded from 3.30.1 to 3.31.1. As you can see on this page,
builds were green before I upgraded the system:
https://ci.apache.org/builders/svn-bb-openbsd

Below is a full back trace with debug symbols, compiled from the
sqlite-autoconf-3310100 release. At the end I've included values from
some data structures that seem relevant.

Is this enough information? I can reproduce the problem reliably,
so if you need more information just let me know what you want to see.

Cheers,
Stefan


This trace is from 'svn up' in a working copy of svn.apache.org's
"repos/asf/apr/trunk" folder, which I happened to have available.

(gdb) bt
#0  *_libc_abort () at /usr/src/lib/libc/stdlib/abort.c:57
#1  0x000000e27e089f48 in *_libc___assert2 (file=0xe2eb9d90e0 "sqlite3.c",
    line=89376, func=0xe2eb9ec9d8 <__func__.59513> "sqlite3VdbeExec",
    failedexpr=0xe2eb9ee570 "pIn3->flags & MEM_Blob")
    at /usr/src/lib/libc/gen/assert.c:52
#2  0x000000e2eb72d42c in sqlite3VdbeExec (p=0xe2a3d0a408) at sqlite3.c:89376
#3  0x000000e2eb71a370 in sqlite3Step (p=0xe2a3d0a408) at sqlite3.c:83210
#4  0x000000e2eb71a894 in sqlite3_step (pStmt=0xe2a3d0a408) at sqlite3.c:83275
#5  0x000000e30cfff5fc in svn_sqlite__step (got_row=0xfffffffffffeb734,
    stmt=0xe332deb910) at subversion/libsvn_subr/sqlite.c:347
#6  0x000000e30cfff6d8 in svn_sqlite__insert (row_id=0x0, stmt=0xe332deb910)
    at subversion/libsvn_subr/sqlite.c:371
#7  0x000000e2896d9034 in insert_base_node (pibb=0xfffffffffffeb9a0,
    wcroot=0xe2754a2d60, local_relpath=0xe27a8481a1 "file_io/os2",
    scratch_pool=0xe27a848028) at subversion/libsvn_wc/wc_db.c:812
#8  0x000000e2896dd1a4 in svn_wc__db_base_add_directory (db=<optimized out>,
    local_abspath=0xe27a848188 "/home/stsp/src/apr-trunk/file_io/os2",
    wri_abspath=<optimized out>,
    repos_relpath=0xe27a8482d8 "apr/apr/trunk/file_io/os2",
    repos_root_url=0xe2754a7628 "https://svn.apache.org/repos/asf",
    repos_uuid=0xe2754a7650 "13f79535-47bb-0310-9956-ffa450edef68",
    revision=1875042, props=0xe27a848890, changed_rev=1866019,
    changed_date=1566976038342098, changed_author=0xe27a848ba8 "jorton",
    children=0x0, depth=svn_depth_empty, dav_cache=0x0, update_actual_props=1,
    new_actual_props=0xe27a848988, new_iprops=0x0, conflict=0x0,
    work_items=0x0, scratch_pool=0xe27a848028)
#9  0x000000e2896b8d9c in close_directory (dir_baton=0xe27a8480a0,
    pool=0xe2e98b6028) at subversion/libsvn_wc/update_editor.c:2799
#10 0x000000e3055be394 in close_directory (dir_baton=0xe2e98b6188,
    pool=0xe2e98b6028) at subversion/libsvn_delta/cancel.c:281
#11 0x000000e304d9ffa0 in maybe_close_dir (dir=0xe2e98b60a0)
    at subversion/libsvn_ra_serf/update.c:738
#12 0x000000e304da0bb8 in update_closed (xes=0xe2433100a0, baton=0xe2754a7738,
    leaving_state=<optimized out>, cdata=0x0, attrs=0xe2433100e8,
    scratch_pool=0xe332df0028) at subversion/libsvn_ra_serf/update.c:1826
#13 0x000000e304da5a10 in xml_cb_end (raw_name=<optimized out>,
    xmlctx=0xe25fc30100) at subversion/libsvn_ra_serf/xml.c:813
#14 expat_end (baton=<optimized out>, raw_name=<optimized out>)
    at subversion/libsvn_ra_serf/xml.c:904
#15 0x000000e30d014994 in expat_end_handler (userData=0xe25fc302c0,
    name=0xe290d6fc60 "S:open-directory") at subversion/libsvn_subr/xml.c:371
#16 0x000000e32cdcd298 in doContent (parser=0xe2a6ecac00, startTagLevel=0,
    enc=0xe32d0d9e88 <utf8_encoding>,
    s=0xe289594a98 "</S:open-directory>\n<S:open-directory name=\"unix\" rev=\"1855812\">\n<D:checked-in><D:href>/repos/asf/!svn/rvr/1866019/apr/apr/trunk/file_io/unix</D:href></D:checked-in>\n<S:set-prop name=\"svn:entry:commit"...,
    end=0xe289595f40 "\n   rev=\"1855812\"\n   depth=\"infinity\">threadproc/beos/proc.c</S:entry>\n", '\337' <repeats 120 times>, <incomplete sequence \337>,
    nextPtr=0xe2a6ecac30, haveMore=1 '\001')
    at /usr/src/lib/libexpat/lib/xmlparse.c:2656
#17 0x000000e32cdce030 in contentProcessor (parser=0xe2a6ecac00,
    start=0xe289594027 "<S:update-report xmlns:S=\"svn:\" xmlns:V=\"http://subversion.tigris.org/xmlns/dav/\" xmlns:D=\"DAV:\"  inline-props=\"true\">\n<S:target-revision rev=\"1875042\"/>\n<S:open-directory rev=\"1875041\">\n<D:checked-in"...,
    end=0xe289595f40 "\n   rev=\"1855812\"\n   depth=\"infinity\">threadproc/beos/proc.c</S:entry>\n", '\337' <repeats 120 times>, <incomplete sequence \337>,
    endPtr=0xe2a6ecac30) at /usr/src/lib/libexpat/lib/xmlparse.c:2257
#18 0x000000e32cdce578 in doProlog (parser=0xe2a6ecac00,
    enc=0xe32d0d9e88 <utf8_encoding>,
    s=0xe289594027 "<S:update-report xmlns:S=\"svn:\" xmlns:V=\"http://subversion.tigris.org/xmlns/dav/\" xmlns:D=\"DAV:\"  inline-props=\"true\">\n<S:target-revision rev=\"1875042\"/>\n<S:open-directory rev=\"1875041\">\n<D:checked-in"...,
    end=0xe289595f40 "\n   rev=\"1855812\"\n   depth=\"infinity\">threadproc/beos/proc.c</S:entry>\n", '\337' <repeats 120 times>, <incomplete sequence \337>,
    tok=29,
    next=0xe289594027 "<S:update-report xmlns:S=\"svn:\" xmlns:V=\"http://subversion.tigris.org/xmlns/dav/\" xmlns:D=\"DAV:\"  inline-props=\"true\">\n<S:target-revision rev=\"1875042\"/>\n<S:open-directory rev=\"1875041\">\n<D:checked-in"..., nextPtr=0xe2a6ecac30, haveMore=1 '\001', allowClosingDoctype=0 '\000')
    at /usr/src/lib/libexpat/lib/xmlparse.c:4182
#19 0x000000e32cdcfea4 in prologProcessor (parser=0xe2a6ecac00,
    s=0xe289594000 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:V=\"http://subversion.tigris.org/xmlns/dav/\" xmlns:D=\"DAV:\"  inline-props=\"true\">\n<S:target-revision rev=\"1875042\"/>\n<S:open"...,
    end=0xe289595f40 "\n   rev=\"1855812\"\n   depth=\"infinity\">threadproc/beos/proc.c</S:entry>\n", '\337' <repeats 120 times>, <incomplete sequence \337>,
---Type <return> to continue, or q <return> to quit---
    nextPtr=0xe2a6ecac30) at /usr/src/lib/libexpat/lib/xmlparse.c:3905
#20 0x000000e32cdc9b0c in XML_ParseBuffer (parser=0xe2a6ecac00, len=8000,
    isFinal=0) at /usr/src/lib/libexpat/lib/xmlparse.c:1704
#21 0x000000e30d014748 in svn_xml_parse (svn_parser=0xe25fc302c0,
    buf=0xe3266940ca "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:V=\"http://subversion.tigris.org/xmlns/dav/\" xmlns:D=\"DAV:\"  inline-props=\"true\">\n<S:target-revision rev=\"1875042\"/>\n<S:open"..., len=0, is_final=0) at subversion/libsvn_subr/xml.c:500
#22 0x000000e304da6508 in parse_xml (is_final=<optimized out>,
    len=<optimized out>, data=<optimized out>, ectx=<optimized out>)
    at subversion/libsvn_ra_serf/xml.c:874
#23 expat_response_handler (request=0xe326690038, response=0xe33a079138,
    baton=0xe25fc30190, scratch_pool=<optimized out>)
    at subversion/libsvn_ra_serf/xml.c:989
#24 0x000000e304d9f640 in process_buffer (udb=0xe25fc30298,
    request=0xe326690038, data=0xe3266940ca, len=8000, at_eof=0,
    alloc=<optimized out>, pool=0xe27a84c028)
    at subversion/libsvn_ra_serf/update.c:2215
#25 0x000000e304d9fdb0 in update_delay_handler (request=0xe326690038,
    response=0xe33a078a38, handler_baton=0xe25fc30298,
    scratch_pool=0xe324ee8028) at subversion/libsvn_ra_serf/update.c:2275
#26 0x000000e304da428c in handle_response (scratch_pool=<optimized out>,
    serf_status=<optimized out>, handler=<optimized out>,
    response=<optimized out>, request=<optimized out>)
    at subversion/libsvn_ra_serf/util.c:1487
#27 handle_response_cb (request=0xe326690038, response=0xe33a078a38,
    baton=0xe25fc301b8, response_pool=0xe324ee8028)
    at subversion/libsvn_ra_serf/util.c:1521
#28 0x000000e31bc9ed60 in serf.process_connection ()
   from /usr/local/lib/libserf-1.so.1.0
#29 0x000000e31bc9ca18 in serf_event_trigger ()
   from /usr/local/lib/libserf-1.so.1.0
#30 0x000000e31bc9cc4c in serf_context_run ()
   from /usr/local/lib/libserf-1.so.1.0
#31 0x000000e304da46f0 in svn_ra_serf__context_run (sess=0xe2ca7e6258,
    waittime_left=0xfffffffffffecf40, scratch_pool=0xe283b32028)
    at subversion/libsvn_ra_serf/util.c:913
#32 0x000000e304d9f8f4 in process_editor_report (scratch_pool=<optimized out>,
    handler=<optimized out>, ctx=<optimized out>)
    at subversion/libsvn_ra_serf/update.c:2429
#33 finish_report (report_baton=0xe2754a7738, pool=<optimized out>)
    at subversion/libsvn_ra_serf/update.c:2504
#34 0x000000e28967df0c in svn_wc_crawl_revisions5 (wc_ctx=0x0,
    local_abspath=0xe2754a6160 "/home/stsp/src/apr-trunk",
    reporter=0xe3050c4198 <ra_serf_reporter>, report_baton=0xe2754a7738,
    restore_files=0, depth=svn_depth_unknown, honor_depth_exclude=1,
    depth_compatibility_trick=0, use_commit_times=0,
    cancel_func=0xe30cfcd840 <check_cancel>, cancel_baton=0x0,
    notify_func=0xe041912f40 <svn_cl__check_externals_failed_notify_wrapper>,
    notify_baton=0xfffffffffffed848, scratch_pool=0xe2754a6028)
    at subversion/libsvn_wc/adm_crawler.c:859
#35 0x000000e2df098fd4 in update_internal (result_rev=0xfffffffffffed710,
    timestamp_sleep=0xfffffffffffed724, conflicted_paths=0x0,
    ra_session_p=<optimized out>,
    local_abspath=0xe2754a6160 "/home/stsp/src/apr-trunk",
    anchor_abspath=0xe2754a6288 "/home/stsp/src/apr-trunk",
    revision=0xfffffffffffed5d0, depth=svn_depth_unknown, depth_is_sticky=0,
    ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=0,
    notify_summary=<optimized out>, ctx=0xe24f173650,
    result_pool=0xe2754a6028, scratch_pool=0xe2754a6028)
    at subversion/libsvn_client/update.c:560
#36 0x000000e2df099620 in svn_client__update_internal (
    result_rev=0xfffffffffffed710, timestamp_sleep=0xfffffffffffed724,
    local_abspath=0xe2754a6160 "/home/stsp/src/apr-trunk",
    revision=<optimized out>, depth=svn_depth_exclude, depth_is_sticky=0,
    ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=0,
    make_parents=<optimized out>, innerupdate=0, ra_session=0xe2ca7e6230,
    ctx=0xe24f173650, pool=0xe2754a6028)
    at subversion/libsvn_client/update.c:696
#37 0x000000e2df099884 in svn_client_update4 (result_revs=0xfffffffffffed878,
    paths=0xe2754a24f0, revision=0xfffffffffffeda58, depth=svn_depth_exclude,
    depth_is_sticky=0, ignore_externals=0, allow_unver_obstructions=0,
    adds_as_modification=0, make_parents=0, ctx=0xe24f173650,
    pool=0xe24f172028) at subversion/libsvn_client/update.c:770
#38 0x000000e041920220 in svn_cl__update (os=<optimized out>,
    baton=<optimized out>, scratch_pool=0xe24f172028)
    at subversion/svn/update-cmd.c:169
#39 0x000000e04191f26c in sub_main (pool=<optimized out>,
    argv=<optimized out>, argc=<optimized out>, exit_code=<optimized out>)
    at subversion/svn/svn.c:3459
#40 main (argc=<optimized out>, argv=0xfffffffffffedeb8)
    at subversion/svn/svn.c:3544
(gdb) p /x *pIn3
$7 = {u = {r = 0x0, i = 0x1, nZero = 0x0, zPType = 0x1, pDef = 0x1},
  flags = 0x844, enc = 0x0, eSubtype = 0x0, n = 0x0, z = 0xfffffff90000002b,
  zMalloc = 0x0, szMalloc = 0x0, uTemp = 0x9, db = 0xe31cd40008, xDel = 0x0,
  pScopyFrom = 0x0, mScopyFlags = 0x844}
(gdb) p *aMem
$8 = {u = {r = 0, i = 0, nZero = 0, zPType = 0x0, pDef = 0x0}, flags = 128,
  enc = 0 '\000', eSubtype = 0 '\000', n = 0, z = 0xe332def008 "",
  zMalloc = 0xe332def008 "", szMalloc = 600, uTemp = 0, db = 0xe31cd40008,
  xDel = 0x0, pScopyFrom = 0x0, mScopyFlags = 0}
(gdb) p *p
$9 = {db = 0xe31cd40008, pPrev = 0x0, pNext = 0xe2ca5c3408,
  pParse = 0xfffffffffffeb1f0, nVar = 23, magic = 770837923, nMem = 141,
  nCursor = 4, cacheCtr = 1, pc = 0, rc = 0, nChange = 0, iStatement = 1,
  iCurrentTime = 0, nFkConstraint = 0, nStmtDefCons = 0, nStmtDefImmCons = 0,
  aMem = 0xe27f332008, apArg = 0xe28959d990, apCsr = 0xe28959d970,
  aVar = 0xe28959d990, aOp = 0xe28959c008, nOp = 144, nOpAlloc = 256,
  aColName = 0x0, pResultSet = 0x0, zErrMsg = 0x0, pVList = 0xe2bc593008,
  startTime = 0, rcApp = 0, nWrite = 4, nResColumn = 0,
  errorAction = 2 '\002', minWriteFileFormat = 4 '\004',
  prepFlags = 128 '\200', expired = 0, explain = 0, doingRerun = 0,
  changeCntOn = 1, runOnlyOnce = 0, usesStmtJournal = 1, readOnly = 0,
  bIsReader = 1, btreeMask = 1, lockMask = 1, aCounter = {0, 0, 0, 0, 0, 0,
    2},
  zSql = 0xe2a3d0a608 "INSERT OR REPLACE INTO nodes (   wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,   revision, presence, depth, kind, changed_revision, changed_date,   changed_author, checksum, pr"...,
  pFree = 0xe27f332008, pFrame = 0x0, pDelFrame = 0x0, nFrame = 0,
  expmask = 0, pProgram = 0xe31eeacdc8, pAuxData = 0x0}
(gdb)

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Richard Hipp-3
On 3/10/20, Stefan Sperling <[hidden email]> wrote:

> The query being executed is "STMT_INSERT_NODE":
> -- STMT_INSERT_NODE
> INSERT OR REPLACE INTO nodes (
>   wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
>   revision, presence, depth, kind, changed_revision, changed_date,
>   changed_author, checksum, properties, translated_size, last_mod_time,
>   dav_cache, symlink_target, file_external, moved_to, moved_here,
>   inherited_props)
> VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14,
>         ?15, ?16, ?17, ?18, ?19, ?20, ?21, ?22, ?23)

It would be great if you could send us the database schema - or even
the whole database if it isn't too big.  You can send to my private
email if you like.

Probably if I have the schema I will be able to repro the problem.

Is this only happening on Sparc, and not on x64 or ARM or PPC, etc?

Does valgrind give any clues?

Something else that might be helpful, if you have time:

Set a breakpoint on the sqlite3VdbeExec() function that fires when the
statement that is crashing is first executed.  (You can determine that
it is the correct statement by looking at the value of p->zSql.)  Then
do:

     set p->db->flags = p->db->flags | ((0x0600000)<<32)

That will turn on bytecode listing and tracing, and might provide
further clues.  Please record and send in the trace.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Stefan Sperling
On Tue, Mar 10, 2020 at 01:21:34PM -0400, Richard Hipp wrote:

> On 3/10/20, Stefan Sperling <[hidden email]> wrote:
> > The query being executed is "STMT_INSERT_NODE":
> > -- STMT_INSERT_NODE
> > INSERT OR REPLACE INTO nodes (
> >   wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
> >   revision, presence, depth, kind, changed_revision, changed_date,
> >   changed_author, checksum, properties, translated_size, last_mod_time,
> >   dav_cache, symlink_target, file_external, moved_to, moved_here,
> >   inherited_props)
> > VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14,
> >         ?15, ?16, ?17, ?18, ?19, ?20, ?21, ?22, ?23)
>
> It would be great if you could send us the database schema - or even
> the whole database if it isn't too big.
>
> Probably if I have the schema I will be able to repro the problem.

The schema is public:
https://svn.apache.org/repos/asf/subversion/branches/1.13.x/subversion/libsvn_wc/wc-metadata.sql

> Is this only happening on Sparc, and not on x64 or ARM or PPC, etc?

It looks like it is specific to sparc64 so far.
I cannot reproduce it on amd64 with the same software versions.
I do not have access to arm/ppc machines at present.

> Does valgrind give any clues?

Valgrind does not run on the OpenBSD/sparc64 platform, unfortunately.

> Something else that might be helpful, if you have time:
>
> Set a breakpoint on the sqlite3VdbeExec() function that fires when the
> statement that is crashing is first executed.  (You can determine that
> it is the correct statement by looking at the value of p->zSql.)  Then
> do:
>
>      set p->db->flags = p->db->flags | ((0x0600000)<<32)
>
> That will turn on bytecode listing and tracing, and might provide
> further clues.  Please record and send in the trace.

I will look into this. Thanks!
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Dominique Pellé
Stefan Sperling wrote:

> > Does valgrind give any clues?
>
> Valgrind does not run on the OpenBSD/sparc64 platform, unfortunately.

Would the address sanitizer (i.e. gcc -fsanitize=address, or
clang -fsanitize=address) work on OpenBSD/sparc64?

Regards
Dominique
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Stefan Sperling
In reply to this post by Stefan Sperling
On Tue, Mar 10, 2020 at 06:42:18PM +0100, Stefan Sperling wrote:

> On Tue, Mar 10, 2020 at 01:21:34PM -0400, Richard Hipp wrote:
> > Set a breakpoint on the sqlite3VdbeExec() function that fires when the
> > statement that is crashing is first executed.  (You can determine that
> > it is the correct statement by looking at the value of p->zSql.)  Then
> > do:
> >
> >      set p->db->flags = p->db->flags | ((0x0600000)<<32)
> >
> > That will turn on bytecode listing and tracing, and might provide
> > further clues.  Please record and send in the trace.
>
> I will look into this. Thanks!

Does this help?

$ egdb --args svn up                                                <
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc64-unknown-openbsd6.6".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from svn...done.
(gdb) br sqlite3.c:83210 if p->zSql && strncmp(p->zSql, "INSERT OR REPLACE INTO", 22) == 0
No source file named sqlite3.c.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (sqlite3.c:83210 if p->zSql && strncmp(p->zSql, "INSERT OR REPLACE INTO", 22) == 0) pending.
(gdb) run
Starting program: /usr/local/bin/svn up
Updating '.':

Breakpoint 1, sqlite3Step (p=0xd69cb26608) at sqlite3.c:83210
83210       rc = sqlite3VdbeExec(p);
(gdb) set p->db->flags = p->db->flags | (((unsigned long long)0x0600000)<<32)
(gdb) p /x p->db->flags
$1 = 0x600000e004a0e0
(gdb) c
Continuing.
SQL: [INSERT OR REPLACE INTO nodes (   wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,   revision, presence, depth, kind, changed_revision, changed_date,   changed_author, checksum, properties, translated_size, last_mod_time,   dav_cache, symlink_target, file_external, moved_to, moved_here,   inherited_props) VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14,         ?15, ?16, ?17, ?18, ?19, ?20, ?21, ?22, ?23) ]
VDBE Program Listing:
   0 Init             0  140    0               00 Start at 140
   1 OpenWrite        0   16    0 23            00 root=16 iDb=0; NODES
   2 OpenWrite        1   29    0 k(4,,,,)      00 root=29 iDb=0; I_NODES_MOVED
   3 OpenWrite        2   27    0 k(5,,,,,)     00 root=27 iDb=0; I_NODES_PARENT
   4 OpenWrite        3   17    0 k(3,,,)       00 root=17 iDb=0; sqlite_autoindex_NODES_1
   5 Variable         1    2    0 ?1            00 r[2]=parameter(1,?1)
   6 Variable         2    3    0 ?2            00 r[3]=parameter(2,?2)
   7 Variable         3    4    0 ?3            00 r[4]=parameter(3,?3)
   8 Variable         4    5    0 ?4            00 r[5]=parameter(4,?4)
   9 Variable         5    6    0 ?5            00 r[6]=parameter(5,?5)
  10 Variable         6    7    0 ?6            00 r[7]=parameter(6,?6)
  11 Variable         7    8    0 ?7            00 r[8]=parameter(7,?7)
  12 Variable         8    9    0 ?8            00 r[9]=parameter(8,?8)
  13 Variable        22   10    0 ?22           00 r[10]=parameter(22,?22)
  14 Variable        21   11    0 ?21           00 r[11]=parameter(21,?21)
  15 Variable        10   12    0 ?10           00 r[12]=parameter(10,?10)
  16 Variable        15   13    0 ?15           00 r[13]=parameter(15,?15)
  17 Variable         9   14    0 ?9            00 r[14]=parameter(9,?9)
  18 Variable        14   15    0 ?14           00 r[15]=parameter(14,?14)
  19 Variable        19   16    0 ?19           00 r[16]=parameter(19,?19)
  20 Variable        11   17    0 ?11           00 r[17]=parameter(11,?11)
  21 Variable        12   18    0 ?12           00 r[18]=parameter(12,?12)
  22 Variable        13   19    0 ?13           00 r[19]=parameter(13,?13)
  23 Variable        16   20    0 ?16           00 r[20]=parameter(16,?16)
  24 Variable        17   21    0 ?17           00 r[21]=parameter(17,?17)
  25 Variable        18   22    0 ?18           00 r[22]=parameter(18,?18)
  26 Variable        20   23    0 ?20           00 r[23]=parameter(20,?20)
  27 Variable        23   24    0 ?23           00 r[24]=parameter(23,?23)
  28 NewRowid         0    1    0               00 r[1]=rowid
  29 HaltIfNull    1299    2    2 NODES.wc_id   01 if r[2]=null halt
  30 HaltIfNull    1299    2    3 NODES.local_relpath 01 if r[3]=null halt
  31 HaltIfNull    1299    2    4 NODES.op_depth 01 if r[4]=null halt
  32 HaltIfNull    1299    2    9 NODES.presence 01 if r[9]=null halt
  33 HaltIfNull    1299    2   12 NODES.kind    01 if r[12]=null halt
  34 Integer          0   42    0               00 r[42]=0; trigger count
  35 Affinity         2   22    0 DBDBDBDBDBBABBBDDBDDAD 00 affinity(r[2..23])
  36 Noop             0    0    0               00 uniqueness check for I_NODES_MOVED
  37 SCopy            2   26    0               00 r[26]=r[2]; wc_id
  38 SCopy           11   27    0               00 r[27]=r[11]; moved_to
  39 SCopy            4   28    0               00 r[28]=r[4]; op_depth
  40 IntCopy          1   29    0               00 r[29]=r[1]; rowid
  41 MakeRecord      26    4   25               00 r[25]=mkrec(r[26..29]); for I_NODES_MOVED
  42 ReleaseReg      26    4    0               00 release r[26..29] mask 0
  43 NoConflict       1   66   26 3             00 key=r[26..28]
  44 IdxRowid         1   43    0               00 r[43]=rowid
  45 NotExists        0   62   43 1             00 intkey=r[43]
  46 Copy            43   44    0               00 r[44]=r[43]
  47 Column           0   13   58               00 r[58]=NODES.checksum
  48 Column           0    0   68               00 r[68]=NODES.wc_id
  49 Column           0    3   69               00 r[69]=NODES.parent_relpath
  50 Column           0    1   70               00 r[70]=NODES.local_relpath
  51 Column           0    2   71               00 r[71]=NODES.op_depth
  52 Rowid            0   72    0               00 r[72]=rowid
  53 ReleaseReg      68    5    0               00 release r[68..72] mask 0
  54 IdxDelete        2   68    5               00 key=r[68..72]
  55 Column           0    1   69               00 r[69]=NODES.local_relpath
  56 Column           0    2   70               00 r[70]=NODES.op_depth
  57 ReleaseReg      68    3    0               00 release r[68..70] mask 0
  58 IdxDelete        3   68    3               00 key=r[68..70]
  59 Delete           0    0    0 NODES         00
  60 Delete           1    0    0               00
  61 Program         44   62   73 program       00 Call: nodes_delete_trigger.replace
  62 AddImm          42    1    0               00 r[42]=r[42]+1
  63 Goto             0   66    0               00 bypass recheck
  64 NoConflict       1   94   26 0             00 key=r[26]
  65 Halt          2067    2    0 NODES.wc_id, NODES.moved_to, NODES.op_depth 02
  66 ReleaseReg      43    1    0               00 release r[43] mask 0
  67 Noop             0    0    0               00 uniqueness check for I_NODES_PARENT
  68 SCopy            2   31    0               00 r[31]=r[2]; wc_id
  69 SCopy            5   32    0               00 r[32]=r[5]; parent_relpath
  70 SCopy            3   33    0               00 r[33]=r[3]; local_relpath
  71 SCopy            4   34    0               00 r[34]=r[4]; op_depth
  72 IntCopy          1   35    0               00 r[35]=r[1]; rowid
  73 MakeRecord      31    5   30               00 r[30]=mkrec(r[31..35]); for I_NODES_PARENT
  74 ReleaseReg      31    5    0               00 release r[31..35] mask 0
  75 NoConflict       2   96   31 4             00 key=r[31..34]
  76 IdxRowid         2   43    0               00 r[43]=rowid
  77 NotExists        0   92   43 1             00 intkey=r[43]
  78 Copy            43   74    0               00 r[74]=r[43]
  79 Column           0   13   88               00 r[88]=NODES.checksum
  80 Column           0    0   98               00 r[98]=NODES.wc_id
  81 Column           0    9   99               00 r[99]=NODES.moved_to
  82 Column           0    2  100               00 r[100]=NODES.op_depth
  83 Rowid            0  101    0               00 r[101]=rowid
  84 ReleaseReg      98    4    0               00 release r[98..101] mask 0
  85 IdxDelete        1   98    4               00 key=r[98..101]
  86 Column           0    1   99               00 r[99]=NODES.local_relpath
  87 ReleaseReg      98    3    0               00 release r[98..100] mask 0
  88 IdxDelete        3   98    3               00 key=r[98..100]
  89 Delete           0    0    0 NODES         00
  90 Delete           2    0    0               00
  91 Program         74   92  102 program       00 Call: nodes_delete_trigger.replace
  92 AddImm          42    1    0               00 r[42]=r[42]+1
  93 Goto             0   96    0               00 bypass recheck
  94 NoConflict       2  127   31 0             00 key=r[31]
  95 Halt          2067    2    0 NODES.wc_id, NODES.parent_relpath, NODES.local_relpath, NODES.op_depth 02
  96 ReleaseReg      43    1    0               00 release r[43] mask 0
  97 Noop             0    0    0               00 uniqueness check for sqlite_autoindex_NODES_1
  98 SCopy            2   37    0               00 r[37]=r[2]; wc_id
  99 SCopy            3   38    0               00 r[38]=r[3]; local_relpath
 100 SCopy            4   39    0               00 r[39]=r[4]; op_depth
 101 IntCopy          1   40    0               00 r[40]=r[1]; rowid
 102 MakeRecord      37    4   36               00 r[36]=mkrec(r[37..40]); for sqlite_autoindex_NODES_1
 103 ReleaseReg      37    4    0               00 release r[37..40] mask 0
 104 NoConflict       3  129   37 3             00 key=r[37..39]
 105 IdxRowid         3   43    0               00 r[43]=rowid
 106 NotExists        0  125   43 1             00 intkey=r[43]
 107 Copy            43  103    0               00 r[103]=r[43]
 108 Column           0   13  117               00 r[117]=NODES.checksum
 109 Column           0    0  127               00 r[127]=NODES.wc_id
 110 Column           0    9  128               00 r[128]=NODES.moved_to
 111 Column           0    2  129               00 r[129]=NODES.op_depth
 112 Rowid            0  130    0               00 r[130]=rowid
 113 ReleaseReg     127    4    0               00 release r[127..130] mask 0
 114 IdxDelete        1  127    4               00 key=r[127..130]
 115 Column           0    0  131               00 r[131]=NODES.wc_id
 116 Column           0    3  132               00 r[132]=NODES.parent_relpath
 117 Column           0    1  133               00 r[133]=NODES.local_relpath
 118 Column           0    2  134               00 r[134]=NODES.op_depth
 119 Rowid            0  135    0               00 r[135]=rowid
 120 ReleaseReg     131    5    0               00 release r[131..135] mask 0
 121 IdxDelete        2  131    5               00 key=r[131..135]
 122 Delete           0    0    0 NODES         00
 123 Delete           3    0    0               00
 124 Program        103  125  136 program       00 Call: nodes_delete_trigger.replace
 125 AddImm          42    1    0               00 r[42]=r[42]+1
 126 Goto             0  129    0               00 bypass recheck
 127 NoConflict       3  133   37 0             00 key=r[37]
 128 Halt          1555    2    0 NODES.wc_id, NODES.local_relpath, NODES.op_depth 02
 129 ReleaseReg      43    1    0               00 release r[43] mask 0
 130 IfNot           42  133    0               00
 131 NotExists        0   64    1               00 intkey=r[1]
 132 Halt          2579    2    0 NODES.rowid   02
 133 MakeRecord       2   23   41               00 r[41]=mkrec(r[2..24])
 134 IdxInsert        1   25   26 4             00 key=r[25]
 135 IdxInsert        2   30   31 5             00 key=r[30]
 136 IdxInsert        3   36   37 3             00 key=r[36]
 137 Insert           0   41    1 NODES         29 intkey=r[1] data=r[41]
 138 Program        -23  139  137 program       00 Call: nodes_insert_trigger.replace
 139 Halt             0    0    0               00
 140 Transaction      0    1   30 0             01 usesStmtJournal=1
 141 TableLock        0   16    1 NODES         00 iDb=0 root=16 write=1
 142 TableLock        0    7    1 PRISTINE      00 iDb=0 root=7 write=1
 143 Goto             0    1    0               00
VDBE Trace:
   0 Init             0  140    0               00 Start at 140
 140 Transaction      0    1   30 0             01 usesStmtJournal=1
 141 TableLock        0   16    1 NODES         00 iDb=0 root=16 write=1
 142 TableLock        0    7    1 PRISTINE      00 iDb=0 root=7 write=1
 143 Goto             0    1    0               00
   1 OpenWrite        0   16    0 23            00 root=16 iDb=0; NODES
   2 OpenWrite        1   29    0 k(4,,,,)      00 root=29 iDb=0; I_NODES_MOVED
   3 OpenWrite        2   27    0 k(5,,,,,)     00 root=27 iDb=0; I_NODES_PARENT
   4 OpenWrite        3   17    0 k(3,,,)       00 root=17 iDb=0; sqlite_autoindex_NODES_1
   5 Variable         1    2    0 ?1            00 r[2]=parameter(1,?1)
R[2] =  i:1
   6 Variable         2    3    0 ?2            00 r[3]=parameter(2,?2)
R[3] =   t11[file_io/os2](8)
   7 Variable         3    4    0 ?3            00 r[4]=parameter(3,?3)
R[4] =  i:0
   8 Variable         4    5    0 ?4            00 r[5]=parameter(4,?4)
R[5] =   t7[file_io](8)
   9 Variable         5    6    0 ?5            00 r[6]=parameter(5,?5)
R[6] =  i:1
  10 Variable         6    7    0 ?6            00 r[7]=parameter(6,?6)
R[7] =   t25[apr/apr/trunk/file_io/os2](8)
  11 Variable         7    8    0 ?7            00 r[8]=parameter(7,?7)
R[8] =  i:1875080
  12 Variable         8    9    0 ?8            00 r[9]=parameter(8,?8)
R[9] =   t6[normal](8)
  13 Variable        22   10    0 ?22           00 r[10]=parameter(22,?22)
R[10] =  NULL
  14 Variable        21   11    0 ?21           00 r[11]=parameter(21,?21)
R[11] =  NULL
  15 Variable        10   12    0 ?10           00 r[12]=parameter(10,?10)
R[12] =   t3[dir](8)
  16 Variable        15   13    0 ?15           00 r[13]=parameter(15,?15)
R[13] =  tx[2873766E3A69676E6F7265203235204D616B6566696C650A2A|(svn:ignore 25 Makefile.*]
  17 Variable         9   14    0 ?9            00 r[14]=parameter(9,?9)
R[14] =   t8[infinity](8)
  18 Variable        14   15    0 ?14           00 r[15]=parameter(14,?14)
R[15] =  NULL
  19 Variable        19   16    0 ?19           00 r[16]=parameter(19,?19)
R[16] =  NULL
  20 Variable        11   17    0 ?11           00 r[17]=parameter(11,?11)
R[17] =  i:1866019
  21 Variable        12   18    0 ?12           00 r[18]=parameter(12,?12)
R[18] =  i:1566976038342098
  22 Variable        13   19    0 ?13           00 r[19]=parameter(13,?13)
R[19] =   t6[jorton](8)
  23 Variable        16   20    0 ?16           00 r[20]=parameter(16,?16)
R[20] =  NULL
  24 Variable        17   21    0 ?17           00 r[21]=parameter(17,?17)
R[21] =  NULL
  25 Variable        18   22    0 ?18           00 r[22]=parameter(18,?18)
R[22] =  NULL
  26 Variable        20   23    0 ?20           00 r[23]=parameter(20,?20)
R[23] =  NULL
  27 Variable        23   24    0 ?23           00 r[24]=parameter(23,?23)
R[24] =  NULL
  28 NewRowid         0    1    0               00 r[1]=rowid
R[1] =  i:867
  29 HaltIfNull    1299    2    2 NODES.wc_id   01 if r[2]=null halt
R[2] =  i:1
  30 HaltIfNull    1299    2    3 NODES.local_relpath 01 if r[3]=null halt
R[3] =   t11[file_io/os2](8)
  31 HaltIfNull    1299    2    4 NODES.op_depth 01 if r[4]=null halt
R[4] =  i:0
  32 HaltIfNull    1299    2    9 NODES.presence 01 if r[9]=null halt
R[9] =   t6[normal](8)
  33 HaltIfNull    1299    2   12 NODES.kind    01 if r[12]=null halt
R[12] =   t3[dir](8)
  34 Integer          0   42    0               00 r[42]=0; trigger count
R[42] =  i:0
  35 Affinity         2   22    0 DBDBDBDBDBBABBBDDBDDAD 00 affinity(r[2..23])
R[2] =  i:1
R[3] =   t11[file_io/os2](8)
R[4] =  i:0
R[5] =   t7[file_io](8)
R[6] =  i:1
R[7] =   t25[apr/apr/trunk/file_io/os2](8)
R[8] =  i:1875080
R[9] =   t6[normal](8)
R[10] =  NULL
R[11] =  NULL
R[12] =   t3[dir](8)
R[13] =  tx[2873766E3A69676E6F7265203235204D616B6566696C650A2A|(svn:ignore 25 Makefile.*]
R[14] =   t8[infinity](8)
R[15] =  NULL
R[16] =  NULL
R[17] =  i:1866019
R[18] =  i:1566976038342098
R[19] =   t6[jorton](8)
R[20] =  NULL
R[21] =  NULL
R[22] =  NULL
R[23] =  NULL
  36 Noop             0    0    0               00 uniqueness check for I_NODES_MOVED
  37 SCopy            2   26    0               00 r[26]=r[2]; wc_id
R[26] =  i:1 <== R[2]
  38 SCopy           11   27    0               00 r[27]=r[11]; moved_to
R[27] =  NULL <== R[11]
  39 SCopy            4   28    0               00 r[28]=r[4]; op_depth
R[28] =  i:0 <== R[4]
  40 IntCopy          1   29    0               00 r[29]=r[1]; rowid
R[29] =  i:867
  41 MakeRecord      26    4   25               00 r[25]=mkrec(r[26..29]); for I_NODES_MOVED
R[25] =  sx[05090008020363|......c]
  42 ReleaseReg      26    4    0               00 release r[26..29] mask 0
  43 NoConflict       1   66   26 3             00 key=r[26..28]
R[26] =  i:1
R[27] =  NULL
R[28] =  i:0
  66 ReleaseReg      43    1    0               00 release r[43] mask 0
  67 Noop             0    0    0               00 uniqueness check for I_NODES_PARENT
  68 SCopy            2   31    0               00 r[31]=r[2]; wc_id
R[31] =  i:1 <== R[2]
  69 SCopy            5   32    0               00 r[32]=r[5]; parent_relpath
R[32] =   t7[file_io](8) <== R[5]
  70 SCopy            3   33    0               00 r[33]=r[3]; local_relpath
R[33] =   t11[file_io/os2](8) <== R[3]
  71 SCopy            4   34    0               00 r[34]=r[4]; op_depth
R[34] =  i:0 <== R[4]
  72 IntCopy          1   35    0               00 r[35]=r[1]; rowid
R[35] =  i:867
  73 MakeRecord      31    5   30               00 r[30]=mkrec(r[31..35]); for I_NODES_PARENT
R[30] =  sx[06091B23080266696C655F696F66696C655F696F2F6F733203|...#..file_iofile_io/os2.]
  74 ReleaseReg      31    5    0               00 release r[31..35] mask 0
  75 NoConflict       2   96   31 4             00 key=r[31..34]
R[31] =  i:1
R[32] =   t7[file_io](8)
R[33] =   t11[file_io/os2](8)
R[34] =  i:0
  76 IdxRowid         2   43    0               00 r[43]=rowid
R[43] =  i:272
  77 NotExists        0   92   43 1             00 intkey=r[43]
R[43] =  i:272
  78 Copy            43   74    0               00 r[74]=r[43]
R[74] =  i:272
  79 Column           0   13   88               00 r[88]=NODES.checksum
R[88] =  NULL
  80 Column           0    0   98               00 r[98]=NODES.wc_id
R[98] =  i:1
  81 Column           0    9   99               00 r[99]=NODES.moved_to
R[99] =  NULL
  82 Column           0    2  100               00 r[100]=NODES.op_depth
R[100] =  i:0
  83 Rowid            0  101    0               00 r[101]=rowid
R[101] =  i:272
  84 ReleaseReg      98    4    0               00 release r[98..101] mask 0
  85 IdxDelete        1   98    4               00 key=r[98..101]
  86 Column           0    1   99               00 r[99]=NODES.local_relpath
R[99] =   s11[file_io/os2](8)
  87 ReleaseReg      98    3    0               00 release r[98..100] mask 0
  88 IdxDelete        3   98    3               00 key=r[98..100]
  89 Delete           0    0    0 NODES         00
  90 Delete           2    0    0               00
  91 Program         74   92  102 program       00 Call: nodes_delete_trigger.replace
   0 Init             0    1    0 -- TRIGGER nodes_delete_trigger 00 Start at 1; Start: nodes_delete_trigger.replace (AFTER DELETE ON NODES)
   1 Param           14    1    0               00 r[1]=old.checksum
R[1] =  NULL
   2 IsNull           1   32    0               00 if r[1]==NULL goto 32
R[1] =  NULL
  32 Halt             0    0    0               00 End: nodes_delete_trigger.replace
  92 AddImm          42    1    0               00 r[42]=r[42]+1
R[42] =  i:0
  93 Goto             0   96    0               00 bypass recheck
  96 ReleaseReg      43    1    0               00 release r[43] mask 0
  97 Noop             0    0    0               00 uniqueness check for sqlite_autoindex_NODES_1
  98 SCopy            2   37    0               00 r[37]=r[2]; wc_id
R[37] =  i:1 <== R[2]
  99 SCopy            3   38    0               00 r[38]=r[3]; local_relpath
R[38] =   t11[file_io/os2](8) <== R[3]
 100 SCopy            4   39    0               00 r[39]=r[4]; op_depth
R[39] =  i:0 <== R[4]
 101 IntCopy          1   40    0               00 r[40]=r[1]; rowid
R[40] =  i:867
 102 MakeRecord      37    4   36               00 r[36]=mkrec(r[37..40]); for sqlite_autoindex_NODES_1
R[36] =  sx[050923080266696C655F696F2F6F73320363|..#..file_io/os2.c]
 103 ReleaseReg      37    4    0               00 release r[37..40] mask 0
 104 NoConflict       3  129   37 3             00 key=r[37..39]
R[37] =  i:1
R[38] =   t11[file_io/os2](8)
R[39] =  i:0
 129 ReleaseReg      43    1    0               00 release r[43] mask 0
 130 IfNot           42  133    0               00
R[42] =  i:1
 131 NotExists        0   64    1               00 intkey=r[1]
R[1] =  i:867
  64 NoConflict       1   94   26 0             00 key=r[26]
R[26] =  i:1
assertion "pIn3->flags & MEM_Blob" failed: file "sqlite3.c", line 89376, function "sqlite3VdbeExec"

Program received signal SIGABRT, Aborted.
*_libc_abort () at /usr/src/lib/libc/stdlib/abort.c:57
57              memset(&sa, 0, sizeof(sa));
(gdb)

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Richard Hipp-3
On 3/11/20, Stefan Sperling <[hidden email]> wrote:
>
> Does this help?
>

It does help some.  But I need a good copy of the database schema,
which I don't have.

Please bring up the database file in the "sqlite3" command-line shell,
then enter the command ".fullschema".  Save off the results and send
them to me, please.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Richard Hipp-3
In reply to this post by Stefan Sperling
On 3/11/20, Stefan Sperling <[hidden email]> wrote:
>
> Does this help?
>

Studying the trace output makes me think this is the same problem that
came up on the s390 hardware and was fixed here:
https://www.sqlite.org/src/info/04885763c4cd00cb

Stefan:  Can you verify that the patch above fixes the problem?  If
you want, you can click on the "Tarball" link to get a complete
tarball of check-in 04885763c4cd00cb (which, by coincidence was the
first check-in *after* the 3.31.1 release), unpack the tarball, then
do "./configure && make sqlite3.c" to generate the "sqlitle3.c" and
"sqlite3.h" files.  Or, you can update the "sqlite3.c" file you are
currently using manually entering the 3-line patch shown.

Please let us know what you find.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

Stefan Sperling
On Wed, Mar 11, 2020 at 08:20:01AM -0400, Richard Hipp wrote:
> On 3/11/20, Stefan Sperling <[hidden email]> wrote:
> >
> > Does this help?
> >
>
> Studying the trace output makes me think this is the same problem that
> came up on the s390 hardware and was fixed here:
> https://www.sqlite.org/src/info/04885763c4cd00cb

Yes, this fixes it. Thank you!

I will get this patch merged into the OpenBSD port of sqlite.
I suppose once the next sqlite release comes around we will be able to
drop the patch again since it will already be included in the release.

Thanks a lot for your help :)
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users