- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name: Krok
Subject: Cached error
� ��������� �������� (�� 24-��)
Cached �� ����������, ���� � ����� �������� :
cached[919]: {00} Starting in new mode
cached[919]: {00} Thu 24 15:48:34 [919] Started on port 7000. Accepting 1024
connections
��� ��� ��� gdb :
$ gdb ./sbin/cached
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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 "i386-redhat-linux-gnu"...
(gdb) run
Starting program: /usr/local/dpsearch/sbin/cached
[New Thread 1078955936 (LWP 1287)]
cached[1287]: {00} Starting in new mode
cached[1287]: {00} Thu 24 15:59:30 [1287] Started on port 7000. Accepting 1024
connections
[New Thread 1098967856 (LWP 1308)]
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 1098967856 (LWP 1308)]
0x400a90e7 in DpsBaseSeek (A=0x8085bf0, P=0x4180e9d8, mode=1) at base.c:373
373 unsigned int FileNo = DPS_FILENO(P->rec_id, P->NFiles);
(gdb) list
368 }
369
370
371 __C_LINK int __DPSCALL DpsBaseSeek(DPS_AGENT *A, DPS_BASE_PARAM *P, int
mode) {
372 unsigned int hash;
373 unsigned int FileNo = DPS_FILENO(P->rec_id, P->NFiles);
374
375 if (FileNo != P->FileNo || ((P->mode != mode) && (P->mode ==
DPS_READ_LOCK)) || P->opened == 0) {
376 if (P->opened) DpsBaseClose(A, P);
377 return DpsBaseOpen(A, P, mode);
(gdb) print *P
$2 = {CurrentItemPos = 0, PreviousItemPos = 0, subdir = 0x0, basename = 0x0,
indname = 0x804ca53 "tree", Ifilename = 0x804ca58 "wrd",
Sfilename = 0x804ca58 "wrd", rec_id = 45219840, NFiles = 0, FileNo = 690, Ifd
= 768, Sfd = 0, Item = {rec_id = 0, offset = 0,
next = 0, size = 0, orig_size = 0}, mode = 1, mishash = 0, opened = 0,
zlib_level = 0, zlib_method = 0, zlib_windowBits = 0,
zlib_memLevel = 0, zlib_strategy = 9}
(gdb) up
#1 0x400aa4e9 in DpsBaseOptimize (Agent=0x8085bf0, P=0x4180e9d8, sbase=690) at
base.c:779
779 if (DpsBaseSeek(Agent, P, DPS_WRITE_LOCK) != DPS_OK) {
(gdb) list
774 for (base = base_from; base < base_to; base++) {
775
776 error_cnt = 0;
777 gain = (long)0;
778 P->rec_id = base << DPS_BASE_BITS;
779 if (DpsBaseSeek(Agent, P, DPS_WRITE_LOCK) != DPS_OK) {
780 DpsLog(Agent, DPS_LOG_ERROR, "Can't open base %s/%s {%s:%d}",
P->subdir, P->basename, __FILE__, __LINE__);
781 DpsBaseClose(Agent, P);
782 return DPS_ERROR;
783 }
(gdb) print *P
$5 = {CurrentItemPos = 0, PreviousItemPos = 0, subdir = 0x0, basename = 0x0,
indname = 0x804ca53 "tree", Ifilename = 0x804ca58 "wrd",
Sfilename = 0x804ca58 "wrd", rec_id = 45219840, NFiles = 0, FileNo = 690, Ifd
= 768, Sfd = 0, Item = {rec_id = 0, offset = 0,
next = 0, size = 0, orig_size = 0}, mode = 1, mishash = 0, opened = 0,
zlib_level = 0, zlib_method = 0, zlib_windowBits = 0,
zlib_memLevel = 0, zlib_strategy = 9}
(gdb) up
#2 0x0804b082 in thread_optimize (arg=0x8085bf0) at cached.c:640
640 if (!Agent->Flags.OptimizeAtUpdate) DpsBaseOptimize(Agent, &P,
current_base);
(gdb) list
635 if (!Agent->Conf->logs_only) {
636 DPS_GETLOCK(Agent, DPS_LOCK_CACHED_N(current_base));
637 res = DpsLogdSaveBuf(Agent, Agent->Conf, current_base);
638 DPS_RELEASELOCK(Agent, DPS_LOCK_CACHED_N(current_base));
639 }
640 if (!Agent->Flags.OptimizeAtUpdate) DpsBaseOptimize(Agent, &P,
current_base);
641 DpsBaseClose(Agent, &P);
642 current_base++;
643 current_base %= P.NFiles;
644
(gdb) print P
$6 = {CurrentItemPos = 0, PreviousItemPos = 0, subdir = 0x804ca53 "tree",
basename = 0x804ca58 "wrd", indname = 0x804ca58 "wrd",
Ifilename = 0x2b20000 <Address 0x2b20000 out of bounds>, Sfilename = 0x0,
rec_id = 690, NFiles = 768, FileNo = 0, Ifd = 0, Sfd = 0,
Item = {rec_id = 0, offset = 0, next = 1, size = 0, orig_size = 0}, mode = 0,
mishash = 0, opened = 0, zlib_level = 9,
zlib_method = 8, zlib_windowBits = 11, zlib_memLevel = 9, zlib_strategy = 0}
������ ������, ���������, �� ����� ����� ����...
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Read the full topic here:
http://www.dataparksearch.org/cgi-bin/simpleforum.cgi?fid=05;post=