registry backup (and upgrade --force)

René J. V. Bertin rjvbertin at gmail.com
Wed Apr 6 06:08:09 PDT 2016


Clemens Lang wrote:

Hi,

> http://serverfault.com/questions/8048/how-can-i-verify-that-a-sqlite-db3-file-is-valid-consistent
> 
> See also
> https://trac.macports.org/browser/trunk/base/src/cregistry/README.sqlext

That doesn't teach me much new
%> bunzip2 < /opt/local/var/macports/registry/registry-corrupt.db.bz2 > kk.db
%> /opt/local/bin/sqlite3 kk.db
%> .load MacPorts-svn/src/cregistry/macports.sqlext
%> pragma integrity_check;
ok

I don't know if it helps, but here are 2 backtraces I got after sending a 
SIGKILL (not SIGQUIT as the log pretends). They're pasted in chronological 
order, but they were preceded by an unknown number of other attempts to "get 
back in", for which I didn't get a crash report.

Exception Type:  EXC_CRASH (SIGQUIT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib         0x00007fff8965ffe2 __fcntl + 10
1   libsystem_kernel.dylib         0x00007fff8965ea4d fcntl + 240
2   libsqlite3.dylib               0x00007fff87fc1044 unixFileLock + 292
3   libsqlite3.dylib               0x00007fff87f0b7a5 unixLock + 261
4   libsqlite3.dylib               0x00007fff87f0af2b sqlite3PagerSharedLock + 
123
5   libsqlite3.dylib               0x00007fff87f0a636 sqlite3BtreeBeginTrans + 
390
6   libsqlite3.dylib               0x00007fff87f048d9 sqlite3InitOne + 569
7   libsqlite3.dylib               0x00007fff87f0461e sqlite3Init + 110
8   libsqlite3.dylib               0x00007fff87fb1fcd attachFunc + 1805
9   libsqlite3.dylib               0x00007fff87f2b3f9 sqlite3VdbeExec + 12201
10  libsqlite3.dylib               0x00007fff87f2740a sqlite3_step + 666
11  registry.dylib                 0x000000010f4683ac reg_attach + 348
12  registry.dylib                 0x000000010f46398c registry_open + 332
13  libtcl8.5.dylib                0x000000010e7c0966 TclEvalObjvInternal + 1222
14  libtcl8.5.dylib                0x000000010e809f8a TclExecuteByteCode + 21690
15  libtcl8.5.dylib                0x000000010e84ab82 TclObjInterpProcCore + 610
16  libtcl8.5.dylib                0x000000010e7c0966 TclEvalObjvInternal + 1222
17  libtcl8.5.dylib                0x000000010e809f8a TclExecuteByteCode + 21690
18  libtcl8.5.dylib                0x000000010e80e7d2 TclCompEvalObj + 338
19  libtcl8.5.dylib                0x000000010e7c24ea TclEvalObjEx + 426
20  libtcl8.5.dylib                0x000000010e7c9ac8 Tcl_CatchObjCmd + 152
21  libtcl8.5.dylib                0x000000010e7c0966 TclEvalObjvInternal + 1222
22  libtcl8.5.dylib                0x000000010e809f8a TclExecuteByteCode + 21690
23  libtcl8.5.dylib                0x000000010e804a0e Tcl_ExprObj + 862
24  libtcl8.5.dylib                0x000000010e7c2af9 Tcl_ExprBooleanObj + 25
25  libtcl8.5.dylib                0x000000010e7cc66e Tcl_IfObjCmd + 94
26  libtcl8.5.dylib                0x000000010e7c0966 TclEvalObjvInternal + 1222
27  libtcl8.5.dylib                0x000000010e7c17eb TclEvalEx + 2651
28  libtcl8.5.dylib                0x000000010e7c0d8a Tcl_EvalEx + 26
29  libtcl8.5.dylib                0x000000010e82ccc0 Tcl_FSEvalFileEx + 528
30  libtcl8.5.dylib                0x000000010e833340 Tcl_Main + 1152
31  tclsh8.5                       0x000000010e7a8a50 main + 16
32  libdyld.dylib                  0x00007fff8ad2e5fd start + 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_platform.dylib       0x00007fff8b963e41 OSSpinLockLock + 11
1   libsystem_malloc.dylib         0x00007fff815f166f szone_free + 801
2   libsqlite3.dylib               0x00007fff87f5febb sqliteDeleteColumnNames + 
59
3   libsqlite3.dylib               0x00007fff87f084dc sqlite3DeleteTable + 1484
4   libsqlite3.dylib               0x00007fff87f7482b sqlite3SchemaClear + 5435
5   libsqlite3.dylib               0x00007fff87fb20b3 attachFunc + 2035
6   libsqlite3.dylib               0x00007fff87f2b3f9 sqlite3VdbeExec + 12201
7   libsqlite3.dylib               0x00007fff87f2740a sqlite3_step + 666
8   registry.dylib                 0x0000000102ac83ac reg_attach + 348
9   registry.dylib                 0x0000000102ac398c registry_open + 332
10  libtcl8.5.dylib                0x0000000101e17966 TclEvalObjvInternal + 1222
11  libtcl8.5.dylib                0x0000000101e60f8a TclExecuteByteCode + 21690
12  libtcl8.5.dylib                0x0000000101ea1b82 TclObjInterpProcCore + 610
13  libtcl8.5.dylib                0x0000000101e17966 TclEvalObjvInternal + 1222
14  libtcl8.5.dylib                0x0000000101e60f8a TclExecuteByteCode + 21690
15  libtcl8.5.dylib                0x0000000101e657d2 TclCompEvalObj + 338
16  libtcl8.5.dylib                0x0000000101e194ea TclEvalObjEx + 426
17  libtcl8.5.dylib                0x0000000101e20ac8 Tcl_CatchObjCmd + 152
18  libtcl8.5.dylib                0x0000000101e17966 TclEvalObjvInternal + 1222
19  libtcl8.5.dylib                0x0000000101e60f8a TclExecuteByteCode + 21690
20  libtcl8.5.dylib                0x0000000101e5ba0e Tcl_ExprObj + 862
21  libtcl8.5.dylib                0x0000000101e19af9 Tcl_ExprBooleanObj + 25
22  libtcl8.5.dylib                0x0000000101e2366e Tcl_IfObjCmd + 94
23  libtcl8.5.dylib                0x0000000101e17966 TclEvalObjvInternal + 1222
24  libtcl8.5.dylib                0x0000000101e187eb TclEvalEx + 2651
25  libtcl8.5.dylib                0x0000000101e17d8a Tcl_EvalEx + 26
26  libtcl8.5.dylib                0x0000000101e83cc0 Tcl_FSEvalFileEx + 528
27  libtcl8.5.dylib                0x0000000101e8a340 Tcl_Main + 1152
28  tclsh8.5                       0x0000000101df9a50 main + 16
29  libdyld.dylib                  0x00007fff8ad2e5fd start + 1

I wonder if the "DeleteColumnNames" function above doesn't mean that somehow all 
invalid data has been stripped from the "corrupt" database, which would make it 
valid but probably useless.

R.



More information about the macports-dev mailing list