Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Jiri Navratil
Thank you for all responses.

I was trying to compile fossil with debug enabled, but not sure, how to achieve 
that. Just noted ./configure --debug, which is not what I need. May be wiki 
page with some details for not experienced volunteers like me can help us to 
provide more helpful feedback.

I did

This is fossil version 1.19 [080d27a6b2] 2011-10-05 08:00:00 UTC

(gdb) break malloc_error_break 
Breakpoint 1 at 0x7fff8f4d56c0
(gdb) run sync
Starting program: /Users/navratil/src/fossil/fossil sync
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: 574 bytes sent, 713 bytes received
fossil(75169) malloc: *** mmap(size=18446744067267100672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

Breakpoint 1, 0x7fff8a1986c0 in malloc_error_break ()
(gdb) step
Single stepping until exit from function malloc_error_break, 
which has no line number information.
0x7fff8a15b477 in szone_error ()
(gdb) step
Single stepping until exit from function szone_error, 
which has no line number information.
0x7fff8a15d404 in allocate_pages ()
(gdb) step
Single stepping until exit from function allocate_pages, 
which has no line number information.
0x7fff8a15dba4 in large_malloc ()
(gdb) step
Single stepping until exit from function large_malloc, 
which has no line number information.
0x7fff8a163dee in szone_malloc_should_clear ()
(gdb) step
Single stepping until exit from function szone_malloc_should_clear, 
which has no line number information.
0x7fff8a164972 in szone_realloc ()


Is this helpfull? How I can compile fossil with debug (lines) enabled? Shall I 
move to bug tracking system and already crate a bud report or staying here is 
acceptable?

Thank you,
Jiri
--
Jiri Navratil

6. 10. 2011 v 11:59, Dmitry Chestnykh:

 On Oct 6, 2011, at 10:36 , Stephan Beal wrote:
 
 mmap() is only used by the sqlite3 code, not fossil. 
 
 OS X uses mmap underneath when you do malloc for the large region.
 
 --
 Dmitry Chestnykh
 
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Stephan Beal
On Sat, Oct 8, 2011 at 12:01 PM, Jiri Navratil j...@navratil.cz wrote:

 I was trying to compile fossil with debug enabled, but not sure, how to
 achieve that. Just noted ./configure --debug, which is not what I need. May
 be wiki page with some details for not experienced volunteers like me can
 help us to provide more helpful feedback.


It's not obvious from it's name, but ./confugure --debug enables _configure_
debugging, not code debugging.

This might help:

./configure --fossil-debug


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Stephan Beal
On Sat, Oct 8, 2011 at 12:57 PM, Stephan Beal sgb...@googlemail.com wrote:

 This might help:

 ./configure --fossil-debug


Nevermind - that just turns on some extra SQL debugging info and one or two
other internal checks, but not something which could cause your error.

Can you please try:

gdb --args fossil ... your command ...

When gdb starts tap 'r' then ENTER. When it crashes, tap bt then ENTER,
then q ENTER to quit, and send us that backtrace and the fossil version
number?

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Jiri Navratil
Thank you.

Here we are:

This is fossil version 1.19 [080d27a6b2] 2011-10-05 08:00:00 UTC


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) r
Starting program: /Users/navratil/src/fossil/fossil sync
Reading symbols for shared libraries +. done
/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: 575 bytes sent, 713 bytes received

fossil(78325) malloc: *** mmap(size=18446744067267100672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
/Users/navratil/src/fossil/fossil: out of memory

Program exited with code 01.

(gdb) bt
No stack.

Hmm, did I missed something?

Thx,
Jiri

--
Jiri Navratil

8. 10. 2011 v 13:02, Stephan Beal:

 On Sat, Oct 8, 2011 at 12:57 PM, Stephan Beal sgb...@googlemail.com wrote:
 This might help:
 
 ./configure --fossil-debug
 
 Nevermind - that just turns on some extra SQL debugging info and one or two 
 other internal checks, but not something which could cause your error.
 
 Can you please try:
 
 gdb --args fossil ... your command ...
 
 When gdb starts tap 'r' then ENTER. When it crashes, tap bt then ENTER, 
 then q ENTER to quit, and send us that backtrace and the fossil version 
 number?
  
 -- 
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Jiri Navratil
ok, I will do that  (I have to leave now for 2 hours)

--
Jiri Navratil

8. 10. 2011 v 13:31, Richard Hipp:

 Breakpoint 1, 0x7fff8a1986c0 in malloc_error_break ()
 (gdb) step
 At this point, instead of typing step, type bt.  And please send me the 
 result.  Thanks.
 
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Richard Hipp
On Sat, Oct 8, 2011 at 7:44 AM, Jiri Navratil j...@navratil.cz wrote:

 Thank you.

 Here we are:

 This is fossil version 1.19 [080d27a6b2] 2011-10-05 08:00:00 UTC


 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) r
 Starting program: /Users/navratil/src/fossil/fossil sync
 Reading symbols for shared libraries +. done
 /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: 575 bytes sent, 713 bytes received

 fossil(78325) malloc: *** mmap(size=18446744067267100672) failed (error
 code=12)
 *** error: can't allocate region
 *** set a breakpoint in malloc_error_break to debug
 /Users/navratil/src/fossil/fossil: out of memory

 Program exited with code 01.

 (gdb) bt
 No stack.

 Hmm, did I missed something?


Yes.  You didn't set the breakpoint on malloc_error_break.




 Thx,
 Jiri

 --
 Jiri Navratil

 8. 10. 2011 v 13:02, Stephan Beal:

 On Sat, Oct 8, 2011 at 12:57 PM, Stephan Beal sgb...@googlemail.comwrote:

 This might help:

 ./configure --fossil-debug


 Nevermind - that just turns on some extra SQL debugging info and one or two
 other internal checks, but not something which could cause your error.

 Can you please try:

 gdb --args fossil ... your command ...

 When gdb starts tap 'r' then ENTER. When it crashes, tap bt then ENTER,
 then q ENTER to quit, and send us that backtrace and the fossil version
 number?

 --
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users



 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Jiri Navratil
Ooops. I had to discover this myself. Sorry

Please see the result now:

This is fossil version 1.19 [080d27a6b2] 2011-10-05 08:00:00 UTC

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, 0x7fff8a1986c0 in malloc_error_break ()


(gdb) bt
#0  0x7fff8a1986c0 in malloc_error_break ()
#1  0x7fff8a15b477 in szone_error ()
#2  0x7fff8a15d404 in allocate_pages ()
#3  0x7fff8a15dba4 in large_malloc ()
#4  0x7fff8a163dee in szone_malloc_should_clear ()
#5  0x7fff8a164972 in szone_realloc ()
#6  0x7fff8a198243 in malloc_zone_realloc ()
#7  0x7fff8a199032 in realloc ()
#8  0x00010002e59e in fossil_realloc (p=Cannot access memory at address 0x0
) at main_.c:510
#9  0x0001f79e in content_get (rid=1606416160, pBlob=0x7fff5fbff720) at 
content_.c:275
#10 0x00010005222f in verify_rid [inlined] () at 
/Users/navratil/src/fossil/bld/verify_.c:48
#11 0x00010005222f in verify_at_commit () at verify_.c:79
#12 0x000100011262 in db_end_transaction (rollbackFlag=8) at db_.c:142
#13 0x00010005afb1 in client_sync (pushFlag=1606417040, 
pullFlag=1606417040, cloneFlag=1606417040, privateFlag=1606417040, 
configRcvMask=1606417040, configSendMask=1606417040) at xfer_.c:1728
#14 0x000100044ad4 in sync_cmd () at sync_.c:233
#15 0x00010002be07 in main (argc=1606417602, argv=0x7fff5fbffcc2) at 
main_.c:378


I also created 
Ticket UUID:fd7ad198e58e6f63fabdb79c48d417ea925b7664
locally. How I can push it to server? commit is stating nothing has changed.

Thank you for your support,
Jiri

--
Jiri Navratil

8. 10. 2011 v 13:47, Richard Hipp:

 (gdb) bt
 No stack.
 
 Hmm, did I missed something?
 
 Yes.  You didn't set the breakpoint on malloc_error_break.
 
  
 
 Thx,
 Jiri
 
 --
 Jiri Navratil
 
 8. 10. 2011 v 13:02, Stephan Beal:
 
 On Sat, Oct 8, 2011 at 12:57 PM, Stephan Beal sgb...@googlemail.com wrote:
 This might help:
 
 ./configure --fossil-debug
 
 Nevermind - that just turns on some extra SQL debugging info and one or two 
 other internal checks, but not something which could cause your error.
 
 Can you please try:
 
 gdb --args fossil ... your command ...
 
 When gdb starts tap 'r' then ENTER. When it crashes, tap bt then ENTER, 
 then q ENTER to quit, and send us that backtrace and the fossil version 
 number?
  
 -- 
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
 
 
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
 
 
 
 

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Stephan Beal
On Sat, Oct 8, 2011 at 4:24 PM, Jiri Navratil j...@navratil.cz wrote:

 #9  0x0001f79e in content_get (rid=1606416160,
 pBlob=0x7fff5fbff720) at content_.c:275


If i had to guess i'd say fossil's running into an endless loop while
allocating:

int *a = 0;
int mx;
Blob delta, next;

a = fossil_malloc( sizeof(a[0])*nAlloc );
a[0] = rid;
a[1] = nextRid;
n = 1;
herewhile( !bag_find(contentCache.inCache, nextRid)
 (nextRid = findSrcid(nextRid))0 ){
  n++;
  if( n=nAlloc ){
nAlloc = nAlloc*2 + 10;
a = fossil_realloc(a, nAlloc*sizeof(a[0]));
  }
  a[n] = nextRid;
}

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Lluís Batlle i Rossell
On Sat, Oct 08, 2011 at 04:24:45PM +0200, Jiri Navratil wrote:
 Ooops. I had to discover this myself. Sorry

The memory looks totally broken. Maybe you would have to run it inside valgrind.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Stephan Beal
On Sat, Oct 8, 2011 at 4:40 PM, Stephan Beal sgb...@googlemail.com wrote:

 On Sat, Oct 8, 2011 at 4:24 PM, Jiri Navratil j...@navratil.cz wrote:

 #9  0x0001f79e in content_get (rid=1606416160,
 pBlob=0x7fff5fbff720) at content_.c:275


 If i had to guess i'd say fossil's running into an endless loop while
 allocating:


Except that the backtrace would have shown that, of course. Then i agree
with Lluis: this is a case for valgrind.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-08 Thread Jiří Navrátil
Thx for replies.

I will wait for Richards response, what I have to try next.

--
Jiri Navratil, http://www.navratil.cz,  +420 777 224 245

8. 10. 2011 v 16:41, Stephan Beal:

 On Sat, Oct 8, 2011 at 4:40 PM, Stephan Beal sgb...@googlemail.com wrote:
 On Sat, Oct 8, 2011 at 4:24 PM, Jiri Navratil j...@navratil.cz wrote:
 #9  0x0001f79e in content_get (rid=1606416160, pBlob=0x7fff5fbff720) 
 at content_.c:275
 
 If i had to guess i'd say fossil's running into an endless loop while 
 allocating:
 
 Except that the backtrace would have shown that, of course. Then i agree with 
 Lluis: this is a case for valgrind.
 
 -- 
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-06 Thread Lluís Batlle i Rossell
On Thu, Oct 06, 2011 at 06:42:07AM +0200, Jiri Navratil wrote:
 I upgraded to 
 
 This is fossil version 1.19 [080d27a6b2] 2011-10-05 08:00:00 UTC
 
 Not sure, what I shall do in gdb. So I have this. Please let me know, what 
 next I can trace. Sorry
 
 
 fossil(2681) malloc: *** mmap(size=18446744067267100672) failed (error 
 code=12)
 *** error: can't allocate region
 *** set a breakpoint in malloc_error_break to debug
 /Users/navratil/src/fossil/fossil: out of memory

Type 'break malloc_error_break' in gdb, before 'run'.

Regards,
Lluís
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-06 Thread Stephan Beal
2011/10/6 Jiri Navratil j...@navratil.cz

 fossil(2681) malloc: *** mmap(size=18446744067267100672) failed (error
 code=12)
 *** error: can't allocate region
 *** set a breakpoint in malloc_error_break to debug
 /Users/navratil/src/fossil/fossil: out of memory



i'm going to make a huge guess here...

mmap() is only used by the sqlite3 code, not fossil. The number being given
to mmap() looks like an uninitialized 64-bit int. However, i double that
sqlite3's testing procedures would allow such an obvious problem to slip
through. However...

in the past month i've run into similar mysterious crashes/behaviours right
after re-compiling fossil (not often - only 2 or 3 times in hundreds of
rebuilds), and it _appears_ to be that my make/dependency info occasionally
gets confused and doesn't rebuild everything it should. The solution in such
cases is just to 'make clean; make'

_Perhaps_ something like this has happened to you? If you build fossil from
sources, please try a clean rebuild. If you downloaded the binary then this
is not what is happening to you.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-06 Thread Stephan Beal
On Thu, Oct 6, 2011 at 10:36 AM, Stephan Beal sgb...@googlemail.com wrote:

 bit int. However, i double that sqlite3's testing procedures would allow
 such an obvious problem to slip through.


lol, that shows how embedded the word double is in my memory. It should be
doubt.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-06 Thread Dmitry Chestnykh
On Oct 6, 2011, at 10:36 , Stephan Beal wrote:

 mmap() is only used by the sqlite3 code, not fossil. 

OS X uses mmap underneath when you do malloc for the large region.

--
Dmitry Chestnykh

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-05 Thread Jiri Navratil
I upgraded to 

This is fossil version 1.19 [080d27a6b2] 2011-10-05 08:00:00 UTC

Not sure, what I shall do in gdb. So I have this. Please let me know, what next 
I can trace. Sorry


fossil(2681) malloc: *** mmap(size=18446744067267100672) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
/Users/navratil/src/fossil/fossil: out of memory

Program exited with code 01.
(gdb)

info mem
There are no memory regions defined.

(gdb) list
304   while( ig.argc ) newArgv[j++] = g.argv[i++];
305   newArgv[j] = 0;
306   g.argc = j;
307   g.argv = newArgv;
308 }
309 
310 /*
311 ** This procedure runs first.
312 */
313 int main(int argc, char **argv){

--
Jiri Navratil

4. 10. 2011 v 18:02, Richard Hipp:

 
 
 2011/10/4 Jiří Navrátil j...@navratil.cz
 
 fossil sync
 Server:http://myname@192.168.1.249:8098
 Bytes  Cards  Artifacts Deltas
 Sent: 648 12  0  0
 Received: 898 11  0  1
 Total network traffic: 573 bytes sent, 718 bytes received
 fossil(25111) 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
 I'm trying to sync repository, which is 148MB big. I'm getting out of memory 
 on Mac OS X (tested 32bit and 64bit version, 1.18 and 1.19) Fossil proces 
 crashed on 2GB on 64bit version and 1GB on 32bit version
 
 148Mnavratil.cz.fsl
 
 Is something I can track, debug the reason?
 
 Run fossil in gdb.  Figure out where malloc() is being called that causes the 
 problem.  
 
  
 
 Thx,
 Jiri
 
 
 --
 Jiri Navratil
 
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
 
 
 
 
 -- 
 D. Richard Hipp
 d...@sqlite.org
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil: out of memory

2011-10-04 Thread Jiří Navrátil
fossil sync
Server:http://myname@192.168.1.249:8098
Bytes  Cards  Artifacts Deltas
Sent: 648 12  0  0
Received: 898 11  0  1
Total network traffic: 573 bytes sent, 718 bytes received
fossil(25111) 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
I'm trying to sync repository, which is 148MB big. I'm getting out of memory on 
Mac OS X (tested 32bit and 64bit version, 1.18 and 1.19) Fossil proces crashed 
on 2GB on 64bit version and 1GB on 32bit version

148Mnavratil.cz.fsl

Is something I can track, debug the reason?

Thx,
Jiri


--
Jiri Navratil___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-04 Thread Lluís Batlle i Rossell
On Tue, Oct 04, 2011 at 05:47:37PM +0200, Jiří Navrátil wrote:
 fossil sync
 Server:http://myname@192.168.1.249:8098
 Bytes  Cards  Artifacts Deltas
 Sent: 648 12  0  0
 Received: 898 11  0  1
 Total network traffic: 573 bytes sent, 718 bytes received
 fossil(25111) 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
 I'm trying to sync repository, which is 148MB big. I'm getting out of memory 
 on Mac OS X (tested 32bit and 64bit version, 1.18 and 1.19) Fossil proces 
 crashed on 2GB on 64bit version and 1GB on 32bit version

It looks like uninitialised memory somewhere. that 'size' looks far too big.

you can use gdb.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil: out of memory

2011-10-04 Thread Richard Hipp
2011/10/4 Jiří Navrátil j...@navratil.cz


 fossil syncServer:http://myname@192.168.1.249:8098Bytes   
Cards  Artifacts DeltasSent: 648 12  0 
  0Received: 898 11  0  1Total network 
 traffic: 573 bytes sent, 718 bytes receivedfossil(25111) malloc: *** 
 mmap(size=18446744067267100672) failed (error code=12)*** error: can't 
 allocate region*** set a breakpoint in malloc_error_break to debugfossil: out 
 of memory

 I'm trying to sync repository, which is 148MB big. I'm getting out of
 memory on Mac OS X (tested 32bit and 64bit version, 1.18 and 1.19) Fossil
 proces crashed on 2GB on 64bit version and 1GB on 32bit version

 148Mnavratil.cz.fsl

 Is something I can track, debug the reason?


Run fossil in gdb.  Figure out where malloc() is being called that causes
the problem.




 Thx,
 Jiri


 --
 Jiri Navratil

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron
I just upgraded to the latest (dcc68b46b2) version of fossil, and
dutifully did fossil rebuild on all my repos.

Everything was fine, but for one repo where I get out of memory and
fossil cannot rebuild this particular repo.  I also tried fossil
deconstruct followed by reconstruct, with the same unfortunate
result: reconstruct gets and out of memory error.

What should be my next steps?  This is an important repo to me (and I
cannot publish it, sorry).  I'm running on kubuntu, 4G RAM -- should be
enough!

It turns out that fossil 655e78209b also cannot rebuild this repo
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Richard Hipp
On Thu, May 12, 2011 at 5:13 AM, Ron Aaron r...@ronware.org wrote:

 I just upgraded to the latest (dcc68b46b2) version of fossil, and
 dutifully did fossil rebuild on all my repos.

 Everything was fine, but for one repo where I get out of memory and
 fossil cannot rebuild this particular repo.  I also tried fossil
 deconstruct followed by reconstruct, with the same unfortunate
 result: reconstruct gets and out of memory error.

 What should be my next steps?  This is an important repo to me (and I
 cannot publish it, sorry).  I'm running on kubuntu, 4G RAM -- should be
 enough!

 It turns out that fossil 655e78209b also cannot rebuild this repo


Can you run the rebuild in a debugger and give me a clue as to where it is
running out of memory?



 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron
On 05/12/2011 02:59 PM, Richard Hipp wrote:

 
 Can you run the rebuild in a debugger and give me a clue as to where it
 is running out of memory?


Yes, I'll try to do that tonight.

Thanks,
Ron
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron
On 05/12/2011 03:03 PM, Richard Hipp wrote:

 it's just a wild guess, but does
 http://www.fossil-scm.org/fossil/ci/6b382b0818 help any?

Sorry, no it doesn't.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron
Here's the  backtrace:

Starting program: /home/ron/proj/fossil/fossil rebuild -R rw
  14.4% complete...
Breakpoint 2, fossil_malloc (n=58019464) at ./bld/main_.c:410
410   fossil_panic(out of memory);
(gdb) bt
#0  fossil_malloc (n=58019464) at ./bld/main_.c:410
#1  0x0804c5b3 in blobReallocStatic (pBlob=0xb26c, newSize=58019464)
at ./bld/blob_.c:171
#2  0x0804cb20 in blob_resize (pBlob=0xb26c, newSize=58019463) at
./bld/blob_.c:348
#3  0x08058acd in blob_delta_apply (pOriginal=0xb398,
pDelta=0xb2dc, pTarget=0xb2c8) at ./bld/deltacmd_.c:90
#4  0x08054dd6 in content_get (rid=89, pBlob=0xb398) at
./bld/content_.c:281
#5  0x08055866 in content_deltify (rid=85, srcid=89, force=0) at
./bld/content_.c:774
#6  0x0806b7e5 in add_mlink (pid=0, pParent=0x838fc28, cid=90,
pChild=0x838fb80) at ./bld/manifest_.c:1311
#7  0x0806be23 in manifest_crosslink (rid=90, pContent=0xb55c) at
./bld/manifest_.c:1559
#8  0x08071219 in rebuild_step (rid=90, size=488, pBase=0xb5ec) at
./bld/rebuild_.c:256
#9  0x080715f3 in rebuild_db (randomize=0, doOut=1, doClustering=0) at
./bld/rebuild_.c:390
#10 0x08071916 in rebuild_database () at ./bld/rebuild_.c:547
#11 0x08069158 in main (argc=value optimized out, argv=0x3) at
./bld/main_.c:289

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Richard Hipp
On Thu, May 12, 2011 at 10:12 AM, Ron Aaron r...@ronware.org wrote:

 Here's the  backtrace:

 Starting program: /home/ron/proj/fossil/fossil rebuild -R rw
  14.4% complete...
 Breakpoint 2, fossil_malloc (n=58019464) at ./bld/main_.c:410
 410   fossil_panic(out of memory);
 (gdb) bt
 #0  fossil_malloc (n=58019464) at ./bld/main_.c:410


Do you really have 58MB artifacts in your repository, or is the size
parameter going goofy on us here?

It appears that malloc() really is failing to allocate 58MB?  How much
memory is the process using at the point where it fails?


 #1  0x0804c5b3 in blobReallocStatic (pBlob=0xb26c, newSize=58019464)
 at ./bld/blob_.c:171
 #2  0x0804cb20 in blob_resize (pBlob=0xb26c, newSize=58019463) at
 ./bld/blob_.c:348
 #3  0x08058acd in blob_delta_apply (pOriginal=0xb398,
 pDelta=0xb2dc, pTarget=0xb2c8) at ./bld/deltacmd_.c:90
 #4  0x08054dd6 in content_get (rid=89, pBlob=0xb398) at
 ./bld/content_.c:281
 #5  0x08055866 in content_deltify (rid=85, srcid=89, force=0) at
 ./bld/content_.c:774
 #6  0x0806b7e5 in add_mlink (pid=0, pParent=0x838fc28, cid=90,
 pChild=0x838fb80) at ./bld/manifest_.c:1311
 #7  0x0806be23 in manifest_crosslink (rid=90, pContent=0xb55c) at
 ./bld/manifest_.c:1559
 #8  0x08071219 in rebuild_step (rid=90, size=488, pBase=0xb5ec) at
 ./bld/rebuild_.c:256
 #9  0x080715f3 in rebuild_db (randomize=0, doOut=1, doClustering=0) at
 ./bld/rebuild_.c:390
 #10 0x08071916 in rebuild_database () at ./bld/rebuild_.c:547
 #11 0x08069158 in main (argc=value optimized out, argv=0x3) at
 ./bld/main_.c:289




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Richard Hipp
On Thu, May 12, 2011 at 10:41 AM, Ron Aaron r...@ronware.org wrote:

  Hi --



  Do you really have 58MB artifacts in your repository, or is the size
 parameter going goofy on us here?

   Repository Size: 62579712 bytes  Number Of Artifacts: 2477 (stored as 43
 full text and 2434 delta blobs)  Uncompressed Artifact Size: 11817116
 bytes average, 59646559 bytes max, 29259181357 bytes total
 Compression Ratio: 467:1  Number Of Check-ins: 499
 It's a bit of an insane repository; probably it's not a great idea to do
 what I'm doing...

  It appears that malloc() really is failing to allocate 58MB?  How much
 memory is the process using at the point where it fails?

 11085 pts/0t  0:52  1   919 *3076180 3050084* 76.6
 /home/ron/proj/fossil/fossil rebuild -R rw


What version of Fossil was able to rebuild this repo?  Can you bisect and
figure out when it broke?

I'm not showing any serious memory leaks on rebuild.  And the rebuild logic
hasn't changed to require additional memory, that I recall.  So I'm having
trouble thinking of a plausible cause for this


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron


 What version of Fossil was able to rebuild this repo?  Can you bisect
 and figure out when it broke?

I haven't looked at what broke, but for the first time I used the
'bisect' command -- and wow, what a great tool! 

Here is the output:

14253e9b3336a6292432 2010-01-09 18:32:28 BAD
6069602aba14bf74b8f4 2010-01-09 13:11:18 GOOD CURRENT

So this particular problem has been around almost a year and a half; I
guess I have a particularly weird repo.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Richard Hipp
On Thu, May 12, 2011 at 3:26 PM, Ron Aaron r...@ronware.org wrote:



 What version of Fossil was able to rebuild this repo?  Can you bisect and
 figure out when it broke?


 I haven't looked at what broke, but for the first time I used the 'bisect'
 command -- and wow, what a great tool!

 Here is the output:

 14253e9b3336a6292432 2010-01-09 18:32:28 BAD
 6069602aba14bf74b8f4 2010-01-09 13:11:18 GOOD CURRENT


Thanks for bisecting.  However, this doesn't really give any new clues.  The
only code changes between 6069602aba14bf74b8f4 and 14253e9b3336a6292432 are
in the /reportlist web page (which gives a list of available ticket
reports) and have absolutely nothing whatsoever to do with the rebuild
command.  :-\



 So this particular problem has been around almost a year and a half; I
 guess I have a particularly weird repo.




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron
It turns out I mistakenly type 'bad' instead of 'good' at some point.

After redoing the bisect I have this result:

5fc36e2faabf13e9c2c8 2010-01-13 09:58:09 BAD CURRENT
cf3809cc71ffc9557bd6 2010-01-13 09:35:46 GOOD


I manually updated to each of these versions, and verified that in fact
the one is good and the other bad; but the diff between them is only in
report.c and *really* doesn't look like it could be the problem.

I'm stumped for real now...
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil out of memory on rebuild

2011-05-12 Thread Ron Aaron
OK, I've made another pass and am getting different results.  This leads
me to believe that what I am seeing is a function of my runtime
environment, and not due to the specific builds.

My theory is that the old builds are *just* enough smaller that -- most
of the time -- they work with this weird repo, and that older builds are
simply too much bigger to fit in my runtime environment.

So the next step, I think, would be to make a 'valgrind' run and try to
track down memory leaks.  That's not going to happen tonight, it's too
late for me.

Sorry for all the confusion, but it looks like a fairly nasty little
problem which fortunately is not common.

Best,
Ron
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users