#38 Detected file core.

open
nobody
None
5
2005-06-29
2005-06-29
Coke
No

Hello.

We have a problem in our project.
The question is that NGET drops core at times. The
process continues to run.
It may be something that has to do with detecting a file
type that it is not used to, but we aren't sure about this.
Debugging the source code with gdb, we detect the next
situation:

@oscar /var/tmp/nget-0.27$gdb -q nget /var/tmp/core
Core was generated by `/usr/local/bin/nget -q -q -
p /dnews/history/nget/data/alt.binaries.pictures.ero'.
Program terminated with signal 11, Segmentation fault.
#0 0x000a5f60 in std::_Rb_tree<unsigned long,
std::pair<unsigned long const, file_match*>,
std::_Select1st<std::pair<unsigned long const,
file_match*> >, std::less<unsigned long>,
std::allocator<std::pair<unsigned long const,
file_match*> > >::_M_insert(std::_Rb_tree_node_base*,
std::_Rb_tree_node_base*, std::pair<unsigned long
const, file_match*> const&) (this=0x0, __x_=0x970e88,
__y_=0xeeb70, __v=@0xffbff5e8)
at /usr/local/include/c++/3.3.2/bits/stl_tree.h:982

982 if (__y == _M_header || __x != 0 ||
(gdb) bt
#0 0x000a5f60 in std::_Rb_tree<unsigned long,
std::pair<unsigned long const, file_match*>,
std::_Select1st<std::pair<unsigned long const,
file_match*> >, std::less<unsigned long>,
std::allocator<std::pair<unsigned long const,
file_match*> > >::_M_insert(std::_Rb_tree_node_base*,
std::_Rb_tree_node_base*, std::pair<unsigned long
const, file_match*> const&) (this=0x0, __x_=0x970e88,
__y_=0xeeb70, __v=@0xffbff5e8)
at /usr/local/include/c++/3.3.2/bits/stl_tree.h:982
#1 0x0004ec30 in c_nntp_cache::~c_nntp_cache()
(this=0x1478a8) at log.h:51
#2 0x00050098 in c_nntp_cache::~c_nntp_cache()
(this=0x1478a8)
at /usr/local/include/c++/3.3.2/bits/basic_string.h:206
(gdb) whatis __y
type = _Rb_tree_node_base *
(gdb) whatis __x
type =
const vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>,std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > &
(gdb) whatis _M_header
type = _Rb_tree_node<std::pair<const long unsigned
int, file_match*> > *
(gdb) print &__y
Address requested for identifier "__y" which is in register
$o5
(gdb) print &__x
$1 = (
const vector<std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>,std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > *)
0xffbff5e8
(gdb) print &_M_header
$2 = (_Rb_tree_node<std::pair<const long unsigned int,
file_match*> > **) 0x0
(gdb) print *(0xffbff5e8)
$3 = 977776
(gdb) print *(0x0)
Cannot access memory at address 0x0

It may be a problem about memory because some
pointer could be out of range, pointing to a memory
address not allowed or something like that.

It could be helpul for us if you would be able to give us
any solution concerning to this problem.

Waiting for your response,

Thanks for all.

An affectionate greeting.

Discussion

  • forceuser2
    forceuser2
    2005-06-30

    Logged In: YES
    user_id=1304693

    Excuse me,

    Yesterday I sent you an e-mail about "Detected File core".

    The version where is running the source code is nget-0.27.

    Thanks for all.

    An affectionate greeting.

     
  • Logged In: YES
    user_id=65253

    Hello,

    Thank you for your report. It would be very helpful if you
    could recompile nget without optimizations, since that
    generates much more understandable backtraces. This can be
    done by running the configure script with the added argument
    "--enable-debug", then running "make clean", "make". Then
    with the new executable try to reproduce the problem or wait
    for it to occur again, and add the new backtrace to this report.

    Thanks.