I can't sync on Mac OS X Lion. sync crash with out of memory message.
gdb --args /Users/navratil/src/fossil/fossil sync
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ...... done
(gdb) break malloc_error_break
Breakpoint 1 at 0x7fff8a1986c0
(gdb) run
Starting program: /Users/navratil/src/fossil/fossil sync
/Users/navratil/src/fossil/fossil: 5 scan steps for 1 rows in [SELECT 1 FROM main.sqlite_master WHERE name=='stashfile' AND sql GLOB '* isLink *']
/Users/navratil/src/fossil/fossil: 5 scan steps for 1 rows in [SELECT 1 FROM main.sqlite_master WHERE name=='stashfile']
/Users/navratil/src/fossil/fossil: 5 scan steps for 1 rows in [SELECT 1 FROM main.sqlite_master WHERE name=='undo' AND sql GLOB '* isLink *']
/Users/navratil/src/fossil/fossil: 5 scan steps for 1 rows in [SELECT 1 FROM main.sqlite_master WHERE name=='undo']
/Users/navratil/src/fossil/fossil: 5 scan steps for 1 rows in [SELECT 1 FROM main.sqlite_master WHERE name=='undo_vfile' AND sql GLOB '* islink *']
/Users/navratil/src/fossil/fossil: 5 scan steps for 1 rows in [SELECT 1 FROM main.sqlite_master WHERE name=='undo_vfile']
Server: http://navratil@192.168.1.249:8098
Bytes Cards Artifacts Deltas
Sent: 648 12 0 0
Received: 898 11 0 1
Total network traffic: 576 bytes sent, 712 bytes received
fossil(78531) malloc: *** mmap(size=18446744067267100672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Breakpoint 1, 0x00007fff8a1986c0 in malloc_error_break ()
(gdb) bt
#0 0x00007fff8a1986c0 in malloc_error_break ()
#1 0x00007fff8a15b477 in szone_error ()
#2 0x00007fff8a15d404 in allocate_pages ()
#3 0x00007fff8a15dba4 in large_malloc ()
#4 0x00007fff8a163dee in szone_malloc_should_clear ()
#5 0x00007fff8a164972 in szone_realloc ()
#6 0x00007fff8a198243 in malloc_zone_realloc ()
#7 0x00007fff8a199032 in realloc ()
#8 0x000000010002e59e in fossil_realloc (p=Cannot access memory at address 0x0
) at main_.c:510
#9 0x000000010000f79e in content_get (rid=1606416160, pBlob=0x7fff5fbff720) at content_.c:275
#10 0x000000010005222f in verify_rid [inlined] () at /Users/navratil/src/fossil/bld/verify_.c:48
#11 0x000000010005222f in verify_at_commit () at verify_.c:79
#12 0x0000000100011262 in db_end_transaction (rollbackFlag=8) at db_.c:142
#13 0x000000010005afb1 in client_sync (pushFlag=1606417040, pullFlag=1606417040, cloneFlag=1606417040,
privateFlag=1606417040, configRcvMask=1606417040, configSendMask=1606417040) at xfer_.c:1728
#14 0x0000000100044ad4 in sync_cmd () at sync_.c:233
#15 0x000000010002be07 in main (argc=1606417602, argv=0x7fff5fbffcc2) at main_.c:378
drh added on 2011-10-10 11:44:14 UTC:
Nobody else has so far been able to replicate this problem.
navratil added on 2012-04-06 13:58:19 UTC:
I still have this problem. What I can add to hte ticket, that this problem can be reproducible?
fossil version
This is fossil version 1.22 [82f5663270] 2012-03-31 19:15:36 UTC
fossil sync
Server: http://navratil@xxxxxxxxxx
Bytes Cards Artifacts Deltas
Sent: 3638 77 0 0
Received: 4140 78 0 1
Sent: 3715 78 0 0
Received: 4340 79 2 0
Total network traffic: 4461 bytes sent, 4911 bytes received
fossil(27670) malloc: *** mmap(size=18446744067267100672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
fossil: out of memory
stephan added on 2012-08-29 09:18:23 UTC:
How many checkins does that repo have?
in content_get (rid=1606416160, pBlob=0x7fff5fbff720) at content_.c:275
that rid seems _extremely_ high and (coincidentally???) the high bits match the masks being passed in the client_sync() call. The rids are sequentially-generated, which implies that either this repo has over a billion artifacts or that there is an overflow/underflow happening somewhere.
sqlite3 ../fossil.fsl
sqlite> select max(rid) from blob;
16854
sqlite> select count(rid) from blob;
16854