Bug 119191

Summary: print to file: left over UDP-port remains open
Product: [Unmaintained] kdeprint Reporter: Daniel Franke <franke.daniel>
Component: generalAssignee: KDEPrint Devel Mailinglist <kde-print-devel>
Status: CLOSED NOT A BUG    
Severity: normal CC: jlayt
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Franke 2005-12-29 17:52:25 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources
Compiler:          gcc-3.3.6 
OS:                Linux

I'm running KDE-3.5 and cups-1.1.23. Whenever any KDE application prints to file (PDF), an open UDP port is left over.

How to reproduce:
 * make sure that there is no open port for konqueror: `lsof -i | grep konqueror`
 * print this bug report to file (PDF)
 * check again the list of open ports: `lsof -i | grep konqueror`

COMMAND     PID   USER   FD   TYPE  DEVICE SIZE NODE NAME
konqueror  9207 daniel   14u  IPv4 4469467       UDP *:52746


These UDP ports may be accessed from any host:
remotehost $> nmap -sU <myhost> -p 52746

Starting nmap V. 2.53 by fyodor@insecure.org (www.insecure.org/nmap/ )
Interesting ports on <myhost> (<myip>):
Port       State       Service
52746/udp  open        unknown

The port is closed if and only if the printing application is closed.

I reported this issue to the kdeprint maintainer Christian Tibirna about three months ago, he acknowledged to submit this report.
Comment 1 Thiago Macieira 2005-12-29 21:05:27 UTC
DNS lookup.
Comment 2 Daniel Franke 2005-12-29 21:15:46 UTC
Hu? A few more words, maybe? I've seen this on two boxes and presumedly Christian has also. What do you mean bye your comment, "DNS lookup"? 
Comment 3 Daniel Franke 2005-12-29 21:54:56 UTC
I should ask google prior to post nonsense.

DNS is a UDP based service. Anyone (cups?) opens a UDP-port to ask for its server (localhost) -- I captured this using tcpdump. That's why this port is opened, but why isn't it closed when the server's hostname is resolved? It is quite unusual to accumulate open ports like this isn't it? Konqueror has to resolve far more names than e.g. cups, but there aren'n any leftover ports. 

IMO, this is at least a bug in terms that these ports should be closed without terminating the entire app.
Comment 4 Thiago Macieira 2005-12-29 23:14:31 UTC
The port is opened by libc (in fact, libresolv, which is loaded by libnss_dns, if you're on a GNU Libc system). It cannot be closed without going deep into libresolv's code. I am not going to write code to do that.

And Konqueror does not do DNS resolutions for browsing. The ioslaves do.
Comment 5 John Layt 2008-12-31 19:25:56 UTC
Closing old Resolved status bug.