Bug 78699 - xinetd reload kills all services if exactly nine services are enabled
xinetd reload kills all services if exactly nine services are enabled
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: xinetd (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-27 15:21 EST by Brian G. Reid
Modified: 2014-08-31 19:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-13 13:14:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian G. Reid 2002-11-27 15:21:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827

Description of problem:
I am using the Errata version of xinetd-2.3.9-0.70

When exactly nine services are enabled in xinetd and xinetd receives SIGHUP,
instead of reloading the services, it disables all services.
This does not happen with eight services enabled or with ten services enabled. 
It appears that the problem is in xinetd-2.3.9/libs/src/sio/sio.c, in the
sio_setup function where it tries to allocate an array for more file descriptors.

From strace'ing and ltrace'ing xinetd, the main configuration file
/etc/xinetd.conf is opened, but never read.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Enable exactly nine services in /etc/xinetd.d/
2. Start xinetd: service xinetd start
3. Reload the configuration: service xinetd reload
4. Check /var/log/messages for reconfiguration results or try to use the
services that should be configured.
	

Actual Results:  Nov 27 11:50:37 spock xinetd[16358]: Starting reconfiguration
Nov 27 11:50:37 spock xinetd[16358]: service daytime-stream deactivated
Nov 27 11:50:37 spock xinetd[16358]: service daytime-dgram deactivated
Nov 27 11:50:37 spock xinetd[16358]: service echo-stream deactivated
Nov 27 11:50:37 spock xinetd[16358]: service echo-dgram deactivated
Nov 27 11:50:37 spock xinetd[16358]: service imap deactivated
Nov 27 11:50:37 spock xinetd[16358]: Sending signal 9 to login server 16363
Nov 27 11:50:37 spock xinetd[16358]: service login deactivated
Nov 27 11:50:37 spock xinetd[16358]: service shell deactivated
Nov 27 11:50:37 spock xinetd[16358]: service telnet deactivated
Nov 27 11:50:37 spock xinetd[16358]: {general_handler} (16358) Unexpected
signal: 11 (Segmentation fault)
Nov 27 11:50:37 spock last message repeated 9 times
Nov 27 11:50:37 spock xinetd[16358]: Resetting...
Nov 27 11:50:37 spock xinetd: xinetd -HUP succeeded


Expected Results:  Nov 27 11:47:50 spock xinetd[16211]: Starting reconfiguration
Nov 27 11:47:50 spock xinetd[16211]: readjusting service daytime-stream
Nov 27 11:47:50 spock xinetd[16211]: readjusting service daytime-dgram
Nov 27 11:47:50 spock xinetd[16211]: readjusting service echo-stream
Nov 27 11:47:50 spock xinetd[16211]: readjusting service echo-dgram
Nov 27 11:47:50 spock xinetd[16211]: readjusting service finger
Nov 27 11:47:50 spock xinetd[16211]: readjusting service imap
Nov 27 11:47:50 spock xinetd[16211]: readjusting service login
Nov 27 11:47:50 spock xinetd[16211]: readjusting service shell
Nov 27 11:47:50 spock xinetd[16211]: readjusting service telnet
Nov 27 11:47:50 spock xinetd[16211]: readjusting service ftp
Nov 27 11:47:50 spock xinetd[16211]: Reconfigured: new=0 old=10 dropped=0 (services)
Nov 27 11:47:50 spock xinetd: xinetd -HUP succeeded


Additional info:

The following is an strace and an ltrace of the xinetd process as the SIGHUP
signalwas sent to it:

STRACE:
select(15, [3 5 6 7 9 10 11 12 13 14], NULL, NULL, NULL) = ? ERESTARTNOHAND (To
be restarted)
--- SIGHUP (Hangup) ---
write(4, "\1", 1)                       = 1
sigreturn()                             = ? (mask now [])
select(15, [3 5 6 7 9 10 11 12 13 14], NULL, NULL, NULL) = 1 (in [3])
ioctl(3, FIONREAD, [1])                 = 0
read(3, "\1", 1)                        = 1
time([1038423454])                      = 1038423454
getpid()                                = 3375
rt_sigaction(SIGPIPE, {0x401703d4, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(8, "<29>Nov 27 10:57:34 xinetd[3375]"..., 58, 0) = 58
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
open("/etc/xinetd.conf", O_RDONLY)      = 15
close(15)                               = 0
close(5)                                = 0
time([1038423454])                      = 1038423454
getpid()                                = 3375
rt_sigaction(SIGPIPE, {0x401703d4, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(8, "<29>Nov 27 10:57:34 xinetd[3375]"..., 68, 0) = 68
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
close(6)                                = 0
time([1038423454])                      = 1038423454
getpid()                                = 3375
rt_sigaction(SIGPIPE, {0x401703d4, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(8, "<29>Nov 27 10:57:34 xinetd[3375]"..., 67, 0) = 67
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
close(7)                                = 0




LTRACE:
--- SIGHUP (Hangup) ---
write(4, "\001", 1)                               = 1
breakpointed at 0x4016d68d (?)
__errno_location()                                = 0x401becc0
select(15, 0xbffff4f0, 0, 0, 0)                   = 1
ioctl(3, 21531, 0xbffff4cc)                       = 0
read(3, "\001", 1)                                = 1
syslog(29, "%.*s%.*s", 0, "\n", 24, "Starting reconfiguration") = <void>
open("/etc/xinetd.conf", 0, 010006742600)         = 15
malloc(16)                                        = 0x0806de88
malloc(80)                                        = 0x08074c08
malloc(272)                                       = 0x08079040
memset(0x08079040, '\000', 272)                   = 0x08079040
malloc(12)                                        = 0x0806dea0
memset(0xbffff2f0, '\000', 272)                   = 0xbffff2f0
realloc(0x0806d1e8, 480)                          = 0x0806deb0
memset(0x0806dff0, '\000', 160)                   = 0x0806dff0
realloc(0x0806d330, 660)                          = 0x0806d1e8
memset(0x0806d3a0, '\000', 220)                   = 0x0806d3a0
__errno_location()                                = 0x401becc0
endprotoent(0xbffff4a0, 1, 0xbffff438, 0x0804f228, 15) = 0x401becc0
endpwent()                                        = <void>
endgrent()                                        = <void>
endnetent(0xbffff4a0, 1, 0xbffff438, 0x0804f228, 15) = 0x401becc0
endhostent(15, 0xbffff4a0, 0x401bc580, 0x08066160, 0xbffff4a0) = 0x401becc0
close(15)                                         = 0
free(0x0806dea0)                                  = <void>
endservent(0xbffff490, 0x4000ca51, 0x400161f4, 15, 0x08066160) = 0x401becc0
endprotoent(0xbffff490, 0x4000ca51, 0x400161f4, 15, 0x08066160) = 0x401becc0
endrpcent(0xbffff490, 0x4000ca51, 0x400161f4, 15, 0x08066160) = 0x401becc0
malloc(12)                                        = 0x0806dea0
close(5)                                          = 0
strlen(0x08072fd8, 0x4000c9ce, 0x401b64f0, 0x401e4f74, 0xbfffeeb0) = 14
syslog(29, "%.*s%.*s", 0, ".", 34, "service daytime-stream deactivat"...) = <void>
Comment 1 Brian G. Reid 2002-12-02 17:25:23 EST
This still occurs with the Errata update of xinetd RHSA-2002:196-19 on 2002-12-02
for xinetd version xinetd-2.3.7-4.7x
Comment 2 Mark J. Cox (Product Security) 2003-05-13 13:14:04 EDT
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2003-160.html

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