Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58345 - gaim has 1012 log files open when no log window is open!
Summary: gaim has 1012 log files open when no log window is open!
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gaim Bugs Crew
Depends on:
Reported: 2004-07-25 18:37 UTC by Mike Kelly
Modified: 2004-07-28 10:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kelly 2004-07-25 18:37:12 UTC
Gaim seems to not appropriately close files when it's done with them. Namely log files. After having gaim 0.80 running for about a day, i run, as root:
 lsof -p `pidof gaim` -P |grep log |wc -l

Result: 1012, implying that there are 1,012 open log files. At this time, there are no log windows open, so gaim should have properly closed all of these file streams...

Reproducible: Always
Steps to Reproduce:
1. Run gaim 0.80.
2. Use it normally for a while [several hours], read some logs, use find once or twice.
3. Notice as sounds stop working, icons in buddy list intermittently disappear, error dialogs appear when attempting to launch any sort of child process [sound program or web browser, for example].

Actual Results:  
I first observed this bug when I noticed that sound was ceasing to function
after the program had been running for a while. When I set the sound to use
command: play "%s", i got this error dialog:

Unable to play sound because the configured sound command could not be launched:
Failed to create the pipe for communicating with child process (Too many open files)

A similar dialog appears when I click on a hyperlink.

Also the "buddy icon" bug from 0.79 seems to exist in 0.80. maybe applying that
patch to 0.80 will solve this issue too? 

Expected Results:  
The software should close all the log files for a screen name once the
corresponding window is closed.

I noticed that version 0.80 involved a change in the log window code, and i
recall reading about them planning on changing the find code a while ago [while
reading through todos or something]. Perhaps one of these areas is having the
trouble? Although, the issue may have existed before. 

mk65 root # emerge info
Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-,
System uname: 2.6.7-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
CFLAGS="-march=pentium4 -O3 -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf
/etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/bmg-main.alternative"
USE="S3TC X X509 Xaw3d aalib acl acpi acpi4linux alsa amd apache2 apm avi berkdb
bidi bonobo caps cdr chroot cjk crypt cups curl debug dedicated directfb
divx4linux dnd doc dvd edl emacs-w3 encode esd ethereal faad fam fbcon flac
foomaticdb gatos gd gdbm ggi gif gimpprint gnome gnomedb gphoto2 gpm gstreamer
gtk gtk2 gtkhtml guile idea imagemagick imap imlib innodb jack java javamail
javascript jikes jpeg jython ldap libg++ libwww live lzo mad maildir mbox mikmod
mmx mng motif mozilla moznoirc moznomail mpeg mpeg4 mule music mysql nas ncurses
neXt network nls objc offensive oggvorbis opengl oss pam parse-clocks passfile
pcap pda pdflib perl plotutils png ppds python quicktime readline rtc ruby samba
sasl sdk sdl skey slang slp speex spell sse ssl svga tcltk tcpd tetex theora
tiff transcode truetype usb video_cards_radeon videos vim-with-x virus-scan wmf
x86 xchattext xml xml2 xmms xosd xvid zlib zvbi"


I'd be happy to provide any other information that is necessary. Just email me
at pioto01 [at]
Comment 1 Don Seiler (RETIRED) gentoo-dev 2004-07-26 08:09:15 UTC
This looks to be an upstream bug/RFE.  Feel free to post it in the gaim sourceforge bug or RFE tracker.  It sounds like a bug to me.
Comment 2 Don Seiler (RETIRED) gentoo-dev 2004-07-26 08:36:50 UTC
OK I want to keep this here.

I'm not able to duplicate this behavior.  Are you doing system logging?
Comment 3 Mike Kelly 2004-07-26 10:53:42 UTC
yes, i'm doing system logs in gaim. 

the error has come up again, and, yes, all of the hits are the system log files. 3676 of 'em, in fact. 

i've been running gaim w/ the debug window open now, and one item i see in it a lot is: GLib-GObject: cannot register existing type `GnomeIconTheme'.  is this somehow related to the system log dialog?

my ~/.gaim/logs is a symlink to a directory on a fat32 partition... but this hasn't caused any problems before.

i just ran a test search in the system log dialog and got these messages in the debug window:
(13:47:23) log: Could not create log file /home/mk65/.gaim/logs/aim/.system/.system/2004-05-09.012533.html
(13:47:23) log: Could not create log file /home/mk65/.gaim/logs/aim/.system/.system/2004-05-09.012554.html
(13:47:24) log: Could not create log file /home/mk65/.gaim/logs/msn/
(13:47:24) log: Could not create log file /home/mk65/.gaim/logs/msn/
(13:47:24) log: Could not create log file /home/mk65/.gaim/logs/msn/
(13:47:33) g_log: file util.c: line 2342 (gaim_strcasestr): assertion `hlen > 0' failed
(13:47:33) g_log: file util.c: line 2342 (gaim_strcasestr): assertion `hlen > 0' failed
hmm, seems like there's a flaw somewhere where ~/.gaim/logs/[protocol]/.system/.system/* is being refered to rather than ~/.gaim/logs/[protocol]/.system/* ...

i can give you my full debug window output for the previous 12 hours, if you'd like.