To add some info on the database using fossil sqlite: sqlite> select rid,size,uuid from blob where rid=1864; 1864|36923728|1831419b070d1f09420314feb8971548c1f28a18 sqlite> select length(content) from blob where rid=1864; 14328966
Regards, Lluís. On Thu, Mar 10, 2016 at 10:11:06AM +0100, Lluís Batlle i Rossell wrote: > Hello, > > using normally a repository with fossil 1.33 for weeks, it seems that it > just broke. We can't use the repository anymore, and even "rebuild" fails, > also with fossil trunk. > > We noticed the problem when doing a commit: > > """" > It says ERROR: [projects/file.txt] is 36923728 bytes on disk but 14328966 in > the repository > > NOTICE: Repository version of [projects/file.txt] stored in > [file-24e13532928c08c6] > > working checkout does not match what would have ended up in the repository: > 4e7e15d6a398903d00bccbdec6137d79 versus 4e5221153df5c4311d874b1a6cf4b991 > """" > > > > Now, doing a rebuild, it fails at ~20%: > > """" > fossil: ./src/blob.c:206: blob_reset: Assertion > `(pBlob)->xRealloc==blobReallocMalloc || > (pBlob)->xRealloc==blobReallocStatic' failed. > Aborted > """" > > > > With valgrind, it finds an overlapping memcpy() at ~2% of the rebuild: > With gdb on the valgrind failing point of current trunk, notice: > > """" > (gdb) bt > #0 blobReallocStatic (pBlob=0x7fffffff6250, newSize=14328967) at > ./src/blob.c:194 > #1 0x000000000040b3ba in blob_resize (pBlob=0x7fffffff6250, > newSize=14328966) at ./src/blob.c:422 > #2 0x000000000040b3f6 in blob_materialize (pBlob=0x7fffffff6250) at > ./src/blob.c:432 > #3 0x00000000004598d0 in manifest_parse (pContent=0x7fffffff6250, rid=1864, > pErr=0x0) > at ./src/manifest.c:383 > #4 0x000000000045d337 in manifest_crosslink (rid=1864, > pContent=0x7fffffff6250, flags=0) > at ./src/manifest.c:1811 > (gdb) print *pBlob > $12 = {nUsed = 14328966, nAlloc = 14328966, iCursor = 0, blobFlags = 0, aData > = 0x1988a98 "\270\026\006\367\377\177", xRealloc = 0x40ab12 > <blobReallocStatic>} > (gdb) print pNew > $13 = 0x1988a90 "\220 \225\001" > """" > > > As you see, the pointer returned by fossil_malloc(14328967) is 8 bytes before > pBlob->aData. Notice that it is the same "nUsed = 14328966" length as that of > the file of the commit. That file, in fact, is a txt of 36923728 in length, > but suspiciously, 14328966 is the exact length of the result of "fossil > test-compress" it. > > > What may have happened? We don't know of any power outage in this computer > that > may have broken the fs. We have been using the repository normally the last > weeks, doing commits. > > > -- > (Escriu-me xifrat si saps PGP / Write ciphered if you know PGP) > PGP key D4831A8A - https://emailselfdefense.fsf.org/ > _______________________________________________ > fossil-dev mailing list > fossil-dev@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev -- (Escriu-me xifrat si saps PGP / Write ciphered if you know PGP) PGP key D4831A8A - https://emailselfdefense.fsf.org/ _______________________________________________ fossil-dev mailing list fossil-dev@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev