Free (): Invalid pointer

Bug #583346 reported by Jean-Daniel.Tissot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Medium
mortheres

Bug Description

Running on Ubuntu karmic
Linux xxxx 2.6.31-21-generic #59-Ubuntu SMP x86_64 GNU/Linux

root@xxxx: ~ # ocsinventory-agent
*** glibc detected *** /usr/bin/perl: free(): invalid pointer: 0x0000000003fad6f4 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f07ddd70dd6]
/lib/libc.so.6(cfree+0x6c)[0x7f07ddd7574c]
/usr/lib/perl5/auto/Net/CUPS/CUPS.so(XS_Net__CUPS__Destination_NETCUPS_freeDestination+0x142)[0x7f07daba24c2]
/usr/lib/libperl.so.5.10(Perl_pp_entersub+0x53f)[0x7f07de7b8c0f]
/usr/lib/libperl.so.5.10(Perl_runops_standard+0x16)[0x7f07de7b6f86]
/usr/lib/libperl.so.5.10(Perl_call_sv+0x47d)[0x7f07de7b49ed]
/usr/lib/libperl.so.5.10(Perl_sv_clear+0xb6)[0x7f07de7cb2c6]
/usr/lib/libperl.so.5.10(Perl_sv_free2+0x52)[0x7f07de7cba82]
/usr/lib/libperl.so.5.10(Perl_leave_scope+0xd5f)[0x7f07de7e824f]
/usr/lib/libperl.so.5.10(Perl_pp_leavesub+0xbd)[0x7f07de7b9f6d]
/usr/lib/libperl.so.5.10(Perl_runops_standard+0x16)[0x7f07de7b6f86]
/usr/lib/libperl.so.5.10(perl_run+0x13c)[0x7f07de7b524c]
/usr/bin/perl(main+0xec)[0x400d7c]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f07ddd19abd]
/usr/bin/perl[0x400bc9]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:01 106938 /usr/bin/perl
00601000-00602000 r--p 00001000 08:01 106938 /usr/bin/perl
00602000-00603000 rw-p 00002000 08:01 106938 /usr/bin/perl
01f36000-04379000 rw-p 00000000 00:00 0 [heap]
7f07d0000000-7f07d0021000 rw-p 00000000 00:00 0
7f07d0021000-7f07d4000000 ---p 00000000 00:00 0
7f07d7b06000-7f07d7b1c000 r-xp 00000000 08:01 65301 /lib/libgcc_s.so.1
7f07d7b1c000-7f07d7d1b000 ---p 00016000 08:01 65301 /lib/libgcc_s.so.1
7f07d7d1b000-7f07d7d1c000 r--p 00015000 08:01 65301 /lib/libgcc_s.so.1
7f07d7d1c000-7f07d7d1d000 rw-p 00016000 08:01 65301 /lib/libgcc_s.so.1
7f07d7d1d000-7f07d7e54000 r-xp 00000000 08:01 110463 /usr/lib/libdb-4.6.so
7f07d7e54000-7f07d8053000 ---p 00137000 08:01 110463 /usr/lib/libdb-4.6.so
7f07d8053000-7f07d8056000 r--p 00136000 08:01 110463 /usr/lib/libdb-4.6.so
7f07d8056000-7f07d8057000 rw-p 00139000 08:01 110463 /usr/lib/libdb-4.6.so
7f07d8057000-7f07d805d000 r-xp 00000000 08:01 109551 /usr/lib/libnss_db-2.2.3.so
7f07d805d000-7f07d825c000 ---p 00006000 08:01 109551 /usr/lib/libnss_db-2.2.3.so
7f07d825c000-7f07d825d000 r--p 00005000 08:01 109551 /usr/lib/libnss_db-2.2.3.so
7f07d825d000-7f07d825e000 rw-p 00006000 08:01 109551 /usr/lib/libnss_db-2.2.3.so
7f07d825e000-7f07d8268000 r-xp 00000000 08:01 65500 /lib/libnss_nis-2.10.1.so
7f07d8268000-7f07d8467000 ---p 0000a000 08:01 65500 /lib/libnss_nis-2.10.1.so
7f07d8467000-7f07d8468000 r--p 00009000 08:01 65500 /lib/libnss_nis-2.10.1.so
7f07d8468000-7f07d8469000 rw-p 0000a000 08:01 65500 /lib/libnss_nis-2.10.1.so
7f07d8469000-7f07d847f000 r-xp 00000000 08:01 65495 /lib/libnsl-2.10.1.so
7f07d847f000-7f07d867f000 ---p 00016000 08:01 65495 /lib/libnsl-2.10.1.so
7f07d867f000-7f07d8680000 r--p 00016000 08:01 65495 /lib/libnsl-2.10.1.so
7f07d8680000-7f07d8681000 rw-p 00017000 08:01 65495 /lib/libnsl-2.10.1.so
7f07d8681000-7f07d8683000 rw-p 00000000 00:00 0
7f07d8683000-7f07d868a000 r-xp 00000000 08:01 65496 /lib/libnss_compat-2.10.1.so
7f07d868a000-7f07d888a000 ---p 00007000 08:01 65496 /lib/libnss_compat-2.10.1.so
7f07d888a000-7f07d888b000 r--p 00007000 08:01 65496 /lib/libnss_compat-2.10.1.so
7f07d888b000-7f07d888c000 rw-p 00008000 08:01 65496 /lib/libnss_compat-2.10.1.so
7f07d888c000-7f07d8892000 r-xp 00000000 08:01 179628 /usr/lib/perl/5.10.0/auto/Math/BigInt/FastCalc/FastCalc.so
7f07d8892000-7f07d8a91000 ---p 00006000 08:01 179628 /usr/lib/perl/5.10.0/auto/Math/BigInt/FastCalc/FastCalc.so
7f07d8a91000-7f07d8a92000 r--p 00005000 08:01 179628 /usr/lib/perl/5.10.0/auto/Math/BigInt/FastCalc/FastCalc.so
7f07d8a92000-7f07d8a93000 rw-p 00006000 08:01 179628 /usr/lib/perl/5.10.0/auto/Math/BigInt/FastCalc/FastCalc.so
7f07d8a93000-7f07d8a96000 r-xp 00000000 08:01 65355 /lib/libgpg-error.so.0.4.0
7f07d8a96000-7f07d8c95000 ---p 00003000 08:01 65355 /lib/libgpg-error.so.0.4.0
7f07d8c95000-7f07d8c96000 r--p 00002000 08:01 65355 /lib/libgpg-error.so.0.4.0
7f07d8c96000-7f07d8c97000 rw-p 00003000 08:01 65355 /lib/libgpg-error.so.0.4.0
7f07d8c97000-7f07d8c9e000 r-xp 00000000 08:01 65505 /lib/librt-2.10.1.so
7f07d8c9e000-7f07d8e9d000 ---p 00007000 08:01 65505 /lib/librt-2.10.1.so
7f07d8e9d000-7f07d8e9e000 r--p 00006000 08:01 65505 /lib/librt-2.10.1.so
7f07d8e9e000-7f07d8e9f000 rw-p 00007000 08:01 65505 /lib/librt-2.10.1.so
7f07d8e9f000-7f07d8edc000 r-xp 00000000 08:01 65335 /lib/libdbus-1.so.3.4.0
7f07d8edc000-7f07d90dc000 ---p 0003d000 08:01 65335 /lib/libdbus-1.so.3.4.0
7f07d90dc000-7f07d90dd000 r--p 0003d000 08:01 65335 /lib/libdbus-1.so.3.4.0
7f07d90dd000-7f07d90de000 rw-p 0003e000 08:01 65335 /lib/libdbus-1.so.3.4.0
7f07d90de000-7f07d9153000 r-xp 00000000 08:01 65351 /lib/libgcrypt.so.11.5.2
7f07d9153000-7f07d9352000 ---p 00075000 08:01 65351 /lib/libgcrypt.so.11.5.2
7f07d9352000-7f07d9353000 r--p 00074000 08:01 65351 /lib/libgcrypt.so.11.5.2
7f07d9353000-7f07d9356000 rw-p 00075000 08:01 65351 /lib/libgcrypt.so.11.5.2
7f07d9356000-7f07d9366000 r-xp 00000000 08:01 108578 /usr/lib/libtasn1.so.3.1.5
7f07d9366000-7f07d9565000 ---p 00010000 08:01 108578 /usr/lib/libtasn1.so.3.1.5
7f07d9565000-7f07d9566000 r--p 0000f000 08:01 108578 /usr/lib/libtasn1.so.3.1.5
7f07d9566000-7f07d9567000 rw-p 00010000 08:01 108578 /usr/lib/libtasn1.so.3.1.5
7f07d9567000-7f07d9569000 r-xp 00000000 08:01 65363 /lib/libkeyutils-1.2.soAbandon

Revision history for this message
Jean-Daniel.Tissot (jean-daniel-tissot) wrote :

I forget :
Ocsinventory-Agent-1.1.2

Revision history for this message
mortheres (mortheres) wrote :

Hi,

Can you try to send more logs from the agent using this command :

#ocsinventory --debug

There seems to be a problem using the Net::CUPS perl module with your Uubntu 64 bits system. Can you try to uninstall the libnet-cups-perl package (or from CPAN if you used it to install this module) and run the agent again ?

Kind regards,

--
Guillaume

Changed in ocsinventory-unix-agent:
assignee: nobody → mortheres (mortheres)
Revision history for this message
Jean-Daniel.Tissot (jean-daniel-tissot) wrote :
Download full text (13.3 KiB)

Hi, here is the output of ocsincentory-agent --debug

root@dp470-p02: ~ # ocsinventory-agent --debug
[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 1.1.2
[debug] Log system initialised (Stderr)
[debug] --scan-homedirs missing. Don't scan user directories
[debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__chrono-ocs.univ-fcomte.fr_ocsinventory/ocsinv.adm
[debug] A TAG seems to already exist in the server for this machine. The -t paramter may be ignored by the server unless it has OC
S_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT=1.
[debug] Account info updated successfully
[debug] Turns CompatibilityLayer on for /etc/ocsinventory/modules.conf
[debug] OCS Agent initialised
[debug] Calling handlers : `start_handler'
[debug] Compress::Zlib is available.
[debug] sending XML
[debug] Calling handlers : `prolog_writers'
[debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <CONTENT>
    <ACCOUNTINFO>
      <KEYNAME>TAG</KEYNAME>
      <KEYVALUE>Patrick Giraudoux</KEYVALUE>
    </ACCOUNTINFO>
  </CONTENT>
  <DEVICEID>dp470-p02-2010-02-05-10-46-33</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[debug] =BEGIN=SERVER RET======
[debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'ISO-8859-1\'?>
<REPLY>
  <OPTION>
    <NAME>DOWNLOAD</NAME>
    <PARAM FRAG_LATENCY="10" PERIOD_LATENCY="2" TIMEOUT="30" ON="1" TYPE="CONF" CYCLE_LATENCY="60" PERIOD_LENGTH="10" />
  </OPTION>
  <RESPONSE>SEND</RESPONSE>
  <PROLOG_FREQ>24</PROLOG_FREQ>
</REPLY>
';
[debug] =END=SERVER RET======
[debug] PROLOG_FREQ has not changed since last process
[debug] Calling handlers : `prolog_reader'
[debug] Ocsinventory::Agent::Backend::IpDiscover::IpDiscover ignored
[debug] - nmap found
[debug] Ocsinventory::Agent::Backend::OS::AIX ignored
[debug] Ocsinventory::Agent::Backend::OS::BSD ignored
[debug] - dmidecode found
[debug] - dmidecode found
[debug] - Sys::Hostname loaded
[debug] - ipmitool found
[debug] Ocsinventory::Agent::Backend::OS::Generic::Ipmi ignored
[debug] - lspci found
[debug] - lspci found
[debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::BSDpkg ignored
[debug] - dpkg found
[debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Gentoo ignored
[debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Pacman ignored
[debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::RPM ignored
[debug] - Net::CUPS loaded
[debug] - ps found
[debug] - get-edid found
[debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::ARM ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::Alpha ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::MIPS ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::PowerPC ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::SPARC ignored
[debug] - /proc/cpuinfo can be read
[debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::m68k ignored
[debug] - lsb_release found
[debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::ArchLinux ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Fedora ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Gentoo ignored
[debug] Ocsinventory::Agent::Backend::OS::Linux:...

Revision history for this message
Jean-Daniel.Tissot (jean-daniel-tissot) wrote :

Hi,

I remove libnet-cups-perl and it works perfectly

Thanks again.

mortheres (mortheres)
Changed in ocsinventory-unix-agent:
status: New → Triaged
status: Triaged → Invalid
importance: Undecided → Medium
Revision history for this message
mortheres (mortheres) wrote :

Ok thanks a lot.

This bugs seems to be the same as the Bug #452062 from the libnet-cups-perl package : https://bugs.launchpad.net/ubuntu/+source/libnet-cups-perl/+bug/452062

Kind regards,

--
Guillaume

Changed in ocsinventory-unix-agent:
status: Invalid → Confirmed
Revision history for this message
Frank (frank-bourdeau) wrote :

Use latest version of Net::CUPS perl module (0.61). Fix made on the new version of the unix agent.

Changed in ocsinventory-unix-agent:
status: Confirmed → Fix Committed
mortheres (mortheres)
Changed in ocsinventory-unix-agent:
milestone: none → 2.1rc1
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.