[hobbit] Coredump when generating pre-built reports
On Thursday, December 01, 2005 4:35 PM, Frédéric Mangeant wrote:
I tried to generate the november monthly report, and bbgen coredumped :
$ ~/server/bin/bbcmd --env=/BB/hobbit/server/etc/hobbitserver.cfg hobbitreports.sh monthly ~/server/bin/hobbitreports.sh: line 78: 24827 Abandon
(core dumped) BBWEB=$REPORTTOPURL/$REPDIR $BBHOME/bin/bbgen --reportopts=$STIME:$ETIME:0:nongr $BBGENREPOPTS $REPORTTOPDIR/$REPDIR
I have a similar problem on an AIX server (5.1 or 5.2) using 4.1.2p1 in that bbgen coredumps generating any automated reports but works ok doing a "custom" report
/usr/local/hobbit/server/bin/hobbitreports.sh: line 78: 30622 IOT/Abort trap (core dumped) BBWEB=$REPORTTOPURL/$REPDIR $BBHOME/bin/bbgen --reportopts=$STIME:$ETIME:0:nongr $BBGENREPOPTS $REPORTTOPDIR/$REPDIR
Core was generated by `bbgen'. Program terminated with signal 6, Aborted. #0 0xd01ecf40 in raise () from /usr/lib/libc.a(shr.o) (gdb) bt #0 0xd01ecf40 in raise () from /usr/lib/libc.a(shr.o) #1 0xd020d2c8 in abort () from /usr/lib/libc.a(shr.o) #2 0x1001fc18 in sigsegv_handler () #3 <signal handler called> #4 0x1000b75c in strncpy () #5 0x10012fb8 in parse_histlogfile () #6 0x100138ac in parse_historyfile () #7 0x1000bf28 in init_state () #8 0x1000ccb8 in load_state () #9 0x2000ce28 in ?? ()
Regards
Chris
We would like to take this opportunity to send Seasons Greetings to all our customers, suppliers and colleagues and wish you a prosperous New Year. RWE npower will not be sending corporate Christmas cards this year. Instead, we will be making a donation to our chosen corporate charity Macmillan Cancer Relief.
The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited.
If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither RWE npower nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any).
On Fri, Dec 02, 2005 at 09:31:31AM -0000, Morris, Chris (Shared Services) wrote:
On Thursday, December 01, 2005 4:35 PM, Frédéric Mangeant wrote:
I tried to generate the november monthly report, and bbgen coredumped :
$ ~/server/bin/bbcmd --env=/BB/hobbit/server/etc/hobbitserver.cfg hobbitreports.sh monthly ~/server/bin/hobbitreports.sh: line 78: 24827 Abandon
(core dumped) BBWEB=$REPORTTOPURL/$REPDIR $BBHOME/bin/bbgen --reportopts=$STIME:$ETIME:0:nongr $BBGENREPOPTS $REPORTTOPDIR/$REPDIRI have a similar problem on an AIX server (5.1 or 5.2) using 4.1.2p1 in that bbgen coredumps generating any automated reports but works ok doing a "custom" report
I suspect this is somewhat the same problem both of you are seeing. Could you try the attached patch and let me know if it helps ?
Henrik
Henrik Stoerner a écrit :
I suspect this is somewhat the same problem both of you are seeing. Could you try the attached patch and let me know if it helps ?
Hi Henrik
thanks for the patch, however I cannot appy it :
$ patch -p0 < /tmp/hobbit-4.1.2p1-history.patch patching file bbdisplay/reportdata.c Hunk #1 FAILED at 11. Hunk #2 FAILED at 304. Hunk #3 FAILED at 414. Hunk #4 FAILED at 506. Hunk #5 FAILED at 518. 5 out of 5 hunks FAILED -- saving rejects to file bbdisplay/reportdata.c.rej
$ cat bbdisplay/reportdata.c.rej
*** 11,17 ****
/*
*/
/*----------------------------------------------------------------------------*/
static char rcsid[] = "$Id: reportdata.c,v 1.36 2005/05/02 10:30:12 henrik Exp $";
#include <limits.h> #include <stdio.h> --- 11,17 ----
/*
*/
/*----------------------------------------------------------------------------*/
static char rcsid[] = "$Id: reportdata.c,v 1.37 2005/12/02 16:03:45 henrik Exp $";
#include <limits.h> #include <stdio.h>
*** 304,326 **** static char *timename(char *timestring) { static char timespec[26];
char timecopy[26];
historical logfile */char *token; int i; /* Compute the timespec string used as the name of thestrncpy(timecopy, timestring, 25);timecopy[25] = '\0';token = strtok(timecopy, " ");strcpy(timespec, token);for (i=1; i<5; i++) {strcat(timespec, "_");token = strtok(NULL, " ");
} --- 304,330 ---- static char *timename(char *timestring) { static char timespec[26];strcat(timespec, token); } return timespec;
char *timecopy;
historical logfile */char *tokens[5]; int i; /* Compute the timespec string used as the name of the*timespec = '\0';timecopy = strdup(timestring);tokens[0] = tokens[1] = tokens[2] = tokens[3] = tokens[4] = NULL;tokens[0] = strtok(timecopy, " "); i = 0;while (tokens[i] && (i < 4)) { i++; tokens[i] = strtok(NULL, " "); }if (tokens[4]) {/* Got all 5 elements */snprintf(timespec, sizeof(timespec), "%s_%s_%s_%s_%s",
tokens[4]); }tokens[0], tokens[1], tokens[2], tokens[3],else {errprintf("Bad timespec in history file: %s\n", timestring);}
}xfree(timecopy); return timespec;
*** 410,421 **** newentry->color = color; newentry->affectssla = (reporttime && (sladuration > 0));
if (!for_history && (color != COL_GREEN)) { newentry->cause =parse_histlogfile(hostname, servicename, timespec); } else newentry->cause = "";
newentry->timespec = strdup(timespec); newentry->next = reploghead; reploghead = newentry; }--- 414,425 ---- newentry->color = color; newentry->affectssla = (reporttime && (sladuration > 0));
if (!for_history && timespec && (color!= COL_GREEN)) { newentry->cause = parse_histlogfile(hostname, servicename, timespec); } else newentry->cause = "";
newentry->timespec = (timespec ?strdup(timespec): NULL); newentry->next = reploghead; reploghead = newentry; }
*** 502,508 **** time_t duration; char colstr[MAX_LINE_LEN]; int color;
fileerrors = scan_historyfile(fd, snapshot, snapshot,
l, sizeof(l), starttime,
&duration, colstr);
--- 506,514 ---- time_t duration; char colstr[MAX_LINE_LEN]; int color;
char *p;*histlogname = NULL; fileerrors = scan_historyfile(fd, snapshot, snapshot, l, sizeof(l), starttime,&duration, colstr);
*** 512,518 **** color = -2; }
} --- 518,525 ---- color = -2; }*histlogname = strdup(timename(l)); return color;
p = timename(l);
}if (p) *histlogname = strdup(p); return color;
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
Henrik Stoerner a écrit :
On Fri, Dec 02, 2005 at 09:31:31AM -0000, Morris, Chris (Shared Services) wrote:
I suspect this is somewhat the same problem both of you are seeing. Could you try the attached patch and let me know if it helps ?
I modified bbdisplay/reportdata.c by hand, and pre-built reports work fine now :
$ ~/server/bin/bbcmd --env=~/server/etc/hobbitserver.cfg hobbitreports.sh monthly
2005-12-02 17:39:17 Bad timespec in history file: Mon Nov 21 1132550988
2005-12-02 17:39:20 Weird file '/BB/hobbit/data/hist/ftvmonet.LVM' skipped 2005-12-02 17:41:08 Bad timespec in history file: Thu Nov 24 1132806476
2005-12-02 17:41:18 Bad timespec in history file: Mon Nov 7 1131396507
2005-12-02 17:42:38 Bad timespec in history file: Tue No 1131353699 1332469
2005-12-02 17:42:43 Weird file '/BB/hobbit/data/hist/slsedid.tape' skipped 2005-12-02 17:42:43 Weird file '/BB/hobbit/data/hist/slsedip.tape' skipped 2005-12-02 17:42:45 Weird file '/BB/hobbit/data/hist/slsgmao.tape' skipped 2005-12-02 17:42:45 Weird file '/BB/hobbit/data/hist/slstrac.tape' skipped
Thanks again !
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
participants (3)
-
CHRIS.MORRIS@RWEnpower.com
-
frederic.mangeant@steria.com
-
henrik@hswn.dk