Strange checkpkg issue

Dagobert Michelsen dam at opencsw.org
Thu Feb 19 10:34:19 CET 2015


Hi Maciej,

> Am 18.02.2015 um 21:41 schrieb Maciej (Matchek) Bliziński <maciej at opencsw.org>:
> 
> 2015-02-18 14:45 GMT+00:00 Dagobert Michelsen <dam at opencsw.org>:
> > lib.python.shell.ShellError: Running ['/home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py', '--input', '/var/tmp/pkg_XGEtjW/CSWnagios-plugin-mk-livestatus/root/usr/lib/check_mk/livestatus.o'] has failed, error code: 1. To find out why the command failed, please run it in the foreground, like this: /home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py --input /var/tmp/pkg_XGEtjW/CSWnagios-plugin-mk-livestatus/root/usr/lib/check_mk/livestatus.o
> 
> Try the above suggested command, possibly providing a different, existing path to livestatus.o, in case the temporary directory gets deleted by the time you read the error message.

It seems indeed be a problem with the inspected ELF binary:

dam at unstable10s [unstable10s]:/home/dam/mgar/pkg/nagios-plugin-check_mk/trunk > PYTHONPATH=~/mgar/gar/v2 /home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py --input /var/tmp/pkg_XGEtjW/CSWnagios-plugin-mk-livestatus/root/usr/lib/check_mk/livestatus.o  

> Traceback (most recent call last):
>   File "/home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py", line 238, in <module>
>     md5_sum = extractor.CollectBinaryElfinfo()
>   File "/home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py", line 166, in CollectBinaryElfinfo
>     syminfo = sections['syminfo'].get_symbol(index)
>   File "/opt/csw/lib/python2.6/site-packages/elftools/elf/sections.py", line 153, in get_symbol
>     name = self.symboltable.get_symbol(n).name
> AttributeError: 'NullSection' object has no attribute 'get_symbol'
> zsh: 22732 exit 1     PYTHONPATH=~/mgar/gar/v2  —input 


Null Sections are perfectly valid in ELF, so I guess it is a flaw in pyelftools.
I just saw that 0.23 is out and try an update and see if that fixes my issue.

Answer: it stops working for Python 2.6:

> + Version 0.23 (08.11.2014)
> 
>   - Minimal Python 2.x version raised to 2.7
>   - Basic support for MIPS (contributed by Karl Vogel).
>   - Support for PT_NOTE segment parsing (contributed by Alex Deymo).
>   - Support for parsing symbol table in dynamic segment
>     (contributed by Nam T. Nguyen).

When I use Python 2.7 for collect_binary_elfinfo.py the same error persists:

> dam at unstable10s [unstable10s]:/home/dam/mgar/pkg/nagios-plugin-check_mk/trunk > PYTHONPATH=~/mgar/gar/v2 /home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py --input /var/tmp/pkg_XGEtjW/CSWnagios-plugin-mk-livestatus/root/usr/lib/check_mk/livestatus.o  
> Traceback (most recent call last):
>   File "/home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py", line 238, in <module>
>     md5_sum = extractor.CollectBinaryElfinfo()
>   File "/home/dam/mgar/pkg/.buildsys/v2/gar/lib/python/collect_binary_elfinfo.py", line 166, in CollectBinaryElfinfo
>     syminfo = sections['syminfo'].get_symbol(index)
>   File "/opt/csw/lib/python2.7/site-packages/elftools/elf/sections.py", line 154, in get_symbol
>     name = self.symboltable.get_symbol(n).name
> AttributeError: 'NullSection' object has no attribute 'get_symbol'
> zsh: 1490 exit 1     PYTHONPATH=~/mgar/gar/v2  —input 

I guess I downgrade py_pyelftools for now back to 0.22 until we upgraded checkpkg to Python 2.7.


Best regards

  — Dago

-- 
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2418 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20150219/ac306913/attachment.p7s>


More information about the maintainers mailing list