Bug 123957 - cyrus master process fails and tries to start constantly, see #91933 too
cyrus master process fails and tries to start constantly, see #91933 too
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: cyrus-imapd (Show other bugs)
2
i586 Linux
medium Severity high
: ---
: ---
Assigned To: Petr Rockai
:
Depends On:
Blocks: FC3Target FC4Target
  Show dependency treegraph
 
Reported: 2004-05-21 20:31 EDT by Alexander Dalloz
Modified: 2008-08-02 19:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-25 16:25:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
DB 4 NPTL requirements (1.98 KB, text/plain)
2004-09-17 16:06 EDT, John Dennis
no flags Details

  None (edit)
Description Alexander Dalloz 2004-05-21 20:31:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.4.1)
Gecko/20031114

Description of problem:
Starting Cyrus-IMAPd with "service cyrus-imapd start" shows ok, but
the cyrus master process is failing. It constantly tries to start and
fails, causing write to the /var/log/maillog with following content:

May 22 01:38:45 Thor master[4735]: about to exec
/usr/lib/cyrus-imapd/lmtpd
May 22 01:38:45 Thor lmtpunix[4735]: DBERROR db4: Berkeley DB library
configured to support only DB_PRIVATE environments
May 22 01:38:45 Thor lmtpunix[4735]: DBERROR: dbenv->open
'/var/lib/imap/db' failed: Invalid argument
May 22 01:38:45 Thor lmtpunix[4735]: DBERROR: init() on berkeley
May 22 01:38:46 Thor lmtpunix[4735]: executed
May 22 01:38:46 Thor lmtpunix[4735]: DBERROR db4: environment not yet
opened
May 22 01:38:46 Thor lmtpunix[4735]: DBERROR: opening
/var/lib/imap/deliver.db: Invalid argument
May 22 01:38:46 Thor lmtpunix[4735]: DBERROR: opening
/var/lib/imap/deliver.db: cyrusdb error
May 22 01:38:46 Thor lmtpunix[4735]: FATAL: lmtpd: unable to init
duplicate delivery database
May 22 01:38:46 Thor master[3993]: process 4735 exited, status 75
May 22 01:38:46 Thor master[3993]: service lmtpunix pid 4735 in READY
state: terminated abnormally


Version-Release number of selected component (if applicable):
cyrus-imapd-2.2.3-11

How reproducible:
Always

Steps to Reproduce:
1. install cyrus-imapd
2. service cyrus-imapd start
    

Actual Results:  Cyrus-IMAPd tries to start but fails and the maillog
fills.

Expected Results:  Cyrus-IMAPd master process should start and run
offering lpmtp.

Additional info:

This bug is releated to open bugzilla #91933,
is cause by NPTL for DB.
Comment 1 Robert Scheck 2004-05-22 09:40:27 EDT
I built a cyrus-imapd with a bundled unthreaded db4 for Alexander.
My cyrus-imapd package seems to solve his problems at current - so 
his cyrus-imapd is up and running ;-)

Below is what I did exactly, but: A bundled unthreaded db4 is NO
CLEAN SOLUTION, as you did it already in cyrus-sasl, pam, openldap
and others!!

--- cyrus-imapd.spec       2004-05-09 16:44:10.000000000 +0200
+++ cyrus-imapd.spec.rsc   2004-05-22 15:27:44.000000000 +0200
@@ -1,6 +1,8 @@
+%define db_version 4.2.52
+
 Name:                  cyrus-imapd
 Version:               2.2.3
-Release:               11
+Release:               12

 # ********************** BUILD TIME OPTIONS START **********************

@@ -99,6 +101,7 @@
 Source29:              %{name}-sendmail-8.12.9-cyrusv2.m4
 Source30:              %{name}-README.contrib
 Source31:              %{name}-db.cfg
+Source32:              http://www.sleepycat.com/download/snapshot/db-%{db_version}.tar.gz
 Patch0:                        %{name}-2.0.5-mandir.patch
 Patch1:                        %{name}-2.0.9-cflags.patch
 Patch2:                        %{name}-2.0.12-deliverman.patch
@@ -118,7 +121,7 @@
 Patch101:              %{name}-2.2.3-cflag.patch
 BuildRoot:             %{_tmppath}/%{name}-%{version}-root
 Prereq:                        e2fsprogs, diffutils, /sbin/chkconfig, /sbin/service
-Requires:              cyrus-sasl >= 2.1.15
+Requires:              cyrus-sasl >= 2.1.15, %{_dbver}-${db_version}
 BuildPrereq:           cyrus-sasl-devel >= 2.1.15-1, perl, tcp_wrappers, %{_dbver}-devel, openssl-devel
 BuildPrereq:           flex, bison, groff >= 1.15-8, %{__autoconf}, file >= 3.35-1
 Obsoletes:             imap
@@ -206,7 +209,7 @@
 one running the server.

 %prep
-%setup -q
+%setup -q -a 32
 %patch0 -p1 -b .mandir
 %patch1 -p1 -b .cflags
 %patch2 -p1 -b .deliverman
@@ -239,6 +242,18 @@
 set -x

 %build
+# Bundling copy of Berkeley DB, for sasldb support.
+topdir=`pwd`
+pushd db-%{db_version}/build_unix
+../dist/configure \
+        --with-mutex=UNIX/fcntl --disable-shared --enable-static --with-pic \
+        --prefix=${topdir}/db-instroot \
+        --includedir=${topdir}/db-instroot/include \
+        --libdir=${topdir}/db-instroot/lib
+make
+make install
+popd
+
 # kerberos include is needed (because of openssl-0.9.7 ?)
 CPPFLAGS="-I%{_includedir}/et -I%{_prefix}/kerberos/include"
 export CPPFLAGS
@@ -276,7 +291,8 @@
   --with-cyrus-prefix=%{_cyrexecdir} \
   --with-service-path=%{_cyrexecdir} \
   --with-auth=unix \
-  --with-bdb-incdir=%{_includedir}/%{_dbver} \
+  --with-bdb-incdir=${topdir}/db-instroot/include \
+  --with-bdb-libdir=${topdir}/db-instroot/lib \
   --with-extraident="Red Hat %{version}-%{release}" \
   --with-syslogfacility=%{SYSLOGFACILITY} \
   --with-libd=%{_lib}
@@ -709,6 +725,9 @@
 %{_mandir}/man1/*

 %changelog
+* Sat May 22 2004 Robert Scheck <redhat@linuxnetz.de> 2.2.3-12
+- use a bundled libdb (#123957)
+
 * Sun May 09 2004 Karsten Hopp <karsten@redhat.de> 2.2.3-11
 - don't enable cyrus-imapd per default (#122615)
Comment 2 kevin simpson 2004-05-27 05:21:16 EDT
cyrus-imapd-2.2.3-11 / FC2 i386 bugs up as mentioned above when run on
old amd systems, k6-2 450 cpus, seems fine on more modern athlon 1333.
I tried custom kernels, no effect. DB4 seems to be related to problem.
Got logs virtually identical to above.
Comment 3 Robert Scheck 2004-06-09 12:48:26 EDT
Juuhuuu...earth to headquarter Red Hat, Inc....can someone read me?

Is this bug also ignored as many other NPTL related bugs, issues and 
problems...hopefully not (Nalin knows what I'm talking about)?!
Comment 4 John Dennis 2004-09-17 16:05:01 EDT
By any chance are you running with a non Red Hat kernel or a Red Hat
kernel earlier than 2.4.20? or non Red Hat glibc? The version of
cyrus-imapd in FC2 links against Red Hat's db4 which has
co-dependencies on the kernel, the loader, and glibc all of which
should be self consistent in FC2. I'm wondering if you've permuted any
of those components.

I've attached a README that explains the NPTL requirements in DB4. If
you've satisfied these requirements (which should be true in stock
FC2) then we've got a larger issue going on.
Comment 5 John Dennis 2004-09-17 16:06:39 EDT
Created attachment 103964 [details]
DB 4 NPTL requirements
Comment 6 Alexander Dalloz 2004-09-17 16:30:11 EDT
Dennis, when I tested the cyrus-imapd on an AMD K6-2 400 on 2004-05-21
it was a freshly installed Fedora Core 2 system. A very basic system
with not much packages installed. All packages, including the kernel,
were FC2 current at that date in May. I did not install any foreign
package, nor compiled anything my own. I faced this bug when I tested
how well an online upgrade from FC1 to FC2 works. So base was first an
FC1 system - plain! nothing self compiled, nor outside packages - and
then I did an upgrade with up2date to FC2. The system did work
properly after the upgrade finished and I rebooted the system with the
 default FC2 kernel.
Actually I have no unused AMD K6-2 system available for testing. Else
I would reproduce it with a plain fresh install of FC2 from CDs. Kevin
did not tell within comment #2 how he installed.
Comment 7 John Dennis 2004-09-17 16:34:43 EDT
Also, you can get into trouble if you have a glibc which was built for
an arch that is not compatible with your CPU. This might explain why
an older AMD K6 exhibited problems.

On the systems you saw the problems on it would be good know both the
glibc and the cpu info, so could you tell me the output of these two
commands?

% rpm -q --queryformat "%{name}-%{version}-%{release} %{arch}\n" glibc
% cat /proc/cpuinfo

Note: a simple "rpm -q glibc" won't be sufficient, need the arch too,
which the above provides.
Comment 8 Gerard Braad 2004-11-03 22:31:40 EST
I can reproduce the same error with a fresh install of Fedora Core 2

i have to mention, i HAD cyrus running before (on RHL8)... only after
a new install it fails on this server.



this is the error i get:

Nov  4 05:18:56 forum master[13236]: process 13648 exited, status 75
Nov  4 05:18:56 forum master[13236]: service lmtpunix pid 13648 in
READY state: terminated abnormally
Nov  4 05:18:56 forum master[13649]: about to exec
/usr/lib/cyrus-imapd/lmtpd
Nov  4 05:18:56 forum lmtpunix[13649]: DBERROR db4: Berkeley DB
library configured to support only DB_PRIVATE environments
Nov  4 05:18:56 forum lmtpunix[13649]: DBERROR: dbenv->open
'/var/lib/imap/db' failed: Invalid argument
Nov  4 05:18:56 forum lmtpunix[13649]: DBERROR: init() on berkeley
Nov  4 05:18:56 forum lmtpunix[13649]: executed
Nov  4 05:18:56 forum lmtpunix[13649]: DBERROR db4: environment not
yet opened
Nov  4 05:18:56 forum lmtpunix[13649]: DBERROR: opening
/var/lib/imap/deliver.db: Invalid argument
Nov  4 05:18:56 forum lmtpunix[13649]: DBERROR: opening
/var/lib/imap/deliver.db: cyrusdb error
Nov  4 05:18:56 forum lmtpunix[13649]: FATAL: lmtpd: unable to init
duplicate delivery database
Nov  4 05:18:56 forum master[13236]: process 13649 exited, status 75
Nov  4 05:18:56 forum master[13236]: service lmtpunix pid 13649 in
READY state: terminated abnormally
Nov  4 05:18:56 forum master[13650]: about to exec
/usr/lib/cyrus-imapd/lmtpd
Nov  4 05:18:56 forum lmtpunix[13650]: DBERROR db4: Berkeley DB
library configured to support only DB_PRIVATE environments
Nov  4 05:18:56 forum lmtpunix[13650]: DBERROR: dbenv->open
'/var/lib/imap/db' failed: Invalid argument
Nov  4 05:18:56 forum lmtpunix[13650]: DBERROR: init() on berkeley
Nov  4 05:18:56 forum lmtpunix[13650]: executed
Nov  4 05:18:56 forum lmtpunix[13650]: DBERROR db4: environment not
yet opened
Nov  4 05:18:56 forum lmtpunix[13650]: DBERROR: opening
/var/lib/imap/deliver.db: Invalid argument
Nov  4 05:18:56 forum lmtpunix[13650]: DBERROR: opening
/var/lib/imap/deliver.db: cyrusdb error
Nov  4 05:18:56 forum master[13236]: exiting on SIGTERM/SIGINT

this happens during the cvt_cyrusdb_all



so here goes, the architecture information


[root@forum RPMS]# rpm -q --queryformat "%{name}-%{version}-%{release}
%{arch}\n" glibc
glibc-2.3.3-27 i386

[root@forum RPMS]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 5
model           : 8
model name      : AMD-K6(tm) 3D processor
stepping        : 12
cpu MHz         : 300.702
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow
k6_mtrr
bogomips        : 589.82
Comment 9 John Dennis 2005-02-10 14:45:35 EST
My understanding is that the NPTL / K6 issues were fixed in FC3. Is
anybody still seeing this in an FC3 release?
Comment 10 Rob Kearey 2005-06-20 17:37:24 EDT
I now have the same issue in a clean FC3->FC4 upgrade, on a basic PIII.
Comment 11 Alexander Dalloz 2005-06-20 17:52:15 EDT
Rob,
do you really face the same DB errors? Or is #160317 the right bug track?
Comment 12 Matthew Miller 2005-07-12 17:37:02 EDT
(Putting to NEEDINFO state as per comment #11.)
Comment 13 John Thacker 2006-10-25 16:25:36 EDT
Closing per previous comment and lack of response.  Also note that FC1 and FC2
are no longer supported even by Fedora Legacy.  If this is happening in FC3/FC4,
per comment #10, then please assign it to Fedora Legacy, as FC3 and FC4 are
Fedora Legacy now, and change the version.

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