Bug 676242 - thread race on UDP socket_send()
Summary: thread race on UDP socket_send()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bind
Version: 5.3
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Adam Tkac
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 668957 719046
TreeView+ depends on / blocked
 
Reported: 2011-02-09 07:36 UTC by Takuma Umeya
Modified: 2018-11-26 19:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 06:20:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
config files (7.50 KB, application/x-gzip)
2011-02-09 07:36 UTC, Takuma Umeya
no flags Details
Improved patch (1.74 KB, patch)
2011-08-04 18:05 UTC, Adam Tkac
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0254 0 normal SHIPPED_LIVE bind bug fix and enhancement update 2012-02-20 15:06:59 UTC

Description Takuma Umeya 2011-02-09 07:36:00 UTC
Created attachment 477752 [details]
config files

Description of problem:
socket_send() operation must invoke LOCK(&sock->lock) to take lock during the procedure on UDP. Without it, socket_send()->doio_send() is invoked in multiple threads, causing the following error to show up: 
Jan xx xx:xx:xx xxx named[xxxx]: zone xxx.xxx.xxx.in-addr.arpa/IN: refresh: failure trying master xxx.xxx.xxx.xxx#53 (source xxx.xxx.xxx.xxx#0): operation canceled

Version-Release number of selected component (if applicable):
bind-9.3.4-10.P1.el5-x86_64 

How reproducible:
Sometimes

Steps to Reproduce:
(Reference from the vendor's report)
Please set up the configuration of named by using attached sample files.
Please refer following example operations.

a. install the named configuration
Please use the attached archive file named_config_files.tgz.
Following files are included in this archive file.
-configuration files:
etc/namedb-prv/*
etc/namedb-wgw/*

-symbolic links:
etc/init.d/named-prv -> /etc/namedb-prv/named-prv
etc/init.d/named-wgw -> /etc/namedb-wgw/named-wgw
usr/sbin/named-prv -> named
usr/sbin/named-wgw -> named

b. customize configurations for named
Please verify configurations( /etc/namedb-prv/* and /etc/namedb-wgw/*)
and customize each /etc/namedb-prv/named.conf and /etc/namedb-wgw/named.conf.
Especially, you should verify and customize ip addresses.

c. set up named service
Please execute following operation to set up
each named-prv and named-wgw service.

# cd /
# tar xvzf named_config_files.tgz
# chkconfig --add named-prv
# chkconfig --add named-wgw
# chkconfig --levels 2345 named-prv on
# chkconfig --levels 2345 named-wgw on

d. customize named debug options
- init script for named(/etc/init.d/xxx)
Please verify the installed script files(/etc/init.d/named-prv, /etc/init.d/named-wgw)
If you need to set up the debug-level option of named,
please change the daemon command line as follows:

daemon /usr/sbin/$prog -c $conffile
-> daemon /usr/sbin/$prog -d 99 -c $conffile

- logging paragraph of the named.conf
Please confirm and customize the logging paragraph of the
/etc/namedb-prv/named.conf and /etc/namedb-wgw/named.conf.
Regaeding attached sample named.conf files, debug log files are as follows:
- /var/log/named-prv_debug for named-prv
- /var/log/named-wgw_debug for named-wgw

e. start both named-prv and named-wgw services
# service named-prv start
# service named-wgw start 


Actual results:
Operation cancelled error appears. 

Expected results:
The error should not appear. 

Additional info:

Comment 5 Adam Tkac 2011-08-04 18:05:54 UTC
Created attachment 516761 [details]
Improved patch

Improved patch which doesn't affect performance of named.

Comment 19 errata-xmlrpc 2012-02-21 06:20:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0254.html


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