Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90679 - tcprules halts with >99% cpu usage while attempting to read specific file.
Summary: tcprules halts with >99% cpu usage while attempting to read specific file.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Qmail Team (OBSOLETE)
: 89442 97772 (view as bug list)
Depends on:
Reported: 2005-04-27 21:34 UTC by Faux
Modified: 2006-03-12 10:40 UTC (History)
3 users (show)

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

Patch for tcprules.c (tcprules.diff,463 bytes, patch)
2005-09-11 16:01 UTC, Michael Hanselmann (hansmi) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Faux 2005-04-27 21:34:33 UTC
When attempting to use the command: tcprules /etc/tcprules.d/tcp.qmail-smtp.cdb /etc/tcprules.d/.tcp.qmail-smtp.tmp </etc/tcprules.d/tcp.qmail-smtp

Where the file tcp.qmail-smtp is something like:,RELAYCLIENT="",RBLSMTPD="",RELAYCLIENT="",RBLSMTPD=""

causes tcprules to cease responding, with >99% CPU usage. NB. There is a space on the third line (the empty line) of that file. Without the space (or the line), it works fine.
Removing the new line after the space also causes it to run correctly (ie.:,RELAYCLIENT="",RBLSMTPD="",RELAYCLIENT="",RBLSMTPD=""

), as does removing the line entirely.

I'd believe this was a syntax error if it didn't use cpu.

This has apparently happened on other systems, with other plausible explinations:

Reproducible: Always
Steps to Reproduce:
1. Get the system in a ready state by emerging qmail, and any dependencies for tcprules.

2. Make the contents of /etc/tcprules.d/tcp.qmail-smtp,RELAYCLIENT="",RBLSMTPD="",RELAYCLIENT="",RBLSMTPD=""
  <--- NB: There's a space there.

3. Run the command 'tcprules /etc/tcprules.d/tcp.qmail-smtp.cdb /etc/tcprules.d/.tcp.qmail-smtp.tmp </etc/tcprules.d/tcp.qmail-smtp'.

4. Examine top.

Actual Results:  
'top' reported that tcprules was using all of the cpu, and tcprules stopped 
accepting input.

Expected Results:  
Run as it would have without the space present.

> emerge info
Portage (default-linux/x86/2005.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.9-
bytemark-uml-20041208-1-bytemark-uml-20041207-1 i686)
System uname: 2.6.9-bytemark-uml-20041208-1-bytemark-uml-20041207-1 i686 UML
Gentoo Base System version 1.4.10
Python:              dev-lang/python-2.3.3-r1 [2.3.3 (#1, Jun  2 2004, 12:19:50
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.3-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/libtool:   1.4.3-r4, 1.5.10-r4
virtual/os-headers:  2.4.21-r1
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/
config /var/bind /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms"
USE="x86 alsa apm arts authdaemond avi berkdb bitmap-fonts crypt cups emboss 
encode foomaticdb fortran gdbm gif gpm gtk2 imlib ipv6 jpeg libg++ libwww mad 
maildir mikmod motif mp3 mpeg mysql ncurses nls oggvorbis pam pdflib perl png 
python quicktime readline ruby slang spell ssl svga tcpd tiff truetype truetype-
fonts type1-fonts valias vhosts xml2 xmms xv zlib"
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-02 18:04:59 UTC
*** Bug 97772 has been marked as a duplicate of this bug. ***
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-02 18:06:30 UTC
patches to fix tcprules welcome
Comment 3 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-09-11 16:00:45 UTC
*** Bug 89442 has been marked as a duplicate of this bug. ***
Comment 4 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-09-11 16:01:52 UTC
Created attachment 68205 [details, diff]
Patch for tcprules.c

I've attached a small patch for tcprules.c. Can you please test this patch
before we add it to portage?
Comment 5 Alex V. Koval 2005-09-16 01:42:51 UTC
thank you, this patch helped me on AMD64 - no more freezing, program worked
to make tcprules.smtp.cdb
Comment 6 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-09-17 11:39:39 UTC
I'll add the patch to the ebuild in the next days. Thanks for testing.
Comment 7 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-10-15 14:59:26 UTC
Sorry for the delay, ucspi-tcp-0.88-r13 is now in CVS. Can you test it, please?
Comment 8 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-03-12 10:40:25 UTC
No response, closing.