Bug 496236 - "sudo -i" can take up to 40 seconds to provide prompt. (issue with non-resolvable hostnames?)
Summary: "sudo -i" can take up to 40 seconds to provide prompt. (issue with non-resolv...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Kopeček
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-17 13:48 UTC by Tom London
Modified: 2009-04-23 13:11 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-04-23 13:11:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Output from "strace -ttt -o sudo-home.txt sudo -i" (590.55 KB, text/plain)
2009-04-17 13:48 UTC, Tom London
no flags Details

Description Tom London 2009-04-17 13:48:22 UTC
Created attachment 340010 [details]
Output from "strace -ttt -o sudo-home.txt sudo -i"

Description of problem:
I have a laptop that I "named" during install as "tlondon.innopath.com"

If I run "sudo -i" from gnome-terminal when the laptop is connected "at work" (i.e., innopath.com), "sudo -i" produces root prompt within a second or two.

On the otherhand, if I do the same from "at home" (i.e. Comcast) where "tlondon.innopath.com" doesn't resolve to anything interesting, "sudo -i" takes about 30-40 seconds to produce the root prompt.

I ran "strace -ttt -o sudo-home.txt sudo -i" and attach the output.

From my (naive) scan, looks like it is hanging on "recvfrom"s like the following (DNS?):

<<<<SNIP>>>>
socket(PF_INET, 0x802 /* SOCK_??? */, IPPROTO_IP) = 5
connect(5, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("68.87.76.178")}, 28) = 0
poll([{fd=5, events=POLLOUT}], 1, 0)    = 1 ([{fd=5, revents=POLLOUT}])
sendto(5, "\21\302\1\0\0\1\0\0\0\0\0\0\7tlondon\10innopath\3com"..., 38, MSG_NOSIGNAL, NULL, 0) = 38
poll([{fd=5, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=5, revents=POLLOUT}])
sendto(5, "\220\245\1\0\0\1\0\0\0\0\0\0\7tlondon\10innopath\3com"..., 38, MSG_NOSIGNAL, NULL, 0) = 38
poll([{fd=5, events=POLLIN}], 1, 4999)  = 1 ([{fd=5, revents=POLLIN}])
ioctl(5, FIONREAD, [38])                = 0
recvfrom(5, "\220\245\201\200\0\1\0\0\0\0\0\0\7tlondon\10innopath\3com"..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("68.87.76.178")}, [16]) = 38
poll([{fd=5, events=POLLIN}], 1, 4898
<<<<SNIP>>>>

This a legitimate use case?

Version-Release number of selected component (if applicable):
sudo-1.6.9p17-6.fc11.x86_64

How reproducible:
Every time.....

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tom London 2009-04-22 13:49:17 UTC
I am no longer seeing this delay....

I believe I noticed it yesterday.

I'm not sure "what changed"; I've been keeping system "rawhide up to date".....

If this does not reappear in a day or so, I'll close....

Comment 2 Tom London 2009-04-23 13:11:56 UTC
I can no longer reproduce this.

Closing "WORKSFORME".


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