[Namazu-users-ja 475] Re: mknmz の挙動について

Naoya Wakasugi naoyaw @ azb.nttls.co.jp
2005年 8月 26日 (金) 13:55:00 JST


若杉です。

> > $ perl -d /usr/local/bin/mknmz 引数 
> > DB<1> t
> > DB<2> c
> > 
> > とするとトレースできるので、落ちた直前がどのようになっているか
> > 教えていただけませんか?

とりあえず、終わる前の100行を取り出してみました。手掛かりになりますで
しょうか。

mknmz::adjust_first_docid(/usr/local/namazu2/bin/mknmz:2384):
2384:       $data[0] = $data[0] - $last_docid;
mknmz::adjust_first_docid(/usr/local/namazu2/bin/mknmz:2385):
2385:       return undef if ($data[0] < 0); # namazu-bug-ja#31
mknmz::adjust_first_docid(/usr/local/namazu2/bin/mknmz:2386):
2386:       $record = pack 'w*', @data;
mknmz::adjust_first_docid(/usr/local/namazu2/bin/mknmz:2387):
2387:       return $record;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2198):
2198:                   check_records(\$record, \$baserecord, 1) unless defined $record; # namazu-bugs-ja#31
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2199):
2199:                   $record = $adjrecord;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2200):
2200:                   my $n2 = length($record) + $baseleng;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2201):
2201:                   my $data = pack("w", $n2) .  $baserecord . $record;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2202):
2202:                   print $fh_tmp_p $data;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2203):
2203:                   $ptr += length($data);
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2171):
2171:       for (my $i = 0; $i < 65536; $i++) {
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2173):
2173:           my $baserecord = "";
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2174):
2174:           my $baseleng = 0;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2176):
2176:           if ($opened) {
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2177):
2177:               my $tmp = 0;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2178):
2178:               read($fh_phraseindex, $tmp, $var::INTSIZE);
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2179):
2179:               $tmp = unpack("N", $tmp);
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2180):
2180:               if ($tmp != 0xffffffff) { # 0xffffffff
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2181):
2181:                   $baseleng = readw($fh_phrase);
mknmz::readw(/usr/local/namazu2/bin/mknmz:2357):
2357:       my $fh = shift;
mknmz::readw(/usr/local/namazu2/bin/mknmz:2358):
2358:       my $ret = '';
mknmz::readw(/usr/local/namazu2/bin/mknmz:2359):
2359:       my $c;
mknmz::readw(/usr/local/namazu2/bin/mknmz:2361):
2361:       while (read($fh, $c, 1)){
mknmz::readw(/usr/local/namazu2/bin/mknmz:2362):
2362:           $ret .= $c;
mknmz::readw(/usr/local/namazu2/bin/mknmz:2363):
2363:           last unless 0x80 & ord $c;
mknmz::readw(/usr/local/namazu2/bin/mknmz:2365):
2365:       return unpack('w', $ret);
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2182):
2182:                   read($fh_phrase, $baserecord, $baseleng);
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2185):
2185:           if (defined($PhraseHash{$i})) {
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2186):
2186:               if ($baserecord eq "") {
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2194):
2194:                   print $fh_tmp_pi pack("N", $ptr);
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2195):
2195:                   my $record = $PhraseHash{$i};
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2196):
2196:                   my $last_docid = get_last_docid($baserecord, 1);
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2369):
2369:       my ($record, $step) = @_;
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2370):
2370:       my (@data) = unpack 'w*', $record;
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2372):
2372:       my $sum = 0;
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2373):
2373:       for (my $i = 0; $i < @data; $i += $step) {
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2374):
2374:           $sum += $data[$i];
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2373):
2373:       for (my $i = 0; $i < @data; $i += $step) {
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2374):
2374:           $sum += $data[$i];
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2373):
2373:       for (my $i = 0; $i < @data; $i += $step) {
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2374):
2374:           $sum += $data[$i];
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2373):
2373:       for (my $i = 0; $i < @data; $i += $step) {
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2376):
2376:       my $leng = @data / $step;
mknmz::get_last_docid(/usr/local/namazu2/bin/mknmz:2377):
2377:       return $sum;
mknmz::write_phrase_hash_sub(/usr/local/namazu2/bin/mknmz:2197):
2197:                   my $adjrecord = adjust_first_docid($record, $last_docid);
mknmz::adjust_first_docid(/usr/local/namazu2/bin/mknmz:2381):
2381:       my ($record, $last_docid) = @_;
mknmz::adjust_first_docid(/usr/local/namazu2/bin/mknmz:2382):
2382:       my (@data) = unpack 'w*', $record;
Out of memory!
wakati::CODE(0x85d088)(/usr/local/namazu-2.0.14/share/namazu/pl/wakati.pl:83):
83:                     $t->DESTROY() if defined $t;
Out of memory!
Callback called exit.
END failed--cleanup aborted.





Namazu-users-ja メーリングリストの案内