List Info

Thread: Re: Test failures on amd64-freebsd 6.2




Re: Test failures on amd64-freebsd 6.2
user name
2007-09-19 14:56:00
David Landgren <davidlandgren.net> writes:

> sreziccpan.org (via RT) wrote:
> > # New Ticket Created by  sreziccpan.org
# Please include the
> > string:  [perl #45513]
> > # in the subject line of all future correspondence
about this issue.
> > # <URL: h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=45513 >
> > This is a bug report for perl from sreziccpan.org,
> > generated with the help of perlbug 1.36 running
under perl 5.10.0.
> >
------------------------------------------------------------
-----
> > [Please enter your report here]
> > With bleedperl I get the following test failures:
> >
t/io/pipe...................................................
..FAILED--expected
> > 24 tests, saw 8
> >
ext/IO/t/io_pipe............................................
..FAILED--expected
> > 10 tests, saw 8
> >
ext/Time/HiRes/t/HiRes......................................
..
> > ../ext/Time/HiRes/t/HiRes.t: overall time allowed
for tests (90s) exceeded!
> > FAILED--expected 38 tests, saw 11
> > The following two look fishy, but do not generate
a failure:
> >
ext/IPC/SysV/t/ipcsysv......................................
..#
> > cannot proceed: semget() error: No space left on
device
> > ok
> 
> This at least is normal, it's a question of resource
acquisition. I
> think your kernel semaphore configuration is lower than
the amount of
> semaphores the test wants to use.
> 
> That should probably be a skip(), come to think of it.
> 

Or just lower the number of semaphores to acquire. I only
seem to have
three semaphores used on my system:

$ ipcs -s
Semaphores:
T           ID          KEY MODE        OWNER    GROUP   
s        65536      5432001 --rw-------    pgsql    pgsql
s        65537      5432002 --rw-------    pgsql    pgsql
s        65538      5432003 --rw-------    pgsql    pgsql

These kernel limits seem to apply to semaphores:

kern.ipc.semaem: 16384
kern.ipc.semvmx: 32767
kern.ipc.semusz: 104
kern.ipc.semume: 10
kern.ipc.semopm: 100
kern.ipc.semmsl: 60
kern.ipc.semmnu: 30
kern.ipc.semmns: 60
kern.ipc.semmni: 10
kern.ipc.semmap: 30

Maybe one of the both limits with the value "10"
are hitting here
(including some kind of off-by-one error), because if I
reduce the
number of semaphores created by the test from 10 to 9, then
the test
passes without problems.

I propose the following patch:

--- bleedperl-amd64/ext/IPC/SysV/t/ipcsysv.t	Tue Jun 13
21:29:08 2006
+++ bleedperl2-amd64/ext/IPC/SysV/t/ipcsysv.t	Wed Sep 19
21:49:03 2007
 -148,8
+148,11  SKIP: {
 
     use IPC::SysV qw(IPC_CREAT GETALL SETALL);
 
+    # FreeBSD's default limit seems to be 9
+    my $nsem = 5;
+
     my $test_name = 'sem acquire';
-    $sem = semget(IPC_PRIVATE, 10, $perm | IPC_CREAT);
+    $sem = semget(IPC_PRIVATE, $nsem, $perm | IPC_CREAT);
     if ($sem) {
         pass($test_name);
     }
 -166,8
+169,6  SKIP: {
     ok(semctl($sem,0,IPC_STAT,$data),'sem data call');
     
     cmp_ok(length($data),'>',0,'sem data len');
-
-    my $nsem = 10;
 
     ok(semctl($sem,0,SETALL,pack("s!*",(0) x
$nsem)), 'set all sems');
 



-- 
Slaven Rezic - slaven <at> rezic <dot> de

    tksm - Perl/Tk program for searching and replacing in
multiple files
    http://ptktools
.sourceforge.net/#tksm

Re: Test failures on amd64-freebsd 6.2
user name
2007-09-21 10:02:35
Slaven Rezic wrote:
> David Landgren <davidlandgren.net> writes:
> 
>> sreziccpan.org (via RT) wrote:
>>> # New Ticket Created by  sreziccpan.org
# Please include the
>>> string:  [perl #45513]
>>> # in the subject line of all future
correspondence about this issue.
>>> # <URL: h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=45513 >
>>> This is a bug report for perl from sreziccpan.org,
>>> generated with the help of perlbug 1.36 running
under perl 5.10.0.
>>>
------------------------------------------------------------
-----
>>> [Please enter your report here]
>>> With bleedperl I get the following test
failures:
>>>
t/io/pipe...................................................
..FAILED--expected
>>> 24 tests, saw 8
>>>
ext/IO/t/io_pipe............................................
..FAILED--expected
>>> 10 tests, saw 8
>>>
ext/Time/HiRes/t/HiRes......................................
..
>>> ../ext/Time/HiRes/t/HiRes.t: overall time
allowed for tests (90s) exceeded!
>>> FAILED--expected 38 tests, saw 11
>>> The following two look fishy, but do not
generate a failure:
>>>
ext/IPC/SysV/t/ipcsysv......................................
..#
>>> cannot proceed: semget() error: No space left
on device
>>> ok
>> This at least is normal, it's a question of
resource acquisition. I
>> think your kernel semaphore configuration is lower
than the amount of
>> semaphores the test wants to use.
>>
>> That should probably be a skip(), come to think of
it.
>>
> 
> Or just lower the number of semaphores to acquire. I
only seem to have
> three semaphores used on my system:
> 
> $ ipcs -s
> Semaphores:
> T           ID          KEY MODE        OWNER    GROUP 
 
> s        65536      5432001 --rw-------    pgsql   
pgsql
> s        65537      5432002 --rw-------    pgsql   
pgsql
> s        65538      5432003 --rw-------    pgsql   
pgsql
> 
> These kernel limits seem to apply to semaphores:
> 
> kern.ipc.semaem: 16384
> kern.ipc.semvmx: 32767
> kern.ipc.semusz: 104
> kern.ipc.semume: 10
> kern.ipc.semopm: 100
> kern.ipc.semmsl: 60
> kern.ipc.semmnu: 30
> kern.ipc.semmns: 60
> kern.ipc.semmni: 10
> kern.ipc.semmap: 30
> 
> Maybe one of the both limits with the value
"10" are hitting here
> (including some kind of off-by-one error), because if I
reduce the
> number of semaphores created by the test from 10 to 9,
then the test
> passes without problems.
> 
> I propose the following patch:
> 
> --- bleedperl-amd64/ext/IPC/SysV/t/ipcsysv.t	Tue Jun 13
21:29:08 2006
> +++ bleedperl2-amd64/ext/IPC/SysV/t/ipcsysv.t	Wed Sep
19 21:49:03 2007
>  -148,8 +148,11  SKIP: {
>  
>      use IPC::SysV qw(IPC_CREAT GETALL SETALL);
>  
> +    # FreeBSD's default limit seems to be 9
> +    my $nsem = 5;

Maybe 10 was chosen because it exercises problems on other
platforms? So...

	my $nsem = $^O eq 'freebsd' ? 5 : 10;

David

> +
>      my $test_name = 'sem acquire';
> -    $sem = semget(IPC_PRIVATE, 10, $perm |
IPC_CREAT);
> +    $sem = semget(IPC_PRIVATE, $nsem, $perm |
IPC_CREAT);
>      if ($sem) {
>          pass($test_name);
>      }
>  -166,8 +169,6  SKIP: {
>      ok(semctl($sem,0,IPC_STAT,$data),'sem data
call');
>      
>      cmp_ok(length($data),'>',0,'sem data len');
> -
> -    my $nsem = 10;
>  
>      ok(semctl($sem,0,SETALL,pack("s!*",(0) x
$nsem)), 'set all sems');
>  
> 
> 
> 



Re: Test failures on amd64-freebsd 6.2
user name
2007-09-25 08:17:01
On 19 Sep 2007 21:56:00 +0200, Slaven Rezic <slavenrezic.de> wrote:
> Or just lower the number of semaphores to acquire. I
only seem to have
> three semaphores used on my system:
>
> $ ipcs -s
> Semaphores:
> T           ID          KEY MODE        OWNER    GROUP
> s        65536      5432001 --rw-------    pgsql   
pgsql
> s        65537      5432002 --rw-------    pgsql   
pgsql
> s        65538      5432003 --rw-------    pgsql   
pgsql
>
> These kernel limits seem to apply to semaphores:
>
> kern.ipc.semaem: 16384
> kern.ipc.semvmx: 32767
> kern.ipc.semusz: 104
> kern.ipc.semume: 10
> kern.ipc.semopm: 100
> kern.ipc.semmsl: 60
> kern.ipc.semmnu: 30
> kern.ipc.semmns: 60
> kern.ipc.semmni: 10
> kern.ipc.semmap: 30
>
> Maybe one of the both limits with the value
"10" are hitting here
> (including some kind of off-by-one error), because if I
reduce the
> number of semaphores created by the test from 10 to 9,
then the test
> passes without problems.
>
> I propose the following patch:


Thanks, applied as #31967.

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )