Bug 26783 - rpm segfaults when installing mysql rpm
rpm segfaults when installing mysql rpm
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-09 00:47 EST by Need Real Name
Modified: 2007-04-18 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-24 21:04:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
tarball of /var/lib/rpm to help isolate problem. (3.63 MB, application/octet-stream)
2001-02-24 19:49 EST, Need Real Name
no flags Details

  None (edit)
Description Need Real Name 2001-02-09 00:47:18 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.0-0.99.11 i686)


mysql-server rpm fails to install with a SIGSEGV.  postgresql-server fails
to startup.  "Initializing database.../etc/init.d/postgresql: line 60:
28268 Bus error               su -l postgres -c '/usr/bin/initdb
--pglib=/usr/lib/pgsql --pgdata=/var/lib/pgsql/data' </dev/null >/dev/null
2>&1".

rh7.1 insisted on installing apache, pump, sane (& co), sound tools &
raidtools. 
Also: talkd, telnetd, up2date, xisdnload were installed after deselecting
them explicitly.


Reproducible: Always
Steps to Reproduce:
1. For problem 1, try to install mysql-server.  (rpm -ivh fails)
2. For problem 2, try to startup postgresql.  (/etc/init.d/postgresql
start;  It fails.)
3. For 3, try to do a custom build without those packages - they show up
anyways.  The deps are satisfied for a "webserver" if you've already got
thttpd installed and you're doing an upgrade.
4. 'host somehost someserver' segfaults when you try to run it.
5. 'nslookup' followed by 'server blah' segfaults.
	

Actual Results:  Anything compiled with rh7.1 tools appears to fail
miserably.  Old 7.0 applications seem to run fine with the new libs.

Expected Results:  See above.

I'll be happy to provide any amount of information you need about any of
these issues.
Comment 1 Trond Eivind Glomsrxd 2001-02-09 15:40:24 EST
I can't reproduce the first problems... they worked just fine here. It sounds
like something is weird with your filesystem or memory (do you overclock?).

As for the second part of the question (installs deselected packages), I'm
reassigning. Please file separate bugs in the future, it makes tracking easier.
Comment 2 Trond Eivind Glomsrxd 2001-02-15 19:10:32 EST
The second issue should now be resolved.
Comment 3 Need Real Name 2001-02-24 19:38:22 EST
Sample run:

root@fafnir /home/dj > ls mysql-*.i386.rpm
mysql-3.23.33-1.i386.rpm        mysql-server-3.23.33-1.i386.rpm
mysql-devel-3.23.33-1.i386.rpm
root@fafnir /home/dj > rpm -Uvh mysql-*.i386.rpm
Preparing...                ########################################### [100%]
   1:mysql                  ########################################### [ 33%]
   2:mysql-devel            ########################################### [ 66%]
Segmentation fault
root@fafnir /home/dj > rpm -e mysql mysql-devel
error: cannot remove /usr/lib/mysql - directory not empty
root@fafnir /home/dj > gdb rpm
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(no debugging symbols found)...
(gdb) r -Uvh mysql-*.i386.rpm
Starting program: /bin/rpm -Uvh mysql-*.i386.rpm
warning: shared library handler failed to enable breakpoint
Preparing...                ########################################### [100%]
   1:mysql                  ########################################### [ 33%]
   2:mysql-devel            ########################################### [ 66%]

Program received signal SIGSEGV, Segmentation fault.
0x404a42da in ?? ()
(gdb) bt
#0  0x404a42da in ?? ()
#1  0x404a4cf4 in ?? ()
#2  0x4047f156 in ?? ()
#3  0x404aae9a in ?? ()
#4  0x4047f56e in ?? ()
#5  0x404802b1 in ?? ()
#6  0x404aae9a in ?? ()
#7  0x4048015c in ?? ()
#8  0x4046218f in ?? ()
#9  0x40462b16 in ?? ()
#10 0x40463abc in ?? ()
#11 0x40465567 in ?? ()
#12 0x404e0ab7 in ?? ()
#13 0x404e0c87 in ?? ()
#14 0x404dfe42 in ?? ()
#15 0x404d3721 in ?? ()
#16 0x404d38b3 in ?? ()
#17 0x404cd7f1 in ?? ()
#18 0x404ce52c in ?? ()
#19 0x404ce7ba in ?? ()
#20 0x404cf031 in ?? ()
#21 0x0812c702 in ?? ()
#22 0x0812c2d7 in ?? ()
#23 0x080efa2c in ?? ()
#24 0x0805c500 in ?? ()
#25 0x0805e1c2 in ?? ()
#26 0x08072c48 in ?? ()
#27 0x08069366 in ?? ()
#28 0x0804b38a in ?? ()
#29 0x081059b6 in ?? ()
(gdb) 

HTH,
 -dj
Comment 4 Need Real Name 2001-02-24 19:49:34 EST
Created attachment 11000 [details]
tarball of /var/lib/rpm to help isolate problem.
Comment 5 Need Real Name 2001-02-24 19:56:54 EST
Additional background information:  No overclocking here.  This is a p2-300 mhz
box that was originally a clean install of rh7.0.  Pls lmk if you need more
info.
Comment 6 Need Real Name 2001-02-24 20:19:27 EST
After some more investigations, if I first run: "useradd -M -o -r -d
/var/lib/mysql -s /bin/bash -c "MySQL Server" -u 27 -g mysql mysql " and then
'rpm -Uvh mysql-server*' it installs fine.

That segment of the spec file is not much different then the above command;
other then being exec'd from within rpm.

The rpm '%pre' actually leaves out '-g mysql'.

HTH, -dj
Comment 7 Need Real Name 2001-02-24 21:04:34 EST
After applying this patch, and rebuilding it installs perfectly:

==========
$ diff -u mysql.spec mysql.spec.patched 
--- mysql.spec	Tue Feb 13 12:56:59 2001
+++ mysql.spec.patched	Sat Feb 24 19:22:29 2001
@@ -1,6 +1,6 @@
 Name: mysql
 Version: 3.23.33
-Release: 1
+Release: 2dj
 Source0: http://www.mysql.com/Downloads/MySQL-3.23/mysql-%{version}.tar.bz2
 Source1: mysql.init
 Source2: mysql.logrotate
@@ -102,7 +102,7 @@
 
 %pre server
 /usr/sbin/useradd -M -o -r -d /var/lib/mysql -s /bin/bash \
-	-c "MySQL Server" -u 27 mysql > /dev/null 2>&1 || :
+	-c "MySQL Server" -u 27 -g mysql mysql > /dev/null 2>&1 || :
 
 %post
 /sbin/install-info %{_infodir}/mysql.info.gz %{_infodir}/dir
==========

HTH, -dj
Comment 8 Jeff Johnson 2001-02-25 12:01:06 EST
FIx is in packaging for now, segfault on failed %pre has been repaired in rpm
CVS as well.

Note You need to log in before you can comment on or make changes to this bug.