Bug #2379

Core dump during inventory on Solaris 10

Added by Walid Nouh over 3 years ago. Updated over 3 years ago.

Status:RejectedStart date:12/23/2013
Priority:NormalDue date:
Assignee:Guillaume Rousse% Done:

0%

Category:inventory
Target version:-
For junior contributor:No

Description

when running agent 2.3.4 on Solaris 10 x86 without passing the --no-category=printer option in command line the agent crashes by doing a core dump.
Even by setting the no-category attribute in agent.cfg it crashes.

[debug] Running FusionInventory::Agent::Task::Inventory::AccessLog
[debug] Running FusionInventory::Agent::Task::Inventory::Generic
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Arch
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Domains
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Environment
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Hostname
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Ipmi
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Printers
Erreur de segmentation - L'image m�moire a �t� vid�e dans le fichier core.

By running perl with -d option, I get the following error :

[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Hostname
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Ipmi
[debug] Running FusionInventory::Agent::Task::Inventory::Generic::Printers
Signal SEGV at lib/FusionInventory/Agent/Task/Inventory/Generic/Printers.pm line 30.
        FusionInventory::Agent::Task::Inventory::Generic::Printers::doInventory("no_category", HASH(0x93bce10), "inventory", FusionInventory::Agent::Inventory=HASH(0x99cfe90), "registry", undef, "scan_homedirs", 0, "datadir", ...) called at lib/FusionInventory/Agent/Tools.pm line 462
        eval {...} called at lib/FusionInventory/Agent/Tools.pm line 454
        FusionInventory::Agent::Tools::runFunction("module", "FusionInventory::Agent::Task::Inventory::Generic::Printers", "function", "doInventory", "logger", FusionInventory::Agent::Logger=HASH(0x8d7e5a8), "timeout", 30, "params", ...) called at lib/FusionInventory/Agent/Task/Inventory.pm line 253
        FusionInventory::Agent::Task::Inventory::_runModule(FusionInventory::Agent::Task::Inventory=HASH(0x99cefc0), "FusionInventory::Agent::Task::Inventory::Generic::Printers", FusionInventory::Agent::Inventory=HASH(0x99cfe90), HASH(0x93bce10)) called at lib/FusionInventory/Agent/Task/Inventory.pm line 280
        FusionInventory::Agent::Task::Inventory::_feedInventory(FusionInventory::Agent::Task::Inventory=HASH(0x99cefc0), FusionInventory::Agent::Inventory=HASH(0x99cfe90), HASH(0x93bce10)) called at lib/FusionInventory/Agent/Task/Inventory.pm line 70
        FusionInventory::Agent::Task::Inventory::run(FusionInventory::Agent::Task::Inventory=HASH(0x99cefc0), "user", "laposte", "password", "laposte1090", "proxy", undef, "ca_cert_file", undef, ...) called at lib/FusionInventory/Agent.pm line 329
        FusionInventory::Agent::_runTaskReal(FusionInventory::Agent=HASH(0x8d7e3f8), FusionInventory::Agent::Target::Server=HASH(0x8d8a580), "Inventory", FusionInventory::Agent::XML::Response=HASH(0x99d0220)) called at lib/FusionInventory/Agent.pm line 303
        FusionInventory::Agent::_runTask(FusionInventory::Agent=HASH(0x8d7e3f8), FusionInventory::Agent::Target::Server=HASH(0x8d8a580), "Inventory", FusionInventory::Agent::XML::Response=HASH(0x99d0220)) called at lib/FusionInventory/Agent.pm line 272
        eval {...} called at lib/FusionInventory/Agent.pm line 271
        FusionInventory::Agent::_runTarget(FusionInventory::Agent=HASH(0x8d7e3f8), FusionInventory::Agent::Target::Server=HASH(0x8d8a580)) called at lib/FusionInventory/Agent.pm line 228
        eval {...} called at lib/FusionInventory/Agent.pm line 227
        FusionInventory::Agent::run(FusionInventory::Agent=HASH(0x8d7e3f8)) called at ./bin/fusioninventory-agent line 111
        eval {...} called at ./bin/fusioninventory-agent line 109
Fin anormale - L'image m�moire a �t� vid�e dans le fichier core.

Perl version :

bash-3.2# perl -v

This is perl, v5.8.4 built for i86pc-solaris-64int
(with 35 registered patches, see perl -V for more detail)

Copyright 1987-2004, Larry Wall

On a Solaris 11 with Perl 5.12 the problem doesn't appear.

History

#1 Updated by Walid Nouh over 3 years ago

  • Category set to inventory

#2 Updated by Walid Nouh over 3 years ago

  • Description updated (diff)

#3 Updated by Walid Nouh over 3 years ago

  • Description updated (diff)

#4 Updated by Guillaume Rousse over 3 years ago

  • Status changed from New to Feedback
  • Assignee set to Guillaume Rousse
  • Target version deleted (2.4.0)

Line 30 of FusionInventory::Agent::Task::Inventory::Generic::Printers is a call to Net::CUPS API:
my $uri = $printer->getUri();

I'd rather suspect Net::CUPS or cups itself than perl. What are their versions ?

#5 Updated by Gonéri Le Bouder over 3 years ago

I've already got such similar issues with Net::CUPS. Sadly, it's definitivly a Perl installation issue.

#6 Updated by Walid Nouh over 3 years ago

Neither cups nor Net::CUPS installed on my system Guillaume.

#7 Updated by Gonéri Le Bouder over 3 years ago

What does this say?

perl -MNet::CUPS -e1

#8 Updated by Walid Nouh over 3 years ago

It says nothing

bash-3.2# perl -Iextlib/lib/perl5/ -MNet::CUPS -e1
bash-3.2# 

I just did somes tests again, I cannot reproduire the issue with the no-category in the agent.cfg file. It works now as expected

#9 Updated by Walid Nouh over 3 years ago

There's a cups.pm in /opt/csw/lib/perl/csw/Net/CUPS.pm
It's version is 0.61.
but there's no cups executable on the system.

#10 Updated by Guillaume Rousse over 3 years ago

  • Status changed from Feedback to Rejected

Summary of IRC discussion
The issue is in the Net::CUPS package provided by OpenCSW, as demonstrated by this simple test case:
perl -MNet::CUPS -e 'print $_->getUri() foreach Net::CUPS->new()->getDestinations();'

Also available in: Atom PDF