Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230243 - dev-db/unixODBC-2.2.12 causes segfault
Summary: dev-db/unixODBC-2.2.12 causes segfault
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
URL: http://article.gmane.org/gmane.linux....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-30 19:43 UTC by michael higgins
Modified: 2010-03-22 15:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael higgins 2008-06-30 19:43:50 UTC
Trying to upgrade to ver. 2.2.12. DBD-ODBC cannot use. Segfault. Tried on two different machines... same issue. Rolling back to 11-r1 compile fails unless export SED=sed ; emerge -av =dev-db/unixODBC-2.2.11-r1



Reproducible: Always

Steps to Reproduce:
1. Install version 2.2.12
2. update DBD-ODBC
3. try to use it

Actual Results:  
Segmentation fault

Expected Results:  
Query results, authentication even?

none, really. Only solution is to mask 2.2.12, I think. Something in the toolchain is causing error to compile 2.2.11-r1 worked around like this:
export SED=sed ; emerge -av =dev-db/unixODBC-2.2.11-r1
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-06-30 20:20:37 UTC
Please attach your `emerge --info', and maybe a gdb backtrace. Please open a NEW BUG for the issue with downgrading to =dev-db/unixODBC-2.2.11-r1.
Comment 2 michael higgins 2008-07-01 00:07:02 UTC
OK. Emerging gdb on this machine, though I did post a backtrace at the link. This is the second machine that I've had this problem with. Unfortunately, QA Notice sez don't tell Gentoo about it. I just don't understand why it is marked stable. It doesn't seem to have been tested much. Then again, it could be DBD-ODBC, which doesn't even have an ebuild. This is where the segfault happens:
no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7e006c0 (LWP 26511)]
0xb7ce260b in ?? () from /usr/lib/libtdsodbc.so
(gdb) bt all 
No symbol table is loaded.  Use the "file" command.
(gdb) bt
#0  0xb7ce260b in ?? () from /usr/lib/libtdsodbc.so

Portage 2.1.4.4 (default/linux/x86/2008.0/desktop, gcc-4.2.4, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: 2.6.24-gentoo-r8 i686 Intel(R) Pentium(R) M processor 1.60GHz
Timestamp of tree: Sun, 29 Jun 2008 19:33:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.3.5, 1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirror.espri.arizona.edu/gentoo/ ftp://ftp.wallawalla.edu/pub/mirrors/ftp.gentoo.org "
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/perl-experimental /usr/portage/local/layman/sunrise /usr/portage/local/layman/mykhyggz"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apm berkdb bitmap-fonts bluetooth branding bzip2 cairo cdr cli cpudetection cracklib crypt cups dbus dell dri dvd dvdr dvdread eds emboss encode esd evo exif expat fam firefox fontconfig fortran gdbm gif gnome gpm gstreamer gtk hal iconv icu imap isdnlog jack jack-tmpfs jpeg kerberos laptop lcms libnotify libsamplerate mad mailwrapper midi mikmod mmx mono mp3 mpeg mssql mudflap ncurses netjack nls nptl nptlonly nsplugin odbc ogg opengl openmp pam pcre pdf perl png ppds pppd pyste python qt3support quicktime readline reflection rtc sdl session spell spl sse sse2 ssl startup-notification svg tcpd tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vim-syntax vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="intel8x0 usb-usx2y" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user cache deflate dir disk_cache env file_cache filter headers include mem_cache mime mime_magic negotiation rewrite setenvif status vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810 radeon fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Anyway, it is way beyond me to actually try to debug this problem I'll file another bug report for the build issue on unixodbc-2.2.11-r1 
Comment 3 Ryan Bebeau 2008-08-04 17:15:13 UTC
We got bit by this bug today as well.  It seems to be an issue similar to the one mentioned on this page:

http://www.easysoft.com/support/kb/kb00664.html

Adding PERL_DL_NONLAZY=1 to your environment seems to make everything work ok.



Comment 4 Manfred Knick 2009-04-14 12:38:56 UTC
Please compare Bug 266105.
Comment 5 michael higgins 2009-06-23 02:14:06 UTC
(In reply to comment #3)
> We got bit by this bug today as well.  It seems to be an issue similar to the
> one mentioned on this page:
> 
> http://www.easysoft.com/support/kb/kb00664.html
> 
> Adding PERL_DL_NONLAZY=1 to your environment seems to make everything work ok.
> 

Actually, this doesn't work in all cases, I've found. What I've managed is adding /usr/lib/libtdsodbc.so to /etc/ld.so.preload and that seems to be the trick. Using FreeTDS, anyway...
Comment 6 michael higgins 2009-06-26 23:41:09 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > We got bit by this bug today as well.  It seems to be an issue similar to the
> > one mentioned on this page:
> > 
> > http://www.easysoft.com/support/kb/kb00664.html
> > 
> > Adding PERL_DL_NONLAZY=1 to your environment seems to make everything work ok.
> > 
> 
> Actually, this doesn't work in all cases, I've found. What I've managed is
> adding /usr/lib/libtdsodbc.so to /etc/ld.so.preload and that seems to be the
> trick. Using FreeTDS, anyway...
> 

And finally, I"ve done all I can. With some way to disable LT_GROUP in the build, this hack isn't needed. Problem is, the gentoo ebuilds link to system libs, where the file that defines this doesn't have the same code as the one their code ships with.

Anyway, with a vanilla build, using the shipped (what is this, libtool?), there's no segfault as I have a (suggested) patch to disable LT_GROUP in libltdl/ltdl.c. But yeah, that's in their libraries that come with their tarball. I think the same file, in the system library, does it wholly differently. This is totally a problem for unixODBC ebuilds.

Hmm. I just came across this tidbit, in their bundled ltdl.c file in the latest:

/*
 * This needed fixing for any number of reasons, including Perl DBD::ODBC
 */

I give up. Are they shipping their own libraries rather than update their build system to use the latest libtool... or *something* funky like that? Can this be handled properly in Gentoo ebuilds, or not?
Comment 7 michael higgins 2009-06-30 16:28:38 UTC
> Can this be
> handled properly in Gentoo ebuilds, or not?
> 
http://cvs.fedoraproject.org/viewvc/rpms/unixODBC/F-10/nortldglobal.patch?view=markup&pathrev=unixODBC-2_2_11-3

So there's some backup to further describe the problem and the fix.

Now, this was assigned to PHP... WHY? WTF does this have to do with PHP? Since it has NOTHING TO DO WITH PHP, can you folks fix that first and reassign to someone who *might* give a flying @#$%^*( about fixing it? 

Maybe the perl folks, since this has everything to do with perl DBD::ODBC and segfaults? Or, just any developer, since all the work describing the problem and the fix is done for you now, it just remains for someone to do it?

(Also, note the problem is still in the latest release, so all this yet applies.)
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-06-30 21:38:07 UTC
It's NOT mis-assigned.
# cat /usr/portage/dev-db/unixODBC/metadata.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
	<herd>php</herd>
</pkgmetadata>

This dates back to when PHP was the only thing in the tree that used unixODBC.
If there's another developer that wants it, I'm sure PHP would be happy to be rid of it.

I left comments re the ltdl issues on bug 249617, you can see them there.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2010-03-22 15:03:43 UTC
Please try unixODBC-2.2.14.