Ubuntu

Feisty, Python2.5, x86_64, help("modules") => Segfault

Reported by dr. gonzo on 2007-01-19
8
Affects Status Importance Assigned to Milestone
pyopengl (Ubuntu)
Undecided
Unassigned
python2.5 (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: python2.5

This is Feisty on x86_64.

Python 2.5 interpreter segfaults on help("modules") command.

Could be something critical.

Here is how to reproduce:
-----------------------------------
$ python
Python 2.5 (release25-maint, Jan 15 2007, 19:40:39)
[GCC 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules")

Please wait a moment while I gather a list of all available modules...

Segmentation fault
$

Emilio Pozuelo Monfort (pochu) wrote :

I haven't had a seg fault, but I have had this (arch x86):

>>> help("modules")

Please wait a moment while I gather a list of all available modules...

/usr/lib/python2.5/site-packages/apt/__init__.py:17: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
Data Dir: /usr/share/deskbar-applet
Handlers Dir: ['/home/emilio/.gnome2/deskbar-applet/handlers', '/usr/lib/deskbar-applet/handlers']
Data Dir: /usr/share/gnome-applets/invest-applet

And after that all the modules are normally displayed.

Regards
Pochu

skimitar (skimitar-gmail) wrote :

I can confirm in Feisty 32 bit as well.

Python 2.5 (release25-maint, Jan 15 2007, 20:25:01)
[GCC 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help()

Welcome to Python 2.5! This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help> modules

Please wait a moment while I gather a list of all available modules...

Segmentation fault (core dumped)

Kai Kasurinen (kai-kasurinen) wrote :

Thanks for your bug report. Please try to obtain a backtrace http://wiki.ubuntu.com/DebuggingProgramCrash and attach the file to the bug report. This will greatly help us in tracking down your problem.

Changed in python2.5:
status: Unconfirmed → Needs Info
dr. gonzo (drgonzo59) wrote :

After running Valgrind it seems that python-opengl package is to blame. Here is the Valgrind trace in question (the whole log is attached):
------------------------------------------------------
==7211== Process terminating with default action of signal 11 (SIGSEGV)
==7211== Access not within mapped region at address 0x8C8
==7211== at 0x1117b044: Togl_Init (in /usr/lib/python2.5/site-packages/OpenGL/Tk/linux2-tk8.4/Togl.so)
==7211== by 0x0ca54885: Tcl_LoadObjCmd (in /usr/lib/libtcl8.4.so.0)
  ...
-------------------------------------------------------

help("modules") perhaps tries to import all the modules and some of the module binaries are not behaving correctly...

After removing python-opengl (and python-qt3-gl and python-qt4-gl as dependencies) an error in the next 'misbehaving' package showed up:

-----------------------------------------------------------------------------------------
>>> help("modules")

Please wait a moment while I gather a list of all available modules...

terminate called after throwing an instance of 'Synopsis::Python::Object::TypeError'
  what(): a new-style class can't have only classic bases
Aborted
------------------------------------------------------------------------------------------

It seems that the individual python packages are to blame or the way python implements help('modules'). Either way this is not as critical as I thought.

Matthias Klose (doko) on 2007-01-24
Changed in pyopengl:
status: Unconfirmed → Confirmed
Matthias Klose (doko) wrote :

confirmed the help behaviour in python; please could you file separate bug reports (not just mark it as "Also Affects") for all modules, where you cannot get the help?

Changed in python2.5:
status: Needs Info → Confirmed
importance: Undecided → Low
Jon Wright (wright-esrf) wrote :

A fix for Fiesty 32-bit. Works for me. ymmv.

Obtain and build Togl, eg:
 $ cd
 $ wget http://downloads.sourceforge.net/togl/Togl-1.7.tar.gz?modtime=1136507319&big_mirror=0
 $ tar -zxf Togl-1.7.tar.gz
 $ cd Togl-1.7
 $ ./configure -with-tclconfig=/usr/lib/tcl8.4/tclConfig.sh --with-tkconfig=/usr/lib/tk8.4/tkConfig.sh

... you need a variety of "dev" packages for this to work (eg tcl/tk/gl etc). Goes without saying that the people reading this already installed stdio.h and forgot about having to do it? Guess that's one for another forum.

Then just replace:
 /usr/lib/python2.5/site-packages/OpenGL/Tk/linux2-tk8.4/Togl.so

with:
 ~/Togl-1.7/libTogl1.7.so

via:
 $ sudo cp ~/Togl-1.7/libTogl1.7.so /usr/lib/python2.5/site-packages/OpenGL/Tk/linux2-tk8.4/Togl.so

... and test it:
 $ python
 Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
 [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import OpenGL.Tk
 >>> print "Yay, no seg fault!!!"

Matthias Klose (doko) wrote :

fixed in gutsy

Changed in python2.5:
status: Confirmed → Fix Released
Changed in pyopengl:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments