Bug 245857 - endless recursion bug
Summary: endless recursion bug
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: rawhide
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-27 01:45 UTC by Bernie Innocenti
Modified: 2013-04-30 23:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-02 15:35:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bernie Innocenti 2007-06-27 01:45:23 UTC
Description of problem:
Programs like twinkle segfault after running out of stack
when calling into libbind.

Version-Release number of selected component (if applicable):
9.5.0a5-1.fc8

How reproducible:
every time

Steps to Reproduce:
1. install bind-libs-9.5.0a5-1.fc8 and twinkle
2. run twinkle under gdb
3. see backtrace after segfault
  
Actual results:
infinite recursion, then SIGSEGV

Expected results:
normal operation

Additional info:
works if you downgrade to bind-libs-9.4

Comment 1 Jonathan Kamens 2007-06-29 03:51:49 UTC
I'm running into this as well. It's causing milter-greylist to crash on startup.


Comment 2 Jonathan Kamens 2007-06-29 03:55:12 UTC
Here's a segment of the stack trace from milter-greylist:

(gdb) where
#0  0x00124d49 in __irs_gen_acc () from /usr/lib/libbind.so.4
#1  0x00130854 in __net_data_create () from /usr/lib/libbind.so.4
#2  0x00130a5e in __net_data_init () from /usr/lib/libbind.so.4
#3  0x00130abe in __h_errno_location () from /usr/lib/libbind.so.4
#4  0x0014b881 in __res_vinit () from /usr/lib/libbind.so.4
#5  0x0014c605 in __res_ninit () from /usr/lib/libbind.so.4
#6  0x00124cca in ?? () from /usr/lib/libbind.so.4
#7  0x00130860 in __net_data_create () from /usr/lib/libbind.so.4
#8  0x00130a5e in __net_data_init () from /usr/lib/libbind.so.4
#9  0x00130abe in __h_errno_location () from /usr/lib/libbind.so.4
#10 0x0014b881 in __res_vinit () from /usr/lib/libbind.so.4
#11 0x0014c605 in __res_ninit () from /usr/lib/libbind.so.4
#12 0x00124cca in ?? () from /usr/lib/libbind.so.4
... etc. ...

Here's the output of strace:

... more of the same ...
9257  brk(0xe4b4000)                    = 0xe4b4000
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  brk(0xe4d6000)                    = 0xe4d6000
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  brk(0xe4f7000)                    = 0xe4f7000
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  open("/etc/irs.conf", O_RDONLY)   = -1 ENOENT (No such file or directory)
9257  brk(0xe518000)                    = 0xe518000
9257  open("/etc/hesiod.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
9257  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
9259  +++ killed by SIGSEGV +++

Creating empty irs.conf and hesiod.conf files does not solve the problem. 
Here's the end of the strace output when I do that (after lots of the same thing):

...
10611 open("/etc/irs.conf", O_RDONLY)   = 3
10611 fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
10611 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0xb73f9000
10611 read(3, "", 4096)                 = 0
10611 close(3)                          = 0
10611 munmap(0xb73f9000, 4096)          = 0
10611 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
10612 +++ killed by SIGSEGV +++


Comment 3 Jonathan Kamens 2007-06-29 04:05:37 UTC
I have nscd disabled by default.  The problem with milter-greylist seems to go
away when I start it.


Comment 4 Jonathan Kamens 2007-06-29 04:08:00 UTC
Never mind, I was wrong about nscd.


Comment 5 Adam Tkac 2007-06-29 09:15:37 UTC
Bug in resolver initialization. You could download fixed package from
http://people.redhat.com/atkac/bind/bind-9.5.0a5-1.2.fc8.src.rpm . I'm going to
wait with final build after upstream accepts patch.

Regards, Adam

Comment 6 Adam Tkac 2007-07-02 15:35:50 UTC
Fixed in bind-9.5.0a5-2.fc8

Adam


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