ccontrol SEGVs on startup

Bug #109157 reported by David Gibson
6
Affects Status Importance Assigned to Milestone
ccontrol (Ubuntu)
Fix Released
Medium
Scott Kitterman
Feisty
Won't Fix
Undecided
Unassigned
Gutsy
Fix Released
Medium
Scott Kitterman

Bug Description

Binary package hint: ccontrol

In Feisty, ccontrol as built from the current ccontrol package gets a Segmentation Fault immediately after exec(), before executing any other system calls.

This appears to be because Feisty has made gcc implement stack protection by default, which is incompatible with dietlibc, used by ccontrol. Either ccontrol needs to be built with -fno-stack-protector (after which it works), or dietlibc needs to be updated so that it copes with the gcc stack protector logic.

Revision history for this message
Ted Percival (tedp) wrote :

According to the following thread it probably just needs to be rebuilt with the current version of dietlibc.

http://osdir.com/ml/linux.lib.dietlibc/2006-10/msg00002.html

Revision history for this message
Ted Percival (tedp) wrote :

Pulling in the -3 version from Debian has been requested in bug 130845 -- that should fix the problem.
I'd appreciate it if somebody could test it once that is done as I don't have any Ubuntu machines at the moment.

Revision history for this message
Ted Percival (tedp) wrote :

ccontrol *-3 has been synced from Debian, so it should work now.
Thanks for reporting this.

Changed in ccontrol:
status: New → Fix Released
Revision history for this message
David Gibson (dwg) wrote :

No dice, I'm afraid.

mulberryst:~$ ccontrol
Segmentation fault (core dumped)

Revision history for this message
David Gibson (dwg) wrote :

Oh, that's with:

mulberryst:~$ dpkg -p ccontrol
Package: ccontrol
Priority: optional
Section: devel
Installed-Size: 144
Maintainer: Ubuntu MOTU Developers <email address hidden>
Architecture: i386
Version: 0.9.1+20060806-3
Depends: python, gcc, make, binutils, ccache
Suggests: distcc
Size: 33170
Description: Compilation controller
 The ccontrol program takes over the roles of the compiler, linker and
 make, and reads a configuration file to decide what to do before
 invoking them. This is particularly useful for centralized control over
 commands and options, such as enabling distcc and ccache. It is also
 great for controlling parallelism and which compiler versions to use,
 based on the directory and make targets.
 .
  Homepage: http://ccontrol.ozlabs.org/
Original-Maintainer: Ted Percival <email address hidden>
Python-Version: current

Ted Percival (tedp)
Changed in ccontrol:
status: Fix Released → New
Revision history for this message
Ted Percival (tedp) wrote :

It looks like adding -fno-stack-protector to the CFLAGS in debian/rules would fix it. Would you be willing to try that and let me know? If that solves it, I'll add that option and upload a new version.

Revision history for this message
David Gibson (dwg) wrote :

Yes, I've been using a custom build with -fno-strack-protector for some time.

I just retested on the latest source package and it still appears to work (although I quickly found an unrelated bug in ccontrol-init).

Revision history for this message
Ted Percival (tedp) wrote :

I installed a gutsy chroot and tested it there in the end.
I'll wait for the ccontrol-init bug report if you like.

Changed in ccontrol:
assignee: nobody → tedp
status: New → Fix Committed
Revision history for this message
David Gibson (dwg) wrote :

The version with -fno-stack-protectore doesn't seem to have showed up in the gutsy archive yet. Any ETA on that?

Revision history for this message
Ted Percival (tedp) wrote :

I'll upload that in a few days.

Revision history for this message
Ted Percival (tedp) wrote : New package delay

Sorry for the delay. It looks like mentors.debian.net is not processing my upload right now. I haven't forgotten this bug. I will get a fixed package uploaded as soon as possible.

I also looked at the relative dates of dietlibc releases and the message about dietlibc adding support for stack protection:
  2006-06-21: dietlibc 0.30 release
  2006-10-14: support for -fstack-protector added to dietlibc
  2007-08-24: dietlibc 0.31 release

I'll keep stack protection disabled. That will make potential backporting easier and I don't think stack smashing protection is particularly important for ccontrol.

Revision history for this message
David Gibson (dwg) wrote :

Ok. It would be good to backport the fix to Feisty at least, which also has this bug.

Revision history for this message
Ted Percival (tedp) wrote :

Here is the source package I will be uploading to Debian if anyone wants to pull it in before then: http://lazypants.org/~ted/debian/pool/main/c/ccontrol/ccontrol_0.9.1+20060806-4.dsc

Revision history for this message
Ted Percival (tedp) wrote : Package for gutsy

New source package for gutsy. Identical to the -4 version but marked "-3ubuntu1" at the suggestion of ScottK from IRC.
http://lazypants.org/~ted/ubuntu/pool/universe/c/ccontrol/ccontrol_0.9.1+20060806-3ubuntu1.dsc

Changes:
  * Force-disable GCC stack protection as it is incompatible with the
    current dietlibc (Ubuntu #109157).
  * Don't ignore errors in $(MAKE) distclean.

The interdiff since the -3 package contains those changes and the reversion of some guff against the orig.tar.gz that should never have been there (perhaps not in the orig.tar.gz either). It's very short.

Revision history for this message
Ted Percival (tedp) wrote :
Revision history for this message
Ted Percival (tedp) wrote :
Revision history for this message
Ted Percival (tedp) wrote :
Revision history for this message
Ted Percival (tedp) wrote :

Finally, a debdiff for gutsy with the minimum amount of changes. This is perhaps the "best" one, equivalent to the previous attachment (for feisty).

Revision history for this message
David Gibson (dwg) wrote :

Diffs are all very well, but is there any ETA on actually getting the fixed package into the repository?

Revision history for this message
Daniel Holbach (dholbach) wrote :

We can't upload to feisty. Uploads are always done for the current development release. Uploads into stable releases have to follow http://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
David Gibson (dwg) wrote :

Yes, I'm running gutsy, no upload here either.

Changed in ccontrol:
assignee: tedp → kitterman
importance: Undecided → Medium
status: Fix Committed → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote :

Uploaded. I did have to change the maintainer as dholbach mentioned above and correct the bug closing syntax (LP: not (Ubuntu:. Please verify that this solves the problem in Gutsy, update the feisty debdiff for the changes I had to make to the Gutsy debdiff and then resubscribe UUS.

Revision history for this message
Scott Kitterman (kitterman) wrote :

ccontrol (0.9.1+20060806-3ubuntu1) gutsy; urgency=high

  [ Ted Percival ]
  * Force-disable GCC stack protection as it is incompatible with the
    current dietlibc (LP: #109157).

  [ Scott Kitterman ]
  * Change maintainer to MOTU

 -- Scott Kitterman <email address hidden> Mon, 10 Sep 2007 00:51:23 -0400

Changed in ccontrol:
status: In Progress → Fix Released
Revision history for this message
LumpyCustard (orangelumpycustard) wrote :

Please close for Feisty as Won't Fix? This goes for all the other Feisty bugs.

Revision history for this message
Hew (hew) wrote :

Ubuntu Feisty Fawn is no longer supported, so a SRU will not be issued for this release. Marking Feisty as Won't Fix.

Changed in ccontrol:
status: New → Won't Fix
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.