Insight shouldn't be built with --with-sysroot=/usr/share

Bug #110387 reported by Kip Warner
14
Affects Status Importance Assigned to Milestone
insight (Debian)
Fix Released
Unknown
insight (Ubuntu)
Fix Released
Medium
Unassigned
Declined for Edgy by Luca Falavigna
Dapper
Invalid
Medium
Unassigned
Feisty
Won't Fix
Medium
Unassigned
Gutsy
Won't Fix
Medium
Unassigned
Hardy
Won't Fix
Medium
Unassigned
Intrepid
Fix Released
Medium
Unassigned

Bug Description

SRU Details

Impact: Renders debugger unstable and unsuitable for use. Which, of course, means that finding other bugs is harder. Severe to all package users, minimal to normal users.

Development Branch: Fixed in Debian in the same way that is proposed for the SRUs, package merged from
Debian now.

Patches: attached, see comments.

TEST CASE:
1. Install insight (...)
2. Run Insight (I use "insight" in a terminal)
3. Click on "View" > "Console"
4. Type "show solib-absolute-prefix"
5. See error.

Regression Potential:
Minimal - changes are made in the way the package is built, which may cause other problems, but its unlikely. Only one line is changed in the build configuration.

More thorough test case:

$ sudo apt-get install wx2.8-examples
$ cd ~/Desktop
$ /usr/share/doc/wx2.8-examples/examples/unpack_examples.sh samples/minimal Temp
$ cp /usr/share/doc/wx2.8-examples/examples/samples/sample.xpm Test
$ make -C Test/minimal

Failure case:
====================================
$ insight --nw --quiet Test/minimal/minimal
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /home/kip/Desktop/Test/minimal/minimal
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Error while mapping shared library sections:
/usr/lib/libwx_gtk2u_core-2.8.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libwx_baseu-2.8.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libstdc++.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/tls/i686/cmov/libm.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/libgcc_s.so.1: No such file or directory.
...

Success case:
====================================
$ insight --nw --quiet Test/minimal/minimal
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /home/kip/Desktop/Test/minimal/minimal
[Thread debugging using libthread_db enabled]
[New Thread 0xb6e48720 (LWP 30966)]

(I'm not positive that the needed example is available on all versions)

================
Original Description:

Binary package hint: insight

Whenever I load a wxWidgets application and click run, I get a pop up message box that will not go away no matter how many times I hit ok:

"Cannot initialize thread debugging library: generic error"

After much probing around and help on the insight mailing list, it turns out that it was built wrong.

From people on the mailing list...

> > > > Looks to me like something in this build of Insight is setting the
> > > > shared library search prefix. I've had lots of bugs of people failing
> > > > to set it, but this may be the first time I've seen it set
> > > > unnecessarily... does "show solib-absolute-prefix" show anything
> > > > enlightening?

> > > (gdb) show solib-absolute-prefix
> > > Prefix for loading absolute shared library symbol files is "/usr/share".
> > >
> > > Any help?

> > When you (or whoever else) built that Insight, they must have passed
> > --with-sysroot=/usr/share. I can't guess why, but it's wrong. Try
> > again without that, or manually "set solib-absolute-prefix /."
> > (there's no way to set it to an empty string but that's close enough).

> It works now =)

Kip

Related branches

Revision history for this message
Johnathon (kirrus) wrote :

Hi, thanks for your report.

Can you please post the result of running 'uname -a' on your system, and tell me which version of Ubuntu you are running?

Changed in insight:
assignee: nobody → kirrus
status: Unconfirmed → Rejected
status: Rejected → Needs Info
Revision history for this message
Kip Warner (kip) wrote :

$ lsb_release -a
LSB Version: core-2.0-noarch:core-3.0-noarch:core-3.1-noarch:core-2.0-ia32:core-3.0-ia32:core-3.1-ia32:cxx-2.0-noarch:cxx-3.0-noarch:cxx-3.1-noarch:cxx-2.0-ia32:cxx-3.0-ia32:cxx-3.1-ia32:graphics-2.0-noarch:graphics-3.0-noarch:graphics-3.1-noarch:graphics-2.0-ia32:graphics-3.0-ia32:graphics-3.1-ia32:desktop-3.1-noarch:desktop-3.1-ia32
Distributor ID: Ubuntu
Description: Ubuntu 7.04
Release: 7.04
Codename: feisty

$ uname -a
Linux kip-laptop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

Kip

Revision history for this message
Johnathon (kirrus) wrote :

Nice, thanks. Confirming bug.

Changed in insight:
assignee: kirrus → nobody
status: Needs Info → Confirmed
Revision history for this message
Kip Warner (kip) wrote :

I've patched maintainer's script. Vide attached.

Kip

Revision history for this message
Kip Warner (kip) wrote :

Sorry, applied diff in reverse. Corrected version attached.

Kip

Revision history for this message
Johnathon (kirrus) wrote :

Thanks for the patch. I've subscribe Ubuntu-Universe-Sponsors: can someone check over the patch please?

Revision history for this message
Kip Warner (kip) wrote :

No problem.

Kip

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

+insight (6.6-2) unstable; urgency=high

This should be insight (6.6-1ubuntu1) hardy; urgency=low instead. (Urgency is irrelevant in Ubuntu.)

Revision history for this message
Siegfried Gevatter (rainct) wrote :

Unsubscribing ubuntu-universe-sponsors because of Daniel Holbach's comment; please resubscribe it once you uploaded a new debdiff. Thanks!

Revision history for this message
Claudius (schnoerr) wrote :

I saw, that it obviously has been fixed in Ubuntu-7.10.
Thank you!

Revision history for this message
Johnathon (kirrus) wrote :

Not quite fixed yet, waiting for Kip Warner to re-generate his debdiff with the requested change :)

Revision history for this message
Kip Warner (kip) wrote :

Sorry, I don't follow. What is wrong the previous patch I submitted?

https://bugs.launchpad.net/ubuntu/+source/insight/+bug/110387/comments/5

Kip

Revision history for this message
Johnathon (kirrus) wrote :

Hi Kip,

Nothing is wrong with the patch itself, just the tags and the version number is not formatted in the "Ubuntu" way. Instead of "+insight (6.6-2) unstable; urgency=high"
you need
"insight (6.6-1ubuntu1) hardy; urgency=low" (we don't use urgency, so its set to "low" for everything)

Kind Regards,

Johnathon

Revision history for this message
Kip Warner (kip) wrote :

How's this?

Revision history for this message
Johnathon (kirrus) wrote :

Unfortunately, we now need to SRU (Stable Release Update) the patch to get it included in Hardy... thanks for your help.. I'm sorry I didn't check back soon enough to process your patch to the right teams before the final freeze.

Can you please walk me through the process to replicate this error, including what programs I need to have installed?
(Random example of that I'm after:
Installed: insight, xchat
1. Open insight whilst xchat is running [applications > terminal > "insight"]
2. Attach to xcat process ["Run" > "Attach to process"]
etc )

We need to do this so that the SRU team can quickly and easily duplicate this bug on their machines.

Revision history for this message
Kip Warner (kip) wrote :

Sorry I took so long to reply. I didn't have access to my laptop for the last few weeks.

Just open Insight -> View -> Console.

Enter the following at the prompt: show solib-absolute-prefix

If you see this, you know it is prefixed wrong: The current system root is "/usr/share".

It should have been /. This can be fixed either by entering "set solib-absolute-prefix /." at runtime or by using my patch above.

Pretty easy to duplicate with that information.

Kip

Revision history for this message
Johnathon (kirrus) wrote :

Ok, SRU request made. Sorry its taken me a little while, my new job is keeping me busy and this is the first chance I've been able to get :)

To MOTU: please note the patch is not currently in the normal debdiff style, would you be able to either talk Kip through the nessasry changes (here please, not by linking to a wiki page), or make them yourself?

Thanks :)

description: updated
description: updated
Revision history for this message
Kip Warner (kip) wrote :

Thanks.

Kip

Revision history for this message
James Westby (james-w) wrote :

Hi,

It appears, from looking at the source package, that this bug is still present
in Intrepid, and so it should be fixed there first.

Kip, I would prefer it if we had a test case that showed a failure
as well, so that we can check that it works, as well as this variable
being set correctly. Could you give instructions for how to reproduce
this failure by running insight on a package in the archive?

Thanks,

James

Revision history for this message
Kip Warner (kip) wrote :
Revision history for this message
Johnathon (kirrus) wrote :

Hi Kip,

That sequence tells us the change, but doesn't show the full symptoms: James is asking for a test case which causes a crash or failure.

Hope that helps,

Johnathon

Revision history for this message
Kip Warner (kip) wrote :

There isn't any crash or anything like that. The package just is configured wrong. It compiles and runs fine as is, I am just saying it was configured wrong before building. I don't understand why one line that I've shown repeatedly what its problem with has taken this many months to fix. It's one line and I've given a fix as well.

Insight will just not be able to find debugging symbols for some applications that have them outside of where it's incorrect prefix was set.

Kip

Revision history for this message
Johnathon (kirrus) wrote :

Kip Warner wrote:
> There isn't any crash or anything like that. The package just is
> configured wrong. It compiles and runs fine as is, I am just saying it
> was configured wrong before building. I don't understand why one line
> that I've shown repeatedly what its problem with has taken this many
> months to fix. It's one line and I've given a fix as well.
>

We have a tonn of bugs in the system, some of them with patches, most of
them without. Triagers have only a limited amount of time, so some bugs
take longer to be fixed than others. :) (There are untouched bugs from
over a year ago in the tracker.)

> Insight will just not be able to find debugging symbols for some
> applications that have them outside of where it's incorrect prefix was
> set.

The testcase needs to show _this_ failing.

Revision history for this message
Kip Warner (kip) wrote : Re: Insight was accidentally built wrong

$ insight --nw
(gdb) show solib-absolute-prefix
The current system root is "/usr/share".

This testcase showed failure.

$ insight --nw
(gdb) show solib-absolute-prefix
The current system root is "/.".

This testcase showed success.

Kip

Revision history for this message
Johnathon (kirrus) wrote :

Hello,

That shows the root cause of the problem. It does not show a failure.

We need to see the program fail, as in, trying to debug something and not being able to because of this problem.

Best regards,

Johnathon

Revision history for this message
Kip Warner (kip) wrote :

$ sudo apt-get install wx2.8-examples
$ cd ~/Desktop
$ /usr/share/doc/wx2.8-examples/examples/unpack_examples.sh samples/minimal Temp
$ cp /usr/share/doc/wx2.8-examples/examples/samples/sample.xpm Test
$ make -C Test/minimal

Failure case:
====================================
$ insight --nw --quiet Test/minimal/minimal
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /home/kip/Desktop/Test/minimal/minimal
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Error while mapping shared library sections:
/usr/lib/libwx_gtk2u_core-2.8.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libwx_baseu-2.8.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libstdc++.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/tls/i686/cmov/libm.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/libgcc_s.so.1: No such file or directory.
...

Success case:
====================================
$ insight --nw --quiet Test/minimal/minimal
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /home/kip/Desktop/Test/minimal/minimal
[Thread debugging using libthread_db enabled]
[New Thread 0xb6e48720 (LWP 30966)]

Kip

Revision history for this message
James Westby (james-w) wrote :

Hi,

Thanks for the information. I started to prepare the necessary parts that
will be needed to fix this bug in each release, and then I hit another snag.

The SRU procedure states that the bug should be fixed in the development
release first. However, insight fails to compile in Intrepid, due to the
embedded copy of gdb having an unchecked "fgets" call (and possibly
other things), which fails with the now-default -D_FORTIFY_SOURCE=2 check.

It would be possible to fix this part of it, but it will be a chunk more work,
and I don't want to work on that right now. It would also be a lot easier
in many ways if insight didn't embed gdb, but I don't know how necessary
that is for insight.

What I will do in the meantime is look for a bug in the bts of gdb, and if there
isn't one then file a bug, as it may help a fix turn up quicker.

Thanks,

James

James Westby (james-w)
Changed in insight:
importance: Undecided → Medium
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Kip Warner (kip) wrote :

This is not an upstream issue, it's a package maintainer issue since the source was configured wrong at compile time.

Insight and GDB are intimately connected, and thus inseparable.

Kip

Changed in insight:
status: Unknown → New
Changed in insight:
status: New → Fix Released
Changed in insight:
status: Confirmed → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package insight - 6.7.1.dfsg.1-10ubuntu1

---------------
insight (6.7.1.dfsg.1-10ubuntu1) intrepid; urgency=low

  * Resync with Debian unstable (LP: #110387).
  * debian/patches/04_ubuntu_toolchain_FTBFS.dpatch:
    - Fix FTBFS with Ubuntu toolchain (LP: #239244).
  * debian/patches/04_ia64-array-bound.dpatch:
    - Fix FTBFS on ia64 port.

insight (6.7.1.dfsg.1-10) unstable; urgency=low

  * Bumped to Standards-Version: 3.8.0.
  * Fixed FTBFS on hppa - closes: #483296
  * Added libkvm-dev to Build-Deps for kFreeBSD - closes: #486245
  * Removed --with-sysroot in rules - closes: #485818

 -- Luca Falavigna <email address hidden> Mon, 04 Aug 2008 03:47:17 +0200

Changed in insight:
status: Confirmed → Fix Released
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

ACK from motu-sru.
Please check if other stable releases are affected and prepare debdiffs accordingly.

Changed in insight:
status: New → Confirmed
importance: Undecided → Medium
status: New → Confirmed
importance: Undecided → Medium
status: New → Confirmed
importance: Undecided → Medium
status: New → Confirmed
James Westby (james-w)
description: updated
description: updated
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

https://lists.ubuntu.com/archives/ubuntu-announce/2008-September/000113.html:
Feisty will reach EOL on Oct 19th, there is no time to fix it in time.

Changed in insight:
status: Confirmed → Won't Fix
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

I'm unable to reproduce this on other stable releases, marking Incomplete for now, waiting for better testing.

Changed in insight:
status: Confirmed → Incomplete
status: Confirmed → Incomplete
status: Confirmed → Incomplete
Revision history for this message
Johnathon (kirrus) wrote :

Hi Kip,

Are you able to reproduce this bug any more, or has the recent upgrades fixed it?

Revision history for this message
Kip Warner (kip) wrote :

I can confirm sysroot has been reset to default value.

Revision history for this message
Johnathon (kirrus) wrote :

Was that just in Intrepid, or in Hardy as well? :)

Revision history for this message
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Gutsy Gibbon 7.10 has reached its end of life -
http://www.ubuntu.com/news/ubuntu-7.10-eol . As a result, we are closing the
Gutsy task.

Changed in insight (Ubuntu Gutsy):
status: Incomplete → Won't Fix
Revision history for this message
JC Hulce (soaringsky) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The version of Ubuntu you're reporting this issue on is in End of Life status, and newer versions have fixed this issue. You can learn more about this at https://wiki.ubuntu.com/Releases

Changed in insight (Ubuntu Dapper):
status: Incomplete → Invalid
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in insight (Ubuntu Hardy):
status: Incomplete → 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.