Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186108 - dev-db/mysql-5.0.{38,42} segfault?
Summary: dev-db/mysql-5.0.{38,42} segfault?
Status: RESOLVED DUPLICATE of bug 207292
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-21 15:21 UTC by Sasch
Modified: 2008-11-14 05:23 UTC (History)
1 user (show)

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


Attachments
emerge output (dev-db:mysql-5.0.42:20070721-161229.log,907.88 KB, text/plain)
2007-07-21 16:28 UTC, Sasch
Details
again i hope its what you want, emerge output, but the backtrace is the same (dev-db:mysql-5.0.42:20070721-164802.log,915.32 KB, text/plain)
2007-07-21 17:10 UTC, Sasch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sasch 2007-07-21 15:21:38 UTC
when i try to install mysql-server on
gentoo 64 bit
kernel: 2.6.18-hardened-r6/grsec/pax
gcc 4.1.2
mysql-version: 5.0.42
or other try with mysql-version 5.0.38
i get this error
Jul 20 17:14:40 85 factorial[6744]: segfault at 0000000000021f31 rip 000000000040344e rsp 00007e3cafc8d8c0 error 4



Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 15:32:25 UTC
Post the actual emerge output where this happens, plus emerge --info.
Comment 2 Sasch 2007-07-21 15:49:37 UTC
maybe  a bit wrong formulated by me...
its not when i try to install,i can istall it... but when i try to start it i get this error, sry for that
i had all runnning on same system but only one difference, before there was running gcc-4.1.1 , now its gcc-4.1.2

System uname: 2.6.18-hardened-r6 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 19 Jul 2007 16:30:01 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 berkdb bitmap-fonts cgi cli cracklib crypt cups dri fastcgi fortran gdbm gpm iconv ipv6 isdnlog libg++ lighttpd lua midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl ppds pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts unicode xml xml2 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 15:56:44 UTC
Can you please attach some backtrace? 

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 4 Sasch 2007-07-21 16:28:01 UTC
Created attachment 125560 [details]
emerge output
Comment 5 Sasch 2007-07-21 16:29:04 UTC
(In reply to comment #4)
> Created an attachment (id=125560) [edit]
> emerge output

Starting program: /usr/sbin/mysqld
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 53257610572560 (LWP 10843)]
[New Thread 1082132800 (LWP 233)]
[New Thread 1090525504 (LWP 19322)]
[New Thread 1098918208 (LWP 8063)]
[New Thread 1107310912 (LWP 32297)]
[New Thread 1115703616 (LWP 3488)]
[New Thread 1124096320 (LWP 4187)]
[New Thread 1132489024 (LWP 19994)]
[Thread 1115703616 (LWP 3488) exited]
[New Thread 1140881728 (LWP 6052)]
[New Thread 1141147968 (LWP 15746)]

Program exited with code 01.
No stack.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 16:36:53 UTC
That's really not much useful :) You need to re-emerge mysql w/ debugging C[XX]FLAGS as described in the howto mentioned in comment #3.
Comment 7 Sasch 2007-07-21 17:10:51 UTC
Created attachment 125571 [details]
again i hope its what you want, emerge output, but the backtrace is the same

now its longer, hope its some you can take ,sry but i am not really involved in such things
Comment 8 Sasch 2007-07-21 17:17:51 UTC
(In reply to comment #7)
> Created an attachment (id=125571) [edit]
> again i hope its what you want, emerge output
> 
> now its longer, hope its some you can take ,sry but i am not really involved in
> such things
> 

(In reply to comment #7)
> Created an attachment (id=125571) [edit]
> again i hope its what you want, emerge output
> 
> now its longer, hope its some you can take ,sry but i am not really involved in
> such things

but if i run gdb the backtrace is the same


Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 17:21:33 UTC
Comment on attachment 125571 [details]
again i hope its what you want, emerge output, but the backtrace is the same

Well we really don't need emerge log for runtime bug, no need to attach that. I only requested it because you badly described the whole problem in comment #0
Comment 10 Sasch 2007-07-21 17:28:05 UTC
sry for that...
but if i do gdb /usr/sbin/mysqld
i only get this...
This GDB was configured as "x86_64-pc-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/sbin/mysqld
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 48465502831376 (LWP 11425)]
[New Thread 1082132800 (LWP 24781)]
[New Thread 1090525504 (LWP 32604)]
[New Thread 1098918208 (LWP 17733)]
[New Thread 1107310912 (LWP 1524)]
[New Thread 1115703616 (LWP 1576)]
[New Thread 1124096320 (LWP 14912)]
[New Thread 1132489024 (LWP 28287)]
[New Thread 1140881728 (LWP 15098)]
[Thread 1115703616 (LWP 1576) exited]
[New Thread 1141147968 (LWP 3679)]

Program exited with code 01.


the flags are changed to like it was described in faq at commnet3

Comment 11 Sasch 2007-07-21 18:33:48 UTC
(In reply to comment #10)
> sry for that...
> but if i do gdb /usr/sbin/mysqld
> i only get this...
> This GDB was configured as "x86_64-pc-linux-gnu"...
> (no debugging symbols found)
> Using host libthread_db library "/lib/libthread_db.so.1".
> (gdb) run
> Starting program: /usr/sbin/mysqld
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> [Thread debugging using libthread_db enabled]
> [New Thread 48465502831376 (LWP 11425)]
> [New Thread 1082132800 (LWP 24781)]
> [New Thread 1090525504 (LWP 32604)]
> [New Thread 1098918208 (LWP 17733)]
> [New Thread 1107310912 (LWP 1524)]
> [New Thread 1115703616 (LWP 1576)]
> [New Thread 1124096320 (LWP 14912)]
> [New Thread 1132489024 (LWP 28287)]
> [New Thread 1140881728 (LWP 15098)]
> [Thread 1115703616 (LWP 1576) exited]
> [New Thread 1141147968 (LWP 3679)]
> 
> Program exited with code 01.
> 
> 
> the flags are changed to like it was described in faq at commnet3
> 
i dont know but maybe this helps... sry for my nonkowledge


Starting program: /usr/sbin/mysqlmanager
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 55180551027840 (LWP 2141)]
070721 20:38:12 You are running mysqlmanager as root! This might introduce security problems. It is safer to use --user option istead.

070721 20:38:12 [WARNING] can't open password file /etc/mysqlmanager.passwd: errno=2, No such file or directory
070721 20:38:12 IM pid file: '/var/lib/mysql/mysqlmanager.pid'; PID: 2141.
[New Thread 1073822016 (LWP 16095)]
[New Thread 1073903936 (LWP 8302)]

Program received signal SIGUSR1, User defined signal 1.
[Switching to Thread 1073822016 (LWP 16095)]
0x0000322fb8159ff5 in _dl_lookup_symbol_x () from /lib64/ld-linux-x86-64.so.2

Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 19:39:47 UTC
Erm, are you really sure this comes from MySQL?!

Jul 20 17:14:40 85 factorial[6744]: segfault at 0000000000021f31 rip
000000000040344e rsp 00007e3cafc8d8c0 error 4
Comment 13 Sasch 2007-07-21 19:47:43 UTC
Jul 21 21:18:39 85 factorial[3143]: segfault at 0000000000021e01 rip 000000000040344e rsp 00007af477dc2e90 error 4
Jul 21 21:18:39 85 grsec: From xxxx: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:3143] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:27442] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[26963]: segfault at 0000000000021b01 rip 000000000040344e rsp 000079bee0f3e440 error 4
Jul 21 21:18:39 85 grsec: From xxxx: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:26963] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4600] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[17177]: segfault at 0000000000021e31 rip 000000000040344e rsp 00007564b4339220 error 4
Jul 21 21:18:39 85 grsec: From xxxxx: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:17177] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4705] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[22667]: segfault at 0000000000021651 rip 000000000040344e rsp 0000760ec371d650 error 4
Jul 21 21:18:39 85 grsec: : signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:22667] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:5089] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[27765]: segfault at 0000000000021b21 rip 000000000040344e rsp 00007f2e5fc13690 error 4
Jul 21 21:18:39 85 grsec: From 91.64.187.45: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:27765] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:14725] uid/euid:0/0 gid/egid:0/0
Comment 14 Sasch 2007-07-21 19:50:05 UTC
Jul 21 21:18:39 85 factorial[3143]: segfault at 0000000000021e01 rip 000000000040344e rsp 00007af477dc2e90 error 4
Jul 21 21:18:39 85 grsec: From xxxx: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:3143] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:27442] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[26963]: segfault at 0000000000021b01 rip 000000000040344e rsp 000079bee0f3e440 error 4
Jul 21 21:18:39 85 grsec: From xxxx: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:26963] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4600] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[17177]: segfault at 0000000000021e31 rip 000000000040344e rsp 00007564b4339220 error 4
Jul 21 21:18:39 85 grsec: From xxxxx: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:17177] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4705] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[22667]: segfault at 0000000000021651 rip 000000000040344e rsp 0000760ec371d650 error 4
Jul 21 21:18:39 85 grsec: : signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:22667] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:5089] uid/euid:0/0 gid/egid:0/0
Jul 21 21:18:39 85 factorial[27765]: segfault at 0000000000021b21 rip 000000000040344e rsp 00007f2e5fc13690 error 4
Jul 21 21:18:39 85 grsec: From 91.64.187.45: signal 11 sent to /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:27765] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:14725] uid/euid:0/0 gid/egid:0/0
(In reply to comment #13)
> Jul 21 21:18:39 85 factorial[3143]: segfault at 0000000000021e01 rip
> 000000000040344e rsp 00007af477dc2e90 error 4
> Jul 21 21:18:39 85 grsec: From xxxx: signal 11 sent to
> /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:3143]
> uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:27442] uid/euid:0/0 gid/egid:0/0
> Jul 21 21:18:39 85 factorial[26963]: segfault at 0000000000021b01 rip
> 000000000040344e rsp 000079bee0f3e440 error 4
> Jul 21 21:18:39 85 grsec: From xxxx: signal 11 sent to
> /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:26963]
> uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4600] uid/euid:0/0 gid/egid:0/0
> Jul 21 21:18:39 85 factorial[17177]: segfault at 0000000000021e31 rip
> 000000000040344e rsp 00007564b4339220 error 4
> Jul 21 21:18:39 85 grsec: From xxxxx: signal 11 sent to
> /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:17177]
> uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:4705] uid/euid:0/0 gid/egid:0/0
> Jul 21 21:18:39 85 factorial[22667]: segfault at 0000000000021651 rip
> 000000000040344e rsp 0000760ec371d650 error 4
> Jul 21 21:18:39 85 grsec: : signal 11 sent to
> /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:22667]
> uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:5089] uid/euid:0/0 gid/egid:0/0
> Jul 21 21:18:39 85 factorial[27765]: segfault at 0000000000021b21 rip
> 000000000040344e rsp 00007f2e5fc13690 error 4
> Jul 21 21:18:39 85 grsec: From 91.64.187.45: signal 11 sent to
> /var/tmp/portage/dev-db/mysql-5.0.42/work/mysql/dbug/factorial[factorial:27765]
> uid/euid:0/0 gid/egid:0/0, parent /bin/bash[sh:14725] uid/euid:0/0 gid/egid:0/0
> 

and i found this informations too
http://lkml.org/lkml/2005/11/23/508
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 20:00:53 UTC
NFC.
Comment 16 Sasch 2007-07-21 20:05:11 UTC
(In reply to comment #15)
> NFC.
> 

? i am wrong?
Comment 17 Sasch 2007-07-22 22:12:52 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > NFC.
> > 
> 
> ? i am wrong?
> 

after new try and compiling without perl and ssl it works without that error
all said... 
Comment 18 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-07-24 08:05:44 UTC
factorial is MEANT to crash.
It's part of the debugging suite that mysql uses, it purposefully does bad things that crash it, and then the segfault output is compared against known good segfault output (basically a testsuite for the segfault debug output).

Additionally, you CANNOT start mysqld as root. It checks for that, and exits as that is disallowed by upstream for security reasons.

If "/etc/init.d/mysql start" fails, add debugging in the conf.d/mysql file as recommended by the upstream documentation, and run the init script with RC_VERBOSE.
Comment 19 Sasch 2007-07-24 15:15:59 UTC
i didnt started it as root... the try with mysql-manager was only a try...
i installed it now with debug and maybe if you want i can give again the strace..
its a fact when is install it with ssl and berkdb the error comes again
Comment 20 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-11-14 05:23:30 UTC

*** This bug has been marked as a duplicate of bug 207292 ***