Skip Menu |

This queue is for tickets about the CDB_File CPAN distribution.

Report information
The Basics
Id: 102686
Status: resolved
Priority: 0/
Queue: CDB_File

People
Owner: Nobody in particular
Requestors: gnatyna [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: file descriptor leak without $cdbh->finish
Date: Wed, 11 Mar 2015 12:57 +0300
To: bug-CDB_File [...] rt.cpan.org
From: Alexander Gnatyna <gnatyna [...] yandex.ru>
Hello. I found file descriptor leak in CDB_File: cdbmaker_DESTROY does't close opened file handle, so descriptors leak if no $cdb->finish method called. Example below: perl -le 'use CDB_File; warn $CDB_File::VERSION; for(1..3){ my $cdb = CDB_File->new("$_.cdb", "$_.cdb.tmp"); } print `lsof -np $$`'|grep cdb 0.97_02 at -e line 1. perl 5928 gnatyna 6w REG 9,4 0 108922859 /tmp/1.cdb.tmp perl 5928 gnatyna 7w REG 9,4 0 108922875 /tmp/2.cdb.tmp perl 5928 gnatyna 8w REG 9,4 0 108922876 /tmp/3.cdb.tmp draft patch in attachment. Thank you. Gnatyna Alexander.

Message body is not shown because sender requested not to inline it.

Ticket migrated to github as https://github.com/toddr/CDB_File/issues/3