Bug 95022 - sarg 2.1 fopen() leak
Summary: sarg 2.1 fopen() leak
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-28 05:30 UTC by emz
Modified: 2006-03-28 11:47 UTC (History)
0 users

See Also:


Attachments
file.diff (281 bytes, patch)
2006-03-28 05:30 UTC, emz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description emz 2006-03-28 05:30:15 UTC
When sarg 2.1 uses external_css_file it opens it on each created html and forgets to fclose(). When he have to create 15000 htmls - he creates them successfully (each current html is properly closed when working on it is done) bus external css remains open. This overflows different system filecounters and when some limit is reached sarg crashes with "Too many open files". Some messages in this forum are related to this problem, but dont point on it directly. I have a sample 'lsof' output, can provide it if needed, but here I will just post a 'grep' + 'wc -l' results. Consider /usr/local/www/data.tech/main.css as my external css file. 
 
# grep /usr/local/www/data.tech/main.css openfiles.txt | wc -l 
9713 
 
I really think this needs to be fixed.

How-To-Repeat: Use external_css_file with some CSS data.
Build a report on a large period with loads of *.html files to be created.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-03-28 05:59:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

Over to maintainer
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2006-03-28 11:46:56 UTC
State Changed
From-To: open->closed

Committed. Thanks!