Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Oct 2008 06:50:05 GMT
From:      Vladimir Grebenschikov <vova@parallels.com>
To:        freebsd-emulation@FreeBSD.org
Subject:   Re: kern/97326: [linux] file descriptor leakage in linux emulation
Message-ID:  <200810030650.m936o55G018523@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/97326; it has been noted by GNATS.

From: Vladimir Grebenschikov <vova@parallels.com>
To: bug-followup@FreeBSD.org, bakul@bitblocks.com
Cc: Chagin Dmitry <dchagin@FreeBSD.org>
Subject: Re: kern/97326: [linux] file descriptor leakage in linux emulation
Date: Fri, 03 Oct 2008 10:09:01 +0400

 I can confirm - skype does not leak descriptors after first call.
 
 Tested on 8-CURRENT.
 
 FreeBSD vbook.fbsd.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #4: Wed Oct  1
 08:03:48 MSD 2008     root@vbook.fbsd.ru:/usr/obj/usr/src/sys/VBOOK
 i386
 
 # pkg_info -I linux_base\* skype\*
 linux_base-f8-8_4   Base set of packages needed in Linux mode (for
 i386/amd64)
 skype-2.0.0.72,1    P2P VoIP software
 # sysctl compat.linux
 compat.linux.oss_version: 198144
 compat.linux.osrelease: 2.6.16
 compat.linux.osname: Linux
 #
 
 Analysis of open descriptors:
 $ lsof | fgrep skype | awk '{ print $9; }' | sort | uniq -c | sort -nr
   88 
   16 /usr/home/vova/.kde/share/config/kioslaverc
   16 *:35644
    8 localhost:18001
    8 10.30.1.111:24183->ppp85-140-221-4.pppoe.mtu-net.ru:23909
    8 /usr/local/lib/X11/fonts/webfonts/verdanab.ttf
    8 /usr/local/lib/X11/fonts/webfonts/verdana.ttf
    8 /usr/local/lib/X11/fonts/bitstream-vera/VeraBd.ttf
    8 /usr/local/lib/X11/fonts/bitstream-vera/Vera.ttf
    8 /usr/local/bin/skype
    8 /usr/home/vova/.Skype/nickname/voicemail256.dbb
    8 /usr/home/vova/.Skype/nickname/user4096.dbb
    8 /usr/home/vova/.Skype/nickname/user16384.dbb
    8 /usr/home/vova/.Skype/nickname/user1024.dbb
    8 /usr/home/vova/.Skype/nickname/transfer256.dbb
    8 /usr/home/vova/.Skype/nickname/profile16384.dbb
    8 /usr/home/vova/.Skype/nickname/message512.dbb
    8 /usr/home/vova/.Skype/nickname/message4096.dbb
    8 /usr/home/vova/.Skype/nickname/message256.dbb
    8 /usr/home/vova/.Skype/nickname/message1024.dbb
    8 /usr/home/vova/.Skype/nickname/index2.dat
    8 /usr/home/vova/.Skype/nickname/contactgroup512.dbb
    8 /usr/home/vova/.Skype/nickname/contactgroup256.dbb
    8 /usr/home/vova/.Skype/nickname/chatsync/93/933e6de4e914de3f.dat
    8 /usr/home/vova/.Skype/nickname/chatsync/90/90443626f418d589.dat
    8 /usr/home/vova/.Skype/nickname/chatsync/57/57d806a6d7ff6809.dat
    8 /usr/home/vova/.Skype/nickname/chatsync/56/56187794f108deaf.dat
    8 /usr/home/vova/.Skype/nickname/chatsync/03/03d2e8678e8cb7ce.dat
    8 /usr/home/vova/.Skype/nickname/chatmsg512.dbb
    8 /usr/home/vova/.Skype/nickname/chatmsg256.dbb
    8 /usr/home/vova/.Skype/nickname/chatmsg2048.dbb
    8 /usr/home/vova/.Skype/nickname/chatmsg1024.dbb
    8 /usr/home/vova/.Skype/nickname/chatmember256.dbb
    8 /usr/home/vova/.Skype/nickname/chat512.dbb
    8 /usr/home/vova/.Skype/nickname/chat4096.dbb
    8 /usr/home/vova/.Skype/nickname/chat2048.dbb
    8 /usr/home/vova/.Skype/nickname/callmember256.dbb
    8 /usr/home/vova/.Skype/nickname/call256.dbb
    8 /usr/home/vova
    8 /usr/compat/linux/usr/lib/libstdc++.so.6.0.8
    8 /usr/compat/linux/usr/lib/libfreetype.so.6.3.16
    8 /usr/compat/linux/usr/lib/libfontconfig.so.1.0.4
    8 /usr/compat/linux/usr/lib/libexpat.so.0.5.0
    8 /usr/compat/linux/usr/lib/gconv/UTF-16.so
    8 /usr/compat/linux/usr/X11R6/lib/libXv.so.1.0
    8 /usr/compat/linux/usr/X11R6/lib/libXss.so.1.0
    8 /usr/compat/linux/usr/X11R6/lib/libXrender.so.1.2.2
    8 /usr/compat/linux/usr/X11R6/lib/libXrandr.so.2.0
    8 /usr/compat/linux/usr/X11R6/lib/libXinerama.so.1.0
    8 /usr/compat/linux/usr/X11R6/lib/libXi.so.6.0
    8 /usr/compat/linux/usr/X11R6/lib/libXfixes.so.3.0
    8 /usr/compat/linux/usr/X11R6/lib/libXext.so.6.4
    8 /usr/compat/linux/usr/X11R6/lib/libXcursor.so.1.0.2
    8 /usr/compat/linux/usr/X11R6/lib/libX11.so.6.2
    8 /usr/compat/linux/usr/X11R6/lib/libSM.so.6.0
    8 /usr/compat/linux/usr/X11R6/lib/libICE.so.6.3
 
 8 /usr/compat/linux/usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
    8 /usr/compat/linux/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
    8 /usr/compat/linux/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
    8 /usr/compat/linux/lib/libz.so.1.2.3
    8 /usr/compat/linux/lib/librt-2.7.so
    8 /usr/compat/linux/lib/libresolv-2.7.so
    8 /usr/compat/linux/lib/libpthread-2.7.so
    8 /usr/compat/linux/lib/libnss_files-2.7.so
    8 /usr/compat/linux/lib/libnss_dns-2.7.so
    8 /usr/compat/linux/lib/libm-2.7.so
    8 /usr/compat/linux/lib/libgcc_s-4.1.2-20070925.so.1
    8 /usr/compat/linux/lib/libdl-2.7.so
    8 /usr/compat/linux/lib/libc-2.7.so
    8 /usr/compat/linux/lib/libasound.so.2.0.0
    8 /usr/compat/linux/lib/ld-2.7.so
    8 /usr
    8 /dev/null
    8 /
    1 /usr/local/share/applications/skype.desktop
 $ lsof | fgrep skype | awk ' ($9 == "") { print $5; }' | sort | uniq -c 
   64 PIPE
   24 unix
 $
 
 Looks like everything goes as expected - linux's clone() makes copy of
 all file-handlers per thread. So we have about ~90 (handlers per thread)
 * 8 (threads) = ~700 open file-handlers.
 
 Need to check, but I think, same picture should be on Linux.
 
 MacOS contrary, should have better thread support.
 
 Probably, somebody encourages skype.com to build native FreeBSD version
 of skype ?
 
 -- 
 Vladimir B. Grebenschikov
 Parallels Inc. vova@parallels.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810030650.m936o55G018523>