Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100982 - baselayout-1.12.0-pre3-r2 reports error while loading mysql; tough mysql works fine
Summary: baselayout-1.12.0-pre3-r2 reports error while loading mysql; tough mysql work...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-08-01 04:36 UTC by Nicolas Schlumberger
Modified: 2005-08-08 04:29 UTC (History)
2 users (show)

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


Attachments
patch to initscript (initscrpt.patch,295 bytes, patch)
2005-08-01 06:40 UTC, Nicolas Schlumberger
Details | Diff
patch to initscript (initscrpt.patch,295 bytes, patch)
2005-08-01 06:40 UTC, Nicolas Schlumberger
Details | Diff
patch to /etc/init.d/mysql (initscript-2.patch,397 bytes, patch)
2005-08-01 07:42 UTC, Nicolas Schlumberger
Details | Diff
patch for /lib/rcscripts/sh/rc-daemon.sh (initscript-3.patch,305 bytes, patch)
2005-08-01 09:02 UTC, Nicolas Schlumberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Schlumberger 2005-08-01 04:36:13 UTC
I upgraded to baselayout-1.12.0_pre3-r2, and mysql would start during booting
time (i.e. I got [ !! ] instead of a [ ok ]). Trying to start manually mysql
gave the same results. Strangely the demon was running and I could access the
mysql db (I use it mainly for amarok, and I don't have to much experience with
it). The bug is anoying, nothing more....

Reproducible: Always
Steps to Reproduce:
1. upgrade to baselayout-1.12.0_pre3-r2
2.
3.

Actual Results:  
 * Starting mysqld (/etc/mysql/my.cnf) ...                          [ !! ]
and a running mysqld

Expected Results:  
 * Starting mysqld (/etc/mysql/my.cnf) ...                          [ ok ]


nicolasc@Kor ~ $ emerge info
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.11.12-nps1 i686)
=================================================================
System uname: 2.6.11.12-nps1 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.12.0_pre3
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -ftracer
-falign-functions=64"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c
/usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer -ftracer
-falign-functions=64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache distlocks sandbox sfperms strict userpriv
usersandbox"
GENTOO_MIRRORS="http://sunsite.cnlab-switch.ch/mirror/gentoo/ 
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acl acpi alsa arts avi berkdb bitmap-fonts cdr crypt cups
curl db dbus dga directfb divx4linux dvd emboss encode fam fame ffmpeg flac
foomaticdb fortran gdbm ggi gif gtk2 hal imagemagick imlib inifile ipv6 jack
java jpeg kde kdeenablefinal kerberos ldap libg++ libwww mad matroska mikmod
mime mmx motif mozsvg mp3 mpeg mysql ncurses nls nptl odbc offensive ogg
oggvorbis opengl pam pcmcia pdflib perl pic png pnp python qt quicktime readline
samba sdl snmp spell sse sse2 ssl svg svga tcpd tetex threads tiff truetype
truetype-fonts type1-fonts unicode usb vorbis win32codecs xine xml xml2 xmms xv
xvid zlib video_cards_radeon userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Nicolas Schlumberger 2005-08-01 04:43:15 UTC
I messed a with the mysql init-script, and got it running somehow. Fact is I
don't whether what I've done is correct and should be done that way.

/etc/init.d/mysql
...
start() {
        local retstatus=1
        local maxtry=5
        getconfig
        checkconfig || return 1
        ebegin "Starting mysqld (${MY_CNF})"
        start-stop-daemon --start --quiet --background \
                --exec "${basedir}/bin/mysqld_safe" \
                -- --defaults-file=${MY_CNF} >/dev/null 2>&1
        retstatus=$?
        while ! [[ -S "${socket}" || "${maxtry}" -lt "1" || "${retstatus}" -gt
"0" ]] ; do
                maxtry=$(($maxtry-1))
                echo -n "."
                sleep 1
        done
        ! [[ -S "${socket}" ]] && eerror "MySQL NOT started, proceding anyway"
        if [[ $retstatus < 5 ]]; then
                eend
        fi
}
...

Cheers
Nicolas

PS. I hope base-system@gentoo.org is the right place for the bug, please
reassign if not

Comment 2 Nicolas Schlumberger 2005-08-01 04:55:03 UTC
Sorry, I entered the wrong if-condidtion....

It should be 
if [[ $retstatus == 0 ]]; then
Or I have not really understood what I was doing....

Cheers
Nicolas
Comment 3 Nicolas Schlumberger 2005-08-01 05:00:15 UTC
Where do I have my mind?? I forgot to mention that I use mysql-4.0.25-r2

Nicolas
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-08-01 06:06:28 UTC
It would be better if you posted a patch to the init script
Comment 5 Nicolas Schlumberger 2005-08-01 06:40:44 UTC
Created attachment 64866 [details, diff]
patch to initscript

Patch as requested

It's my first one, so no garanties

Cheers
Nicolas

PS. Isn't anybody else experiencing this problem... I hoped for a comfirmation
Comment 6 Nicolas Schlumberger 2005-08-01 06:40:44 UTC
Created attachment 64867 [details, diff]
patch to initscript

Patch as requested

It's my first one, so no garanties

Cheers
Nicolas
Comment 7 SpanKY gentoo-dev 2005-08-01 07:01:25 UTC
Comment on attachment 64867 [details, diff]
patch to initscript

patch is wrong, find out why start-stop-daemon returned a non-0 value
Comment 8 Nicolas Schlumberger 2005-08-01 07:42:39 UTC
Created attachment 64868 [details, diff]
patch to /etc/init.d/mysql

retstatus=$? cannot get the new value in time. added sleep 1 before; script
works again

Cheers
Nicolas
Comment 9 SpanKY gentoo-dev 2005-08-01 07:48:42 UTC
Comment on attachment 64868 [details, diff]
patch to /etc/init.d/mysql

no, in this case you're setting retstatus to the result of the 'sleep' call

try removing the '--quiet' option from the start-stop-daemon call
Comment 10 Nicolas Schlumberger 2005-08-01 08:31:35 UTC
Thx for the fast reply... 
I removed --quiet, but the output didn't change. 
-------
Kor ~ # killall mysqld
Kor ~ # /etc/init.d/mysql restart
 * Starting mysqld (/etc/mysql/my.cnf) ...                     [ !! ]
Kor ~ # killall mysqld
Kor ~ # /etc/init.d/mysql start
 * Starting mysqld (/etc/mysql/my.cnf) ...                     [ !! ]
Kor ~ #
-------   
And for some reason, the $retstatus gets set to 1 - which means that there is an
error.

I ran the respective part directly from console and there it worked. Well, I
replaced all variables, and I know that those are set correctly!
# start-stop-daemon --start --background --exec "/usr/bin/mysqld_safe" --
--defaults-file=/etc/mysql/my.cnf >/dev/null 2>&1 && echo $?
0

I am getting a bit frustrated, 'cause I think that I am running in circles

Cheers
Nicolas
Comment 11 SpanKY gentoo-dev 2005-08-01 08:48:17 UTC
try adding -v to the start-stop-daemon command
Comment 12 Nicolas Schlumberger 2005-08-01 09:02:40 UTC
Created attachment 64877 [details, diff]
patch for /lib/rcscripts/sh/rc-daemon.sh

I searched the forums, and found this:
http://forums.gentoo.org/viewtopic-t-362461-highlight-baselayout+mysql.html

It mostly explains the problem, and how to solve it.

I created a patch for the specific file, which belong to baselayout
I hope that solves the problem

Cheers
Nicolas
Comment 13 Roy Marples (RETIRED) gentoo-dev 2005-08-01 09:50:49 UTC
Fixed in our svn repo
Comment 14 David Li 2005-08-02 12:04:52 UTC
Like you wanted... confirmed over here.

Err, btw, extremely off-topic, has anyone had urandom pause for about a minute
at boot?
Comment 15 Marek Kwasceki 2005-08-03 03:59:19 UTC
see #101123

does this solve netmounts too?
Comment 16 Roy Marples (RETIRED) gentoo-dev 2005-08-08 04:29:49 UTC
Fixed in baselayout-1.12.0_pre4