<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
Le 3/3/12 12:04 AM, Florent Angly a écrit :
<blockquote cite="mid:4F5151FA.5020506@gmail.com" type="cite">Hi
Olivier,
<br>
<br>
Do you have an simple example that reproduces this error?
<br>
</blockquote>
I have put a sample script extracted from berkeleydb3.pm to
reproduce the error in the bug<br>
<blockquote cite="mid:4F5151FA.5020506@gmail.com" type="cite">
<br>
The syntax for tying to a DB_File is, according to `perldoc
DB_File`:
<br>
<blockquote type="cite">[$X =] tie %hash, 'DB_File', [$filename,
$flags, $mode, $DB_HASH] ;
<br>
[$X =] tie %hash, 'DB_File', $filename, $flags, $mode,
$DB_BTREE ;
<br>
</blockquote>
So, the order of the parameters is important and you cannot simply
interchange them.
<br>
</blockquote>
I don't, it is upstream.... ;-)<br>
In the perldoc
(<a class="moz-txt-link-freetext" href="http://perldoc.perl.org/DB_File.html#Using-DB_File-with-Berkeley-DB-version-2-or-greater">http://perldoc.perl.org/DB_File.html#Using-DB_File-with-Berkeley-DB-version-2-or-greater</a>)
examples there is:<br>
<meta charset="utf-8">
<span style="color: rgb(38, 38, 38); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; "> </span><a
class="l_k" href="http://perldoc.perl.org/functions/tie.html"
style="color: rgb(102, 102, 102); font-weight: bold; font-family:
monospace; font-size: 12px; font-style: normal; font-variant:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: pre-wrap; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(238, 238, 221); ">tie</a><span style="color:
rgb(38, 38, 38); font-family: monospace; font-size: 12px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: pre-wrap; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(238, 238, 221); display: inline !important;
float: none; "> </span><span class="i" style="color: rgb(0, 104,
139); font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">%h</span><span class="cm" style="color: rgb(0, 0, 0);
font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">,</span><span style="color: rgb(38, 38, 38); font-family:
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; "> </span><span
class="q" style="color: rgb(205, 85, 85); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">"DB_File"</span><span class="cm" style="color: rgb(0, 0,
0); font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">,</span><span style="color: rgb(38, 38, 38); font-family:
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; "> </span><span
class="q" style="color: rgb(205, 85, 85); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">"tree"</span><span class="cm" style="color: rgb(0, 0, 0);
font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">,</span><span style="color: rgb(38, 38, 38); font-family:
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; "> </span><span
class="w" style="color: rgb(0, 0, 0); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">O_RDWR</span><span style="color: rgb(38, 38, 38);
font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; ">|</span><span
class="w" style="color: rgb(0, 0, 0); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">O_CREAT</span><span class="cm" style="color: rgb(0, 0, 0);
font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">,</span><span style="color: rgb(38, 38, 38); font-family:
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; "> </span><span
class="n" style="color: rgb(180, 82, 205); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">0666</span><span class="cm" style="color: rgb(0, 0, 0);
font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: pre-wrap;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">,</span><span style="color: rgb(38, 38, 38); font-family:
monospace; font-size: 12px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); display: inline !important; float: none; "> </span><span
class="i" style="color: rgb(0, 104, 139); font-family: monospace;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(238, 238,
221); ">$DB_BTREE</span><span style="color: rgb(38, 38, 38);
font-family: monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-indent: 0px; text-transform:
none; white-space: pre-wrap; widows: 2; word-spacing: 0px;
background-color: rgb(238, 238, 221); display: inline ! important;
float: none;"> <br>
<br>
while in the berkeleydb3.pm there is <br>
</span>
<meta charset="utf-8">
<pre class="message" style="font-family: monospace; padding-top: 0px; margin-top: 0px; border-top-width: 0px; border-top-style: initial; border-top-color: initial; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254); "> tie %sort,'DB_File',$name,0666,O_CREAT|O_RDWR,$numeric_cmp
In the patch I propose, I set "<span style="color: rgb(38, 38, 38); font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 221); display: inline !important; float: none; "></span><span class="w" style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 221); ">O_RDWR</span><span style="color: rgb(38, 38, 38); font-family: monospac
e; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 221); display: inline !important; float: none; ">|</span><span class="w" style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 221); ">O_CREAT</span><span class="cm" style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: norm
al; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 221); ">,</span><span style="color: rgb(38, 38, 38); font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 221); display: inline !important; float: none; "> </span><span class="n" style="color: rgb(180, 82, 205); font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-tran
sform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; background-color: rgb(238, 238, 221);">0666" instead of </span>"0666,O_CREAT|O_RDWR".</pre>
Si it is upstream that put parameters in the wrong order.<br>
Though it works in a previous perl on a Reat Hat system I tested.<br>
<br>
<blockquote cite="mid:4F5151FA.5020506@gmail.com" type="cite">
<br>
The Perl module in question is at
<a class="moz-txt-link-freetext" href="https://github.com/bioperl/bioperl-live/blob/master/Bio/DB/SeqFeature/Store/berkeleydb3.pm">https://github.com/bioperl/bioperl-live/blob/master/Bio/DB/SeqFeature/Store/berkeleydb3.pm</a>.
The calling script has created and opened a temporary file and it
is trying to put a Berkeley database in this temporary file. This
Berkeley DB creation step fails. I suspect that it may be a
permission problem... Does the mode 0644 solve the problem? Is
there enough space on the disk?
<br>
<br>
Running the script as follows will help diagnostic what went
wrong:
<br>
<blockquote type="cite">perl -d `which bp_seqfeature_load.pl`
[options]
<br>
</blockquote>
Then press 'c' and send the entire backtrace of the crash when it
happens.
<br>
</blockquote>
There is no crash, the error is raised and script ends.<br>
<blockquote cite="mid:4F5151FA.5020506@gmail.com" type="cite">
<br>
Best,
<br>
<br>
Florent
<br>
<br>
<br>
<br>
<br>
On 01/03/12 20:23, Olivier Sallou wrote:
<br>
<blockquote type="cite">Package: bioperl
<br>
Version: 1.6.901-2
<br>
Severity: important
<br>
Tags: upstream
<br>
<br>
When using bp_seqfeature_load.pl I have an error at
build_summary_statistics call time of berkeleydb3.pm:
<br>
Couldn't create temporary file for sorting: Inappropriate
ioctl for device
<br>
It occurs in berkeleydb3.pm line 500
<br>
<br>
Looking at the code I tried to manipulate it replacing
<br>
my $s = tie
%sort,'DB_File',$name,0666,O_CREAT|O_RDWR,$numeric_cmp
<br>
by
<br>
my $s = tie
%sort,'DB_File',$name,O_CREAT|O_RDWR,0666,$numeric_cmp
<br>
<br>
and the error disappear.
<br>
<br>
I used below sample code to test:
<br>
<br>
require File::Temp;
<br>
use File::Temp ();
<br>
use File::Temp qw/ :seekable /;
<br>
use base 'Bio::DB::SeqFeature::Store::berkeleydb';
<br>
use DB_File;
<br>
use Fcntl qw(O_RDWR O_CREAT :flock);
<br>
<br>
my $fh = File::Temp->new() or die("Couldn't create
temporary file for sorting: $!");
<br>
my $name = $fh->filename;
<br>
my %sort;
<br>
my $numeric_cmp = DB_File::BTREEINFO->new;
<br>
$numeric_cmp->{compare} = sub { $_[0]<=> $_[1] };
<br>
$numeric_cmp->{flags} = R_DUP;
<br>
my $s = tie
%sort,'DB_File',$name,0666,O_CREAT|O_RDWR,$numeric_cmp
<br>
#my $s = tie
%sort,'DB_File',$name,O_CREAT|O_RDWR,0666,$numeric_cmp
<br>
or die("Couldn't create temporary file for sorting:
$!");
<br>
<br>
<br>
<br>
However the same code works fine on a Red Hat on an other system
(not same perl version).
<br>
So I do not know if my fix is a correct fix, it just make the
error disappear.
<br>
If I look at perldoc for DB_File I see examples like:
<br>
tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0666, $DB_HASH
;
<br>
so it seems that 0666 should be set after O_CREAT....
<br>
<br>
-- System Information:
<br>
Debian Release: wheezy/sid
<br>
APT prefers unstable
<br>
APT policy: (500, 'unstable'), (500, 'stable')
<br>
Architecture: amd64 (x86_64)
<br>
<br>
Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
<br>
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
<br>
Shell: /bin/sh linked to /bin/dash
<br>
<br>
Versions of packages bioperl depends on:
<br>
ii libbio-perl-perl 1.6.901-2 BioPerl core perl
modules
<br>
ii perl 5.14.2-7 Larry Wall's
Practical Extraction
<br>
<br>
Versions of packages bioperl recommends:
<br>
ii bioperl-run 1.6.9-1 BioPerl wrappers:
scripts
<br>
ii libace-perl 1.92-2+b2 Object-Oriented
Access to ACEDB Da
<br>
ii libapache-dbi-perl 1.11-1 interface
connecting apache server
<br>
ii libbio-perl-run-perl 1.6.9-1 BioPerl wrappers:
modules
<br>
ii libcache-cache-perl 1.06-2 Managed caches of
persistent infor
<br>
ii libdbi-perl 1.618-1 Perl Database
Interface (DBI)
<br>
ii libgd-gd2-perl 1:2.46-3+b1 Perl module wrapper
for libgd - gd
<br>
ii libhttp-message-perl 6.03-1 perl interface to
HTTP style messa
<br>
ii liblist-moreutils-perl 0.33-1+b1 Perl module with
additional list f
<br>
ii libset-scalar-perl 1.25-1 Perl interface for
operations on f
<br>
ii liburi-perl 1.59-1 module to
manipulate and access UR
<br>
ii libwww-perl 6.01-3 simple and
consistent interface to
<br>
ii libxml-simple-perl 2.18-3 Perl module for
reading and writin
<br>
ii libxml-twig-perl 1:3.39-1 Perl module for
processing huge XM
<br>
ii libyaml-perl 0.80-1 YAML Ain't Markup
Language
<br>
ii perl-doc 5.14.2-7 Perl documentation
<br>
<br>
Versions of packages bioperl suggests:
<br>
ii groff-base 1.21-6 GNU troff
text-formatting system (
<br>
<br>
-- no debconf information
<br>
<br>
<br>
<br>
_______________________________________________
<br>
Debian-med-packaging mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Debian-med-packaging@lists.alioth.debian.org">Debian-med-packaging@lists.alioth.debian.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging</a>
<br>
</blockquote>
<br>
<br>
_______________________________________________
<br>
Debian-med-packaging mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Debian-med-packaging@lists.alioth.debian.org">Debian-med-packaging@lists.alioth.debian.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95
gpg key id: 4096R/326D8438 (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
</pre>
</body>
</html>