Segmentation Fault when starting a Device Server in Python

Bug #1182873 reported by Vincent Michel
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pytango (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm encountering a segmentation fault every time I want to start a Device Server in Python.
Here is the test I performed :
> I got all the tango packages from synaptic
> I generated an empty Device Server 'Test.py' with POGO
> I started Jive and used the server wizard to register an instance 'test' of 'Test'
> I tried to start the device with the following line :

$ python Test.py test
Segmentation Fault (core dumped)

This is only happening for Python DS, everything works fine for C++ DS.
I am using UBUNTU 12.10 (3.5.0-27-generic, x86_64 GNU/Linux) but this bug has been observed on both 32 and 64 bits machines.
It has also been observed with tango8 (from debian experimental and from the source compilation).
I actually tried many different installation from different sources and versions but none seems to work for Python Device Server.
The only moment I saw a Python DS actually running on a Linux OS was when I used the Tango Box.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: libtango7 7.2.6+dfsg-14
ProcVersionSignature: Ubuntu 3.5.0-27.46-generic 3.5.7.7
Uname: Linux 3.5.0-27-generic x86_64
ApportVersion: 2.6.1-0ubuntu10
Architecture: amd64
Date: Wed May 22 14:45:55 2013
InstallationDate: Installed on 2013-03-19 (63 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: tango
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Vincent Michel (michel-vincent-externe) wrote :
Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

Hello, I created an empty device with pogo-6 (python is not supported by pogo). I attached the code of the device o this bug.

Here the result on my Debian unstable, tango8 + pytango8.

picca@mordor:~/tmp$ python Test.py test
Failed to import EventChannelFactory notifd/factory/mordor from the Tango database
In TestClass constructor
In tmp/test/test ::init_device()

so on Debian (not Ubuntu the device is working)

can you attach also the backtrace using gdb, for the record.

thanks

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :
Revision history for this message
Vincent Michel (michel-vincent-externe) wrote :

Hello,

I tried with the last week release of PyTango (8.03) and tango8 (8.0.5) and it worked perfectly !
I'm sorry I can't give you the backtrace, but I had to remove my previous versions of tango and PyTango to install the new ones.

Thanks for your availability,

Vincent

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

So you mean that to installed on your own the PyTango ans tango8.
So you did not install the not yet release packges.

That mean that Ubuntu package use different build flags that Debian and that these flags can render tango unusable.

I need more investigation .

Cheers

Fred

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

Sorry I meant you compiled by hand PyTango and tango8 right ?

Revision history for this message
Vincent Michel (michel-vincent-externe) wrote :

Exactly, I got both tango8 (on tango-controls.org) and PyTango 8.03 (on pypi.python.org/pypi/PyTango)‎ compiled by hand.
But it also worked on another machine using the tango8 packages on the experimental debian and the PyTango 8.03 compiled by hand.

But two weeks ago, I compiled this same version of tango8 and PyTango 8.02 (the previous one) and it didn't work.
So I suppose this problem has been corrected between the versions 8.03 and 8.02 of PyTango.

Let me know if you need further information.

Good luck with that !

Vincent

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

I just uploaded pytango 8.0.3 into Debian unstable :) so now we have

tango 8.0.5 and pytango 8.0.3

what's worried me is that I can not reproduce your problem on my Debian stable machine

tango 7.2.6 and pytango 7.2.3

can you confirm that you are affected by this problem with the tango version provided by Ubuntu (no ppa, no home made installation) ?

thanks

Fred

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

Ok I have access to a rarin machine 64 bits with

picca@ORD02068:~$ dpkg -l | grep tango
ii liblog4tango4 7.2.6+dfsg-14 amd64 logging for TANGO - shared library
ii liblog4tango4-dev 7.2.6+dfsg-14 amd64 logging for TANGO - development library
ii liblog4tango4-doc 7.2.6+dfsg-14 all logging for TANGO - documentation
ii libtango7 7.2.6+dfsg-14 amd64 TANGO distributed control system - shared library
ii libtango7-dbg 7.2.6+dfsg-14 amd64 TANGO distributed control system - debug library
ii libtango7-dev 7.2.6+dfsg-14 amd64 TANGO distributed control system - development library
ii libtango7-doc 7.2.6+dfsg-14 all TANGO distributed control system - documentation
ii python-pytango 7.2.3-2 amd64 API for the TANGO control system (documentation)
ii python-pytango-doc 7.2.3-2 all API for the TANGO control system
ii tango-common 7.2.6+dfsg-14 all TANGO distributed control system - common files

installed

and yes I have a segfault with a device

picca@ORD02068:~$ python FakeObx.py 1
Failed to narrow the EventChannelFactory - events will not be generated (hint: start the notifd daemon on this host)
In FakeObxClass constructor
Erreur de segmentation (core dumped)

but on my Debian machine I have
picca@ORD03037:~$ python FakeObx.py 1
Failed to import EventChannelFactory notifd/factory/ORD03037.synchrotron-soleil.fr from the Tango database
In FakeObxClass constructor
In boris/test/fakeobx.1 ::init_device()
In boris/test/fakeobx.2 ::init_device()
In boris/test/fakeobx.3 ::init_device()
In boris/test/fakeobx.4 ::init_device()

But now I have rarin amd64 Debian i386

Revision history for this message
Vincent Michel (michel-vincent-externe) wrote :

I think Sebastien Gara has observed the same bug on a fresh installed 32 bits Ubuntu, with the packages provided by Ubuntu. I will send him an email to make sure.

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

Ok, I downloaded python-pytango binary package from rarin i386 and installed it on my Debian wheezy... I do not have the crash.

so it would be nice to have the confirmation of the crash on ubuntu i386

thanks

Revision history for this message
Vincent Michel (michel-vincent-externe) wrote :

I just tried with a fresh installed Ubuntu 12.10 i386 on a virtual machine and I did observe the crash.

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

Ok, With the patch provided by tiago, it works :)

Revision history for this message
Picca Frederic-Emmanuel (picca-debian) wrote :

Now I do not know how to fix the current Ubuntu version ???

the next version rarin is not affected since it contain already the 8.0.3 version, but for the earliest ?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-fix-from-upstream-python-unsafe.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
affects: tango (Ubuntu) → pytango (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pytango (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.