Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrace server makes tracebacks for python code unusable #216

Open
abadger opened this issue Nov 20, 2013 · 4 comments
Open

Retrace server makes tracebacks for python code unusable #216

abadger opened this issue Nov 20, 2013 · 4 comments

Comments

@abadger
Copy link

abadger commented Nov 20, 2013

This is what retrace server provides:

Truncated backtrace:
#1 <module> in setup.py:90
#2 <lambda> in /usr/lib/python2.7/site-packages/setuptools/sandbox.py:35
#3 run in /usr/lib/python2.7/site-packages/setuptools/sandbox.py:81
#4 run_setup in /usr/lib/python2.7/site-packages/setuptools/sandbox.py:33
#5 run_setup in /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py:1093
#6 build_and_install in /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py:1107
#7 install_eggs in /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py:827
#8 install_item in /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py:632
#9 easy_install in /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py:602
#10 run in /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py:358

This is the actual traceback from running the command:

# /usr/bin/easy_install -U pyobjc
Searching for pyobjc
Reading http://pypi.python.org/simple/pyobjc/
Best match: pyobjc 2.5.1
Downloading https://pypi.python.org/packages/source/p/pyobjc/pyobjc-2.5.1.tar.gz#md5=f242cff4a25ce397bb381c21a35db885
Processing pyobjc-2.5.1.tar.gz
Writing /tmp/easy_install-Tg8Zyu/pyobjc-2.5.1/setup.cfg
Running pyobjc-2.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Tg8Zyu/pyobjc-2.5.1/egg-dist-tmp-zti4aw
Traceback (most recent call last):
  File "/usr/bin/easy_install", line 9, in <module>
    load_entry_point('distribute==0.6.36', 'console_scripts', 'easy_install')()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1941, in main
    with_ei_usage(lambda:
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1922, in with_ei_usage
    return f()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1945, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 358, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 602, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 632, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 827, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1107, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1093, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 33, in run_setup
    lambda: execfile(
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 81, in run
    return func()
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 35, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 90, in <module>
ValueError: invalid literal for int() with base 10: ''

The full traceback quickly shows that this is not a bug in the package but in the script being downloaded and executed. The truncated traceback has no such information.

I thought we had earlier discussed disabling retrace for python packages because of its poor handling of tracebacks?

@sorki
Copy link
Contributor

sorki commented Nov 21, 2013

And what's the problem? You have bugzilla where you only see truncated backtrace?

@abadger
Copy link
Author

abadger commented Nov 21, 2013

Not just in bugzilla but also in retrace itself. https://retrace.fedoraproject.org/faf/reports/277660/

Before retrace server, abrt would generate bugs with python tracebacks that were useful in solving the problem (like the one that I generated when I ran easy_install myself.) The traceback information that retrace is holding onto is not nearly as rich.

If retrace could post the full tracebacks to the bug as before, that would be ideal. If it can't do that but could still hold onto the full traceback for when I visit the issue at the retrace url that would at least be a step up.

Without full tracebacks, bugs become much harder to diagnose.

@mmilata
Copy link
Contributor

mmilata commented Nov 21, 2013

The linked bugzilla has attachment backtrace containing the full traceback. We don't put it in the bug descritpion because it is often quite large.

@abadger
Copy link
Author

abadger commented Nov 21, 2013

Okay. That's good then. So if retrace does have access to the full backtrace, it would be great to get rid of the present backtrace and instead post a portion of the full backtrace. Maybe something like this:

Description of problem:
I am installing pyobjc using easy_install so I can use webkit2png (search it on Google)
How to produce:
- Open terminal
- Change to root permission using 'su'
- 'easy_install -U pyobjc'

Version-Release number of selected component:
python-setuptools-0.6.36-1.fc19

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python /usr/bin/easy_install -U pyobjc
dso_list:       python-libs-2.7.5-8.fc19.x86_64
executable:     /usr/bin/easy_install
kernel:         3.11.7-200.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace (full backtrace in attachment):
  File "/usr/bin/easy_install", line 9, in <module>
    load_entry_point('distribute==0.6.36', 'console_scripts', 'easy_install')()
[...]
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1093, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 33, in run_setup
    lambda: execfile(
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 81, in run
    return func()
  File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 35, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 90, in <module>
ValueError: invalid literal for int() with base 10: ''

That's the first and last five entries in the stack. It's much more helpful for finding out what's really going on than the present truncated backtrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants