From: Paulo A. G. F. <pau...@de...> - 2007-03-30 15:50:43
|
I've traced the problem with greater detail and found that the problem = is at perf_get_next at log_parser.c file. The problem occurs within these lines of code: if(p1[0] =3D=3D '\'') { p1++; p2 =3D p1; /* Check length of label */ while(p2[0] !=3D '\0') { if((p2[0] =3D=3D '\\') && (p2[1] =3D=3D '\'')) { p2++; } else if((p2[0] =3D=3D '\\') && (p2[1] =3D=3D = '\\')) { p2++; } else if(p2[0] =3D=3D '\'') { break; } p2++; } if(p2[0] =3D=3D '\0') return(-2); if(p2[1] !=3D '=3D') return(-3); /* Reallocate memory for label if necessary */ l =3D p2-p1; if(l>=3D p->label_len) { p->label_len +=3D 20; perfparse stops here =3D> p->label =3D = realloc(p->label,p->label_len*sizeof(char)); if(NULL =3D=3D p->label) return(-4); } And here go perfparse-log2mysql famous last words: 154 l =3D p2-p1; (gdb) n 155 if(l>=3D p->label_len) { (gdb) 157 p->label =3D = realloc(p->label,p->label_len*sizeof(char)); (gdb) 156 p->label_len +=3D 20; (gdb) 157 p->label =3D = realloc(p->label,p->label_len*sizeof(char)); (gdb) *** glibc detected *** realloc(): invalid next size: 0x09853f98 *** Program received signal SIGABRT, Aborted. 0x006327a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) backtrace full #0 0x006327a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 No symbol table info available. #1 0x006727f5 in raise () from /lib/tls/libc.so.6 No symbol table info available. #2 0x00674199 in abort () from /lib/tls/libc.so.6 No symbol table info available. #3 0x006a64ea in __libc_message () from /lib/tls/libc.so.6 No symbol table info available. #4 0x006ae8c2 in _int_realloc () from /lib/tls/libc.so.6 No symbol table info available. #5 0x006af786 in realloc () from /lib/tls/libc.so.6 No symbol table info available. #6 0x002ff067 in perf_get_next (data=3D0x98408b8, p=3D0x98409e8) at = log_parser.c:157 p1 =3D 0x772820 "\001" p2 =3D 0x9853f98 "" l =3D Variable "l" is not available. I've found a link = (http://www.archivesat.com/Linux_C_programming/thread1222039.htm) which = tells about some kind of programming error which "blows away bookkeeping = of the memory allocator". In this case, is this a Perfparse bug or a = glibc bug? []'s and TIA Paulo Afonso Graner Fessel Administrador de Ambiente e Sistemas UNIX pau...@de... Fone: +55 (11) 3848-7422 (Novo n=FAmero) http://www.dedalusprime.com.br |