Debian Bug report logs - #365245
strange crash when linked with nvidia GL libraries

version graph

Package: libstdc++6; Maintainer for libstdc++6 is Debian GCC Maintainers <debian-gcc@lists.debian.org>; Source for libstdc++6 is src:gcc-4.9.

Reported by: Joe Drew <drew@debian.org>

Date: Fri, 28 Apr 2006 18:33:01 UTC

Severity: normal

Tags: help, moreinfo

Merged with 364907

Found in version libstdc++6/4.1.0-1+b1

Blocking fix for 579937: python-libavg: crashes on a minimal example

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#365245; Package libstdc++6. Full text and rfc822 format available.

Acknowledgement sent to Joe Drew <drew@debian.org>:
New Bug report received and forwarded. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Joe Drew <drew@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: strange crash when linked with nvidia GL libraries
Date: Fri, 28 Apr 2006 14:22:19 -0400
Package: libstdc++6
Version: 4.1.0-1+b1
Severity: normal

I came across a strange bug which I'm utterly unable to reproduce on
anything but Debian unstable (including testing on Fedora Core 5).

Basically, I've worked out (through using valgrind and gdb) that calling
ifstream::read() causes a crash because an ios exception destructor calls
free() with an invalid pointer.  The crash only happens when a library that
links against nvidia''s GL libraries is dynamically loaded.  It also only
happens when the library links with the gcc 4.1 standard C++ library.

Below is a testcase.

--
// testmod.cpp
#include <python2.4/Python.h>
#include <iostream>
#include <fstream>
using namespace std;

static PyObject *
testmod_foo(PyObject * /*self*/, PyObject * /*args*/)
{
    ifstream file("/tmp");
    char buffer[5];
    file.read(buffer, 4);

    return Py_None;
}

static PyMethodDef TestmodMethods[] = {
    {"foo",  testmod_foo, METH_VARARGS, "crash."},
    {NULL, NULL, 0, NULL}
};

PyMODINIT_FUNC
inittestmod(void)
{
    Py_InitModule("testmod", TestmodMethods);
}

---

To run this, you need python2.3-dev and nvidia-glx-dev 1.0.8756 installed.
(I haven't actually verified that version 1.0.8756 is required, but this
crash doesn't happen if you're using a different GL driver, like ATI's or
mesa. It also doesn't happen if you don't link against the GL library.)

Run:
g++ -Wall -W -g -shared -o testmod.so -lGL testmod.cpp
echo -e "import testmod\\ntestmod.foo()" | python2.3

What should happen is a simple exit. What does happen:

$ echo -e "import testmod\\ntestmod.foo()" | python2.3
*** glibc detected *** free(): invalid pointer: 0xa7d7aa58 ***
Aborted

It's easy to work around in Debian: install libstdc++6-4.0-dbg, and then
set LD_LIBRARY_PATH to have /usr/lib/debug first. That libstdc++
library, which comes from gcc 4.0, doesn't exhibit the problem.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libstdc++6 depends on:
ii  gcc-4.1-base                4.1.0-1+b1   The GNU Compiler Collection (base 
ii  libc6                       2.3.6-7      GNU C Library: Shared libraries
ii  libgcc1                     1:4.1.0-1+b1 GCC support library

libstdc++6 recommends no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#365245; Package libstdc++6. Full text and rfc822 format available.

Acknowledgement sent to Martin Michlmayr <tbm@cyrius.com>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 365245@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: Joe Drew <drew@debian.org>
Cc: Debian Bug Tracking System <365245@bugs.debian.org>
Subject: Re: strange crash when linked with nvidia GL libraries
Date: Fri, 16 Jun 2006 18:00:06 +0200
* Joe Drew <drew@debian.org> [2006-04-28 14:22]:
> I came across a strange bug which I'm utterly unable to reproduce on
> anything but Debian unstable (including testing on Fedora Core 5).
> 
> Basically, I've worked out (through using valgrind and gdb) that calling
> ifstream::read() causes a crash because an ios exception destructor calls

Do you think that's the same as 364907?
-- 
Martin Michlmayr
http://www.cyrius.com/



Merged 364907 365245. Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#365245; Package libstdc++6. Full text and rfc822 format available.

Acknowledgement sent to IOhannes m zmoelnig <zmoelnig@iem.at>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #17 received at 365245@bugs.debian.org (full text, mbox):

From: IOhannes m zmoelnig <zmoelnig@iem.at>
To: 365245@bugs.debian.org, 364907@bugs.debian.org
Subject: Re: strange crash when linked with nvidia GL libraries
Date: Wed, 16 Aug 2006 13:29:05 +0200
the workaround as proposed by Joe Drew 
("LD_LIBRARY_PATH=/usr/lib/debug:${LD_LIBRARY_PATH}"), works for me to 
survive the crash reported in #364907.

so the 2 bug reports really seem to describe the same problem.
unfortunately that is still no "fix"....

mfg.asdr.
IOhannes



Added indication that bug 365245 blocks 579937 Request was from Torsten Werner <twerner@debian.org> to control@bugs.debian.org. (Sun, 02 May 2010 17:30:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#365245; Package libstdc++6. (Sun, 02 May 2010 22:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Torsten Werner <mail.twerner@googlemail.com>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Sun, 02 May 2010 22:00:03 GMT) Full text and rfc822 format available.

Message #24 received at 365245@bugs.debian.org (full text, mbox):

From: Torsten Werner <mail.twerner@googlemail.com>
To: Ulrich von Zadow <uzadow@libavg.de>, 579937-quiet@bugs.debian.org
Cc: Jakub Wilk <jwilk@debian.org>, 365245@bugs.debian.org
Subject: Re: Bug#579937: python-libavg: crashes on a minimal example
Date: Sun, 2 May 2010 23:57:16 +0200
Hi,

I'll upload libavg 1.0.1-1 soon and I have added a sentence about
  export LD_PRELOAD=/usr/lib/libstdc++.so.6
to README.Debian. But I do not have an idea how to really fix that bug.

Torsten




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#365245; Package libstdc++6. (Tue, 01 May 2012 11:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 01 May 2012 11:36:07 GMT) Full text and rfc822 format available.

Message #29 received at 365245@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 365245@bugs.debian.org, Joe Drew <drew@debian.org>
Subject: still an issue?
Date: Tue, 01 May 2012 13:33:05 +0200
tags 365245 + moreinfo help
thanks

is this still an issue?




Added tag(s) help and moreinfo. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Tue, 01 May 2012 11:36:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#365245; Package libstdc++6. (Mon, 19 Nov 2012 23:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich von Zadow <uzadow@libavg.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Mon, 19 Nov 2012 23:54:03 GMT) Full text and rfc822 format available.

Message #36 received at 365245@bugs.debian.org (full text, mbox):

From: Ulrich von Zadow <uzadow@libavg.de>
To: 365245@bugs.debian.org
Subject: Fixed
Date: Tue, 20 Nov 2012 00:06:17 +0100
This is the same bug as https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/259219. The Ubuntu bug has been fixed, and I believe the fix has been ported to Debian as well. Unfortunately, I got completely lost in the bug tracker trying to verify this.

--
Any technology distinguishable from magic is insufficiently advanced.

Ulrich von Zadow | +49-172-7872715
Jabber: coder@c-base.org
Skype: uzadow






Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 17:12:50 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.