develooper Front page | perl.perl5.porters | Postings from June 2008

Re: Linux::Smaps kernel/perlio dependencies

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
June 3, 2008 03:59
Subject:
Re: Linux::Smaps kernel/perlio dependencies
Message ID:
20080603125853.2454ad17@pc09.procura.nl
On Tue, 3 Jun 2008 11:04:00 +0200, Torsten Foertsch
<torsten.foertsch@gmx.net> wrote:

> Hi,
> 
> I have recently got a bug report about Linux::Smaps. The poster said it'd
> report 2 [vdso] areas and that it can be cured if /proc/self/smaps is opened
> with '<:stdio'. Later on he also found the behavior depends on the kernel
> version, 2.6.25.3 shows 2 vdsos 2.6.23.1-21 only one.
> 
> Since I don't have any of these kernels I am asking for help. To all of my
> knowledge multiple vdsos is nonsense. But is it a kernel bug or a bug in the
> perlio layer?
> 
> Could you please run the following command on various combinations of linux
> kernel and perlio?
> 
> PERLIO="stdio" perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
>   open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
>   $_="$.\t$_"' | grep vdso
> 
> It should print 2 almost identical lines. If there are more please report.
> 
> Here an example:
> 
> $ PERLIO="stdio" perl -pe 'BEGIN {my $smaps="/proc/$$/smaps"; open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"} $_="$.\t$_"'|grep vdso
>    321  ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> 321     ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
> 
> Keep in mind that /proc/$$/smaps exists only for kernels >=2.6.14.

2.6.18.8-0.7-default #1 SMP Tue Oct 2 17:21:08 UTC 2007 i686 i686 i386
GNU/Linux
v5.8.8 built for i586-linux-thread-multi
$ env PERLIO=stdio perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
      open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
      $_="$.\t$_"'|grep vdso
   361  ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vdso]
369     ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vdso]

2.6.18.8-0.7-default #1 SMP Tue Oct 2 17:21:08 UTC 2007 i686 i686 i386 GNU/Linux
v5.8.8-dor built for x86_64-linux
$ env PERLIO=stdio perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
      open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
      $_="$.\t$_"'|grep vdso
   361  ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vdso]
369     ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vdso]

2.6.22.17-0.1-default #1 SMP 2008/02/10 20:01:04 UTC i686 i686 i386
GNU/Linux
v5.10.0 built for i686-linux-64int
$ env PERLIO=stdio perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
      open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
      $_="$.\t$_"'|grep vdso
   345  ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
353     ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]

2.6.18.8-0.7-default #1 SMP Tue Oct 2 17:21:08 UTC 2007 i686 i686 i386 GNU/Linux
v5.8.8-dor built for i686-linux-64int
$ env PERLIO=stdio perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
      open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
      $_="$.\t$_"'|grep vdso
   246  b7f3c000-b7f3d000 r-xp b7f3c000 00:00 0          [vdso]
253     b7f3c000-b7f3d000 r-xp b7f3c000 00:00 0          [vdso]

2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
v5.8.8-dor built for x86_64-linux
$ env PERLIO=stdio perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
      open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
      $_="$.\t$_"'|grep vdso
316     ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]


-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About