Bug 1028761

Summary: Segfault at import of GeoIP via python-2.7
Product: [Fedora] Fedora Reporter: Michele Baldessari <michele>
Component: python-GeoIPAssignee: Matt Domsch <matt_domsch>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: a.badger, i, matt_domsch
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-GeoIP-1.2.8-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-18 02:54:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michele Baldessari 2013-11-10 14:36:11 UTC
Description of problem:
GeoIP segfault at import time on F20

Version-Release number of selected component (if applicable):
python-2.7.5-8.fc20.x86_64
python-GeoIP-1.2.8-2.fc20.x86_64


How reproducible:
100%

Steps to Reproduce:
1. import GeoIP

Actual results:
(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00000031a4698290 in PyString_FromString (str=0x0) at /usr/src/debug/Python-2.7.5/Objects/stringobject.c:121
#2  0x00007ffff15624d3 in initGeoIP () at py_GeoIP.c:629
#3  0x00000031a46f4fc9 in _PyImport_LoadDynamicModule (name=name@entry=0x6f8e60 "GeoIP", 
    pathname=pathname@entry=0x6f9e70 "/usr/lib64/python2.7/site-packages/GeoIP.so", fp=<optimized out>) at /usr/src/debug/Python-2.7.5/Python/importdl.c:53
#4  0x00000031a46f2e03 in load_module (name=name@entry=0x6f8e60 "GeoIP", fp=<optimized out>, 
    pathname=pathname@entry=0x6f9e70 "/usr/lib64/python2.7/site-packages/GeoIP.so", type=<optimized out>, loader=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Python/import.c:1915
#5  0x00000031a46f30a1 in import_submodule (mod=mod@entry=None, subname=subname@entry=0x6f8e60 "GeoIP", fullname=fullname@entry=0x6f8e60 "GeoIP")
    at /usr/src/debug/Python-2.7.5/Python/import.c:2700
#6  0x00000031a46f32ed in load_next (mod=None, altmod=None, p_name=p_name@entry=0x7fffffffdae8, buf=buf@entry=0x6f8e60 "GeoIP", 
    p_buflen=p_buflen@entry=0x7fffffffdaf0) at /usr/src/debug/Python-2.7.5/Python/import.c:2515
#7  0x00000031a46f3cce in import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=None, globals=<optimized out>, name=0x0)
    at /usr/src/debug/Python-2.7.5/Python/import.c:2224
#8  PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=None, level=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Python/import.c:2288
#9  0x00000031a46da4cf in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
    at /usr/src/debug/Python-2.7.5/Python/bltinmodule.c:49
#10 0x00000031a464a0f3 in PyObject_Call (func=func@entry=<built-in function __import__>, 
    arg=arg@entry=('GeoIP', {'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, {...}, None), kw=<optimized out>) at /usr/src/debug/Python-2.7.5/Objects/abstract.c:2529
#11 0x00000031a46dc0e7 in PyEval_CallObjectWithKeywords (func=func@entry=<built-in function __import__>, 
    arg=arg@entry=('GeoIP', {'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, {...}, None), kw=kw@entry=0x0) at /usr/src/debug/Python-2.7.5/Python/ceval.c:3967
#12 0x00000031a46ddbb3 in PyEval_EvalFrameEx (f=f@entry=Frame 0x6d03d0, for file <stdin>, line 1, in <module> (), throwflag=throwflag@entry=0)
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:2407
#13 0x00000031a46e229d in PyEval_EvalCodeEx (co=co@entry=0x7ffff7f0de30, 
    globals=globals@entry={'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, 
    locals=locals@entry={'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, 
    args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, 
    closure=closure@entry=0x0) at /usr/src/debug/Python-2.7.5/Python/ceval.c:3330
#14 0x00000031a46e23a2 in PyEval_EvalCode (co=co@entry=0x7ffff7f0de30, 
    globals=globals@entry={'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, 
    locals=locals@entry={'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None})
    at /usr/src/debug/Python-2.7.5/Python/ceval.c:689
#15 0x00000031a46fb7ef in run_mod (mod=mod@entry=0x6f6eb0, filename=filename@entry=0x31a4742abf "<stdin>", 
    globals={'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, 
    locals={'__builtins__': <module at remote 0x7ffff7f8ab08>, '__name__': '__main__', '__doc__': None, '__package__': None}, 
    flags=flags@entry=0x7fffffffdf70, arena=arena@entry=0x69a910) at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:1373
#16 0x00000031a46fd8a0 in PyRun_InteractiveOneFlags (fp=fp@entry=0x318d1b9640 <_IO_2_1_stdin_>, filename=filename@entry=0x31a4742abf "<stdin>", 
    flags=flags@entry=0x7fffffffdf70) at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:860
#17 0x00000031a46fda8e in PyRun_InteractiveLoopFlags (fp=fp@entry=0x318d1b9640 <_IO_2_1_stdin_>, filename=filename@entry=0x31a4742abf "<stdin>", 
    flags=flags@entry=0x7fffffffdf70) at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:780
#18 0x00000031a46fe12e in PyRun_AnyFileExFlags (fp=fp@entry=0x318d1b9640 <_IO_2_1_stdin_>, filename=filename@entry=0x31a4742abf "<stdin>", 
    closeit=closeit@entry=0, flags=flags@entry=0x7fffffffdf70) at /usr/src/debug/Python-2.7.5/Python/pythonrun.c:749
#19 0x00000031a470ec4f in Py_Main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/Python-2.7.5/Modules/main.c:640
#20 0x000000318ce21d65 in __libc_start_main (main=0x4006f0 <main>, argc=1, argv=0x7fffffffe138, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe128) at libc-start.c:285
#21 0x0000000000400721 in _start ()


Expected results:
No crash ;)

Additional info:

Comment 1 Toshio Ernie Kuratomi 2013-11-10 16:31:43 UTC
Reproduced on rawhide-test.scrye.com  (x86_64).

A simple rebuild appears to fix the problem:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6162316

Comment 2 Fedora Update System 2013-11-10 17:20:06 UTC
python-GeoIP-1.2.8-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-GeoIP-1.2.8-3.fc20

Comment 4 Michele Baldessari 2013-11-10 17:31:08 UTC
Thanks guys, faster than light ;) I've added my karma to the update

Comment 5 Fedora Update System 2013-11-12 00:28:31 UTC
Package python-GeoIP-1.2.8-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-GeoIP-1.2.8-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21077/python-GeoIP-1.2.8-3.fc20
then log in and leave karma (feedback).

Comment 6 Christopher Meng 2013-11-17 04:33:18 UTC
Karma added.

I just added this package to upstream releases monitoring.

Please update to 1.2.9 again.

Thanks.

Comment 7 Fedora Update System 2013-11-18 02:54:16 UTC
python-GeoIP-1.2.8-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Matt Domsch 2013-11-18 13:21:26 UTC
Christopher - 1.2.9 was a change only to the pypi packaging for release on the pypi website, no code change that affects Fedora. Therefore I have not and do not plan to update to 1.2.9.