salortiz / LMDB_File

Perl wrapper around the OpenLDAP's LMDB
Other
8 stars 12 forks source link

Avoid calling abort on a undefined value in global destruction #1

Closed rouzier closed 9 years ago

salortiz commented 9 years ago

While reviewing your code, I found a more fundamental problem. Do you have a small test case that shows the error? Thank you for the help.

rouzier commented 9 years ago

You the modules CHI and CHI::Driver::LMDB The error happens the after the script exits. It happen more consistently when I use MDB_NOSYNC

====================script====================

use strict; use warnings; use CHI; use LMDB_File qw(MDB_NOSYNC); use Benchmark qw(cmpthese); use File::Temp qw(tempdir);

my $lmdb_root_dir = tempdir(); my $file_root_dir = tempdir();

my $lmdb_chi = CHI->new( driver => 'LMDB', root_dir => $lmdb_root_dir, flags => MDB_NOSYNC); my $file_chi = CHI->new( driver => 'File', root_dir => $file_root_dir);

my $data = "0" x 1000; cmpthese(0, { 'File' => sub { $file_chi->set(int(rand(10000)),$data); }, 'LMDB' => sub { $lmdb_chi->set(int(rand(10000)),$data); }, });

rouzier commented 9 years ago

Were you able to replicate the issue?

salortiz commented 9 years ago

No, I can't replicate the issue, but I think was resolved with commit a95e7489bbe657a0acf8937ee76de4a7662e1e57.

Can you verify that? Thanks.

rouzier commented 9 years ago

It is not happening anymore for me.