Works for me... without the int i=0, declaration: int lang=DEFAULT_LANGUAGE, i, numEntries, localView=0;
i is uninitialized. Looks like when the second (shadow) declaration was deleted, the line to initialize the variable wasn't carried over. I'll commit that as soon as I can - seems like the cvs is off the air right now... Good find! -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Stanley Hopcroft Sent: Friday, September 20, 2002 12:41 AM To: [EMAIL PROTECTED] Subject: Re: [Ntop-dev] Re: FreeBSD SIGBUS when dumping data. gdb bt from 2.1.50 Dear Ladies and Gentlemen, Here is the gdb information from 2.1.50 for the SIGBUS problem when dumping data on FreeBSD 4.6.2-RELEASE. pc09011> lwp-request 'http://127.0.0.1:3000/dumpTrafficData.html?language=perl&key=fxp0' <HTML> <HEAD><TITLE>An Error Occurred</TITLE></HEAD> <BODY> <H1>An Error Occurred</h1> 500 read timeout </BODY> </HTML> pc09011> 20/Sep/2002 15:31:16 Processing protocol list: 'FTP=ftp|ftp-data,HTTP=http|https,DNS=domain,Oracle=1521-1527,Ntop=3000,NBio s-IP=netbios-ns|netbios-dgm|netbios-ssn,Mail=lotusnote|pop2|pop3|kpop|smtp|i map,SNMP=snmp|snmptrap,Telnet=telnet,Cache=3128,NFS=nfs|nfsd-status,BEA=7000 -7010,SSH=ssh' 20/Sep/2002 15:31:16 Resetting traffic statistics... 20/Sep/2002 15:31:16 Started thread (134944768) for network packet analyser. 20/Sep/2002 15:31:16 Started thread (140308480) for idle hosts detection. 20/Sep/2002 15:31:16 Started thread (140309504) for DNS address resolution. 20/Sep/2002 15:31:16 Initializing plugins (if any)... 20/Sep/2002 15:31:16 NetFlow export disabled 20/Sep/2002 15:31:16 Waiting for HTTP connections on port 3000... 20/Sep/2002 15:31:16 Started thread (140310528) for web server. 20/Sep/2002 15:31:16 Sniffying... 20/Sep/2002 15:31:16 Started thread (140311552) for network packet sniffing on fxp0. 20/Sep/2002 15:31:18 Extending hash size [newSize=512][deviceId=0] Host not found. Host not found. Host not found. Host not found. Program received signal SIGBUS, Bus error. 0x280b7d28 in dumpNtopTrafficInfo (fDescr=0x0, options=0xbfabac22 "language=perl") at emitter.c:1212 1212 while((tmpStr[i] != '\0') && (tmpStr[i] != '=')) (gdb) list 1207 tmpStr = strtok_r(options, "&", &strtokState); 1208 1209 while(tmpStr != NULL) { 1210 int j; 1211 1212 while((tmpStr[i] != '\0') && (tmpStr[i] != '=')) 1213 i++; 1214 1215 if(tmpStr[i] == '=') { 1216 tmpStr[i] = 0; (gdb) info stack #0 0x280b7d28 in dumpNtopTrafficInfo (fDescr=0x0, options=0xbfabac22 "language=perl") at emitter.c:1212 #1 0x280c6ed2 in returnHTTPPage (pageName=0xbfabac0d "dumpTrafficData.html?language=perl", postLen=-1, from=0xbfabae14, httpRequestedAt=0xbfabaac4, usedFork=0xbfabaac0, agent=0xbfabaacc "lwp-request/1.39") at http.c:1788 #2 0x280c785c in handleHTTPrequest (from={s_addr = 2130706433}) at http.c:2088 #3 0x280eff12 in handleSingleWebConnection (fdmask=0xbfabaf3c) at webInterface.c:3592 #4 0x280efe5e in handleWebConnections (notUsed=0x0) at webInterface.c:3456 #5 0x2839b4a3 in _thread_start () from /usr/lib/libc_r.so.4 #6 0x0 in ?? () (gdb) bt full #0 0x280b7d28 in dumpNtopTrafficInfo (fDescr=0x0, options=0xbfabac22 "language=perl") at emitter.c:1212 j = 672105454 tmpStr = 0xbfabac22 "language=perl" strtokState = 0xbfabac30 "key=fxp0" intoabuf = "�\025\t(\000a\n(�\000\000\000\000\000\000\000��A(\"���\207\002\000\000\000a \n(" key = '\000' <repeats 15 times> localbuf = "�\e\t(�\200\n(����褫�\217\e\t(��\020(\016���!���" filter = '\000' <repeats 127 times> keyName = 0x0 lang = 4 i = 672198688 numEntries = -1079270356 filterPattern = {buffer = 0xbfaba50c "\\����n\f(", allocated = 671889029, used = 672197364, syntax = 3215697100, fastmap = 0x280a6100 "z�P�\001", translate = 0x280ad00c "w\001", re_nsub = 28026060, can_be_null = 0, regs_allocated = 0, fastmap_accurate = 0, no_sub = 0, not_bol = 0, not_eol = 0, newline_anchor = 0} shortView = 0 #1 0x280c6ed2 in returnHTTPPage (pageName=0xbfabac0d "dumpTrafficData.html?language=perl", postLen=-1, from=0xbfabae14, httpRequestedAt=0xbfabaac4, usedFork=0xbfabaac0, agent=0xbfabaacc "lwp-request/1.39") at http.c:1788 from = (struct in_addr *) 0xbfabac22 usedFork = (int *) 0xbfabac22 questionMark = 0xbfabac21 "?language=perl" sortedColumn = 0 printTrailer = 1 idx = 2 errorCode = 0 pageNum = 0 statbuf = {st_dev = 671800636, st_ino = 17442388, st_mode = 25856, st_nlink = 10250, st_uid = 3215698504, st_gid = 671685568, st_rdev = 281, st_atimespec = {tv_sec = 671768832, tv_nsec = -1079268792}, st_mtimespec = { tv_sec = 671685619, tv_nsec = 671776960}, st_ctimespec = {tv_sec = 0, tv_nsec = -1079268864}, st_size = 2887065695509093263, st_blocks = -4635423629441781956, st_blksize = 0, st_flags = 675238833, st_gen = 3215698532, st_lspare = 0, st_qspare = {2900128602316674473, 13557099252}} fd = (FILE *) 0x0 tmpStr = "/usr/local/ntop-2.1.50/share/ntop/html/dumpTrafficData.html?language=perl&k ey=fxp0", '\000' <repeats 46 times>, "�<\t(��\n(�5D(\000\000\000\000\212<\t(T&\n(�r\n(\034\2318(\000\000\000\000\ 000\000\000\000�r\n\001訫�7<\t(��\n(\211qy\005\000n\n(\001\000\000\000T&\n( \000a\n(\000a\n(", '\000' <repeats 16 times>, "\212<\t(T&\n(\034\2318(\200)\n(\201:"... domainNameParm = 0x0 revertOrder = 0 rc = -1079268338 t = {tm_sec = 0, tm_min = 0, tm_hour = 0, tm_mday = 0, tm_mon = 0, tm_year = 0, tm_wday = 0, tm_yday = 0, tm_isdst = 0, tm_gmtoff = 0, tm_zone = 0x0} #2 0x280c785c in handleHTTPrequest (from={s_addr = 2130706433}) at http.c:2088 skipLeading = -1079268318 postLen = -1 usedFork = 0 requestedURL = "/dumpTrafficData.html?language=perl\000key=fxp0", '\000' <repeats 467 times> pw = '\000' <repeats 63 times> agent = "lwp-request/1.39", '\000' <repeats 239 times> rc = -1079268318 i = -1079268672 httpRequestedAt = {tv_sec = 1032499885, tv_usec = 140731} gzipBytesSent = 0 #3 0x280eff12 in handleSingleWebConnection (fdmask=0xbfabaf3c) at webInterface.c:3592 fdmask = (fd_set *) 0xbfabaf3c from = {sin_len = 16 '\020', sin_family = 2 '\002', sin_port = 32019, sin_addr = {s_addr = 16777343}, sin_zero = "\000\000\000\000\000\000\000"} from_len = 16 #4 0x280efe5e in handleWebConnections (notUsed=0x0) at webInterface.c:3456 rc = 1 mask = {fds_bits = {65536, 0 <repeats 31 times>}} mask_copy = {fds_bits = {65536, 0 <repeats 31 times>}} topSock = 16 ---Type <return> to continue, or q <return> to quit--- #5 0x2839b4a3 in _thread_start () from /usr/lib/libc_r.so.4 No symbol table info available. #6 0x0 in ?? () No symbol table info available. (gdb) HTH Yours sincerely. -- ------------------------------------------------------------------------ Stanley Hopcroft ------------------------------------------------------------------------ '...No man is an island, entire of itself; every man is a piece of the continent, a part of the main. If a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friend's or of thine own were. Any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee...' from Meditation 17, J Donne. _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop-dev
