[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Snapshot 19/2 crash
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Snapshot 19/2 crash
- From: henrik (at) hswn.dk (Henrik Stoerner)
- Date: Sun, 19 Feb 2006 15:26:24 +0100
- References: <000801c6355c$bb325860$0500a8c0@noip.org>
- User-agent: Mutt/1.5.9i
On Sun, Feb 19, 2006 at 02:59:41PM +0100, lars ebeling wrote:
> todays (060219) crashed.
>
> This was found in hobbitlaunch.log:
> 2006-02-19 14:54:46 xmalloc: Out of memory!
> 2006-02-19 14:54:47 Task hobbitd terminated by signal 6
> #4 0x00011cc0 in xmalloc (size=1073749888) at memory.c:122
> #5 0x00003688 in load_clientconfig () at hobbitd.c:328
> #6 0x0000c914 in main (argc=14, argv=0x18000) at hobbitd.c:3755
No wonder it did that ... trying to allocate 1 GB RAM is
a bit out of the ordinary. It should work better with the attached
patch.
Henrik
--- beta/snapshot/hobbitd/hobbitd.c 2006-02-17 14:08:51.000000000 +0100
+++ hobbitd/hobbitd.c 2006-02-19 15:23:18.592658680 +0100
@@ -25,7 +25,7 @@
/* */
/*----------------------------------------------------------------------------*/
-static char rcsid[] = "$Id: hobbitd.c,v 1.204 2006/02/17 13:08:53 henrik Exp $";
+static char rcsid[] = "$Id: hobbitd.c,v 1.204 2006/02/17 13:08:53 henrik Exp henrik $";
#include <limits.h>
#include <sys/time.h>
@@ -325,6 +325,7 @@
fd = stackfopen(configfn, "r", &clientconflist); if (!fd) return;
if (clientconfigs) xfree(clientconfigs);
+ fstat(fileno(fd), &st);
clientconfigs = (char *)malloc(st.st_size + 2);
*clientconfigs = '\n';
n = fread(clientconfigs+1, 1, st.st_size, fd);