Skip Menu |
Report information
Id: 131214
Status: pending release
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: public [at] khwilliamson.com
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Date: Wed, 26 Apr 2017 12:21:49 -0600
To: perlbug [...] perl.org
Subject: readdir_r is deprecated
From: Karl Williamson <public [...] khwilliamson.com>
This is a bug report for perl from khw@khw.(none), generated with the help of perlbug 1.40 running under perl 5.26.0. ----------------------------------------------------------------- glibc 2.24 deprecates readdir_r. And, compiling perl creates annoying warning noise. Starting with that version, plain readdir is reentrant, but not if two threads share a stream. For those, it recommends using readdir with synchronization exclusion (i.e., mutexes I suppose). A man page is attached. ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.26.0: Configured by khw at Mon Apr 24 08:31:45 MDT 2017. Summary of my perl5 (revision 5 version 26 subversion 0) configuration: Commit id: 63e6b12834233dc9b98f2b7b63611f958aa88cc6 Platform: osname=linux osvers=4.10.0-19-generic archname=x86_64-linux-thread-multi-ld uname='linux khw 4.10.0-19-generic #21-ubuntu smp thu apr 6 17:04:57 utc 2017 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Uversiononly -Dprefix=/home/khw/blead -Dusedevel -D'optimize=-ggdb3' -A'optimize=-ggdb3' -A'optimize=-O0' -Accflags='-DPERL_BOOL_AS_CHAR' -Accflags='-DPERL_EXTERNAL_GLOB' -Dman1dir=none -Dman3dir=none -Dcc=g++ -DDEBUGGING -Dusemorebits -Dusecbacktrace -Dusethreads' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=define usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='g++' ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR -DPERL_EXTERNAL_GLOB -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' optimize='-ggdb3 -ggdb3 -O0' cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR -DPERL_EXTERNAL_GLOB -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='6.3.0 20170406' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='long double' nvsize=16 Off_t='off_t' lseeksize=8 alignbytes=16 prototype=define Linker and Libraries: ld='g++' ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/include/c++/6 /usr/include/x86_64-linux-gnu/c++/6 /usr/include/c++/6/backward /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.24.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.24' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E' cccdlflags='-fPIC' lddlflags='-shared -ggdb3 -ggdb3 -O0 -L/usr/local/lib -fstack-protector-strong' --- @INC for perl 5.26.0: /home/khw/perl/blead/lib /home/khw/perl/blead/t /home/khw/blead/lib/perl5/site_perl/5.26.0/x86_64-linux-thread-multi-ld /home/khw/blead/lib/perl5/site_perl/5.26.0 /home/khw/blead/lib/perl5/5.26.0/x86_64-linux-thread-multi-ld /home/khw/blead/lib/perl5/5.26.0 /home/khw/blead/lib/perl5/site_perl/5.25.12 /home/khw/blead/lib/perl5/site_perl/5.25.11 /home/khw/blead/lib/perl5/site_perl/5.25.10 /home/khw/blead/lib/perl5/site_perl/5.25.9 /home/khw/blead/lib/perl5/site_perl/5.25.8 /home/khw/blead/lib/perl5/site_perl/5.25.7 /home/khw/blead/lib/perl5/site_perl/5.25.6 /home/khw/blead/lib/perl5/site_perl/5.25.5 /home/khw/blead/lib/perl5/site_perl/5.25.4 /home/khw/blead/lib/perl5/site_perl/5.25.3 /home/khw/blead/lib/perl5/site_perl/5.25.2 /home/khw/blead/lib/perl5/site_perl/5.25.1 /home/khw/blead/lib/perl5/site_perl/5.24.0 /home/khw/blead/lib/perl5/site_perl/5.23.10 /home/khw/blead/lib/perl5/site_perl/5.23.9 /home/khw/blead/lib/perl5/site_perl/5.23.8 /home/khw/blead/lib/perl5/site_perl/5.23.7 /home/khw/blead/lib/perl5/site_perl/5.23.6 /home/khw/blead/lib/perl5/site_perl/5.23.5 /home/khw/blead/lib/perl5/site_perl/5.23.4 /home/khw/blead/lib/perl5/site_perl/5.23.3 /home/khw/blead/lib/perl5/site_perl/5.23.2 /home/khw/blead/lib/perl5/site_perl/5.23.1 /home/khw/blead/lib/perl5/site_perl/5.23.0 /home/khw/blead/lib/perl5/site_perl/5.22.0 /home/khw/blead/lib/perl5/site_perl/5.21.12 /home/khw/blead/lib/perl5/site_perl/5.21.11 /home/khw/blead/lib/perl5/site_perl/5.21.10 /home/khw/blead/lib/perl5/site_perl/5.21.9 /home/khw/blead/lib/perl5/site_perl/5.21.8 /home/khw/blead/lib/perl5/site_perl/5.21.7 /home/khw/blead/lib/perl5/site_perl/5.21.6 /home/khw/blead/lib/perl5/site_perl/5.21.5 /home/khw/blead/lib/perl5/site_perl/5.21.4 /home/khw/blead/lib/perl5/site_perl/5.21.3 /home/khw/blead/lib/perl5/site_perl/5.21.2 /home/khw/blead/lib/perl5/site_perl/5.21.1 /home/khw/blead/lib/perl5/site_perl/5.20.0 /home/khw/blead/lib/perl5/site_perl/5.19.12 /home/khw/blead/lib/perl5/site_perl/5.19.11 /home/khw/blead/lib/perl5/site_perl/5.19.10 /home/khw/blead/lib/perl5/site_perl --- Environment for perl 5.26.0: HOME=/home/khw LANG=en_US.UTF-8 LANGUAGE=en_US LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/lib/ccache:/home/khw/bin:/home/khw/perl5/perlbrew/bin:/home/khw/print/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/usr/local/games:/home/khw/iands/www:/home/khw/cxoffice/bin PERL5OPT=-w PERL_BADLANG (unset) PERL_DIFF_TOOL=wgdiff PERL_POD_PEDANTIC=1 SHELL=/bin/ksh
Download readdir_r.txt
text/plain 4.2k

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

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 599b
On Wed, 26 Apr 2017 11:24:08 -0700, public@khwilliamson.com wrote: Show quoted text
> glibc 2.24 deprecates readdir_r. And, compiling perl creates annoying > warning noise. > > Starting with that version, plain readdir is reentrant, but not if two > threads share a stream. For those, it recommends using readdir with > synchronization exclusion (i.e., mutexes I suppose). > > A man page is attached.
This is something we'd need to detect, somehow. POSIX still defines readdir_r() and doesn't require that readdir() be thread-safe (though that may change, see http://austingroupbugs.net/view.php?id=696 ) Tony
To: perl5-porters [...] perl.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
Date: Wed, 24 May 2017 09:46:59 +0200
CC: perlbug-followup [...] perl.org
Subject: Re: [perl #131214] readdir_r is deprecated
On Tue, 23 May 2017 19:11:24 -0700, "Tony Cook via RT" <perlbug-followup@perl.org> wrote: Show quoted text
> On Wed, 26 Apr 2017 11:24:08 -0700, public@khwilliamson.com wrote:
> > glibc 2.24 deprecates readdir_r. And, compiling perl creates annoying > > warning noise. > > > > Starting with that version, plain readdir is reentrant, but not if two > > threads share a stream. For those, it recommends using readdir with > > synchronization exclusion (i.e., mutexes I suppose). > > > > A man page is attached.
> > This is something we'd need to detect, somehow. > > POSIX still defines readdir_r() and doesn't require that readdir() be thread-safe (though that may change, see http://austingroupbugs.net/view.php?id=696 )
This has already been addressed in branch arc_readdir_after5260 Aaron promised to merge after 5.26.0 -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.25 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Download (untitled)
application/pgp-signature 473b

Message body not shown because it is not plain text.

Date: Sat, 27 May 2017 19:15:07 +0200
To: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>, perl5-porters [...] perl.org
From: Sawyer X <xsawyerx [...] gmail.com>
Subject: Re: [perl #131214] readdir_r is deprecated
CC: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 906b
On 05/24/2017 09:46 AM, H.Merijn Brand wrote: Show quoted text
> On Tue, 23 May 2017 19:11:24 -0700, "Tony Cook via RT" > <perlbug-followup@perl.org> wrote: >
>> On Wed, 26 Apr 2017 11:24:08 -0700, public@khwilliamson.com wrote:
>>> glibc 2.24 deprecates readdir_r. And, compiling perl creates annoying >>> warning noise. >>> >>> Starting with that version, plain readdir is reentrant, but not if two >>> threads share a stream. For those, it recommends using readdir with >>> synchronization exclusion (i.e., mutexes I suppose). >>> >>> A man page is attached.
>> This is something we'd need to detect, somehow. >> >> POSIX still defines readdir_r() and doesn't require that readdir() be thread-safe (though that may change, see http://austingroupbugs.net/view.php?id=696 )
> This has already been addressed in branch arc_readdir_after5260 > Aaron promised to merge after 5.26.0
This can be merged into blead-next.
RT-Send-CC: xsawyerx [...] gmail.com, h.m.brand [...] xs4all.nl, perl5-porters [...] perl.org, arc [...] cpan.org
On Sat, 27 May 2017 10:15:59 -0700, xsawyerx@gmail.com wrote: Show quoted text
> > > On 05/24/2017 09:46 AM, H.Merijn Brand wrote:
> > On Tue, 23 May 2017 19:11:24 -0700, "Tony Cook via RT" > > <perlbug-followup@perl.org> wrote: > >
> >> On Wed, 26 Apr 2017 11:24:08 -0700, public@khwilliamson.com wrote:
> >>> glibc 2.24 deprecates readdir_r. And, compiling perl creates > >>> annoying > >>> warning noise. > >>> > >>> Starting with that version, plain readdir is reentrant, but not if > >>> two > >>> threads share a stream. For those, it recommends using readdir > >>> with > >>> synchronization exclusion (i.e., mutexes I suppose). > >>> > >>> A man page is attached.
> >> This is something we'd need to detect, somehow. > >> > >> POSIX still defines readdir_r() and doesn't require that readdir() > >> be thread-safe (though that may change, see > >> http://austingroupbugs.net/view.php?id=696 )
> > This has already been addressed in branch arc_readdir_after5260 > > Aaron promised to merge after 5.26.0
> > This can be merged into blead-next.
This is on our blockers list for 5.28. Did this merge ever happen? -- Karl Williamson
CC: h.m.brand [...] xs4all.nl, perl5-porters [...] perl.org, arc [...] cpan.org
Subject: Re: [perl #131214] readdir_r is deprecated
Date: Tue, 20 Mar 2018 22:20:09 +0200
From: Sawyer X <xsawyerx [...] gmail.com>
To: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On 03/20/2018 01:23 AM, Karl Williamson via RT wrote: Show quoted text
> On Sat, 27 May 2017 10:15:59 -0700, xsawyerx@gmail.com wrote:
>> >> On 05/24/2017 09:46 AM, H.Merijn Brand wrote:
>>> On Tue, 23 May 2017 19:11:24 -0700, "Tony Cook via RT" >>> <perlbug-followup@perl.org> wrote: >>>
>>>> On Wed, 26 Apr 2017 11:24:08 -0700, public@khwilliamson.com wrote:
>>>>> glibc 2.24 deprecates readdir_r. And, compiling perl creates >>>>> annoying >>>>> warning noise. >>>>> >>>>> Starting with that version, plain readdir is reentrant, but not if >>>>> two >>>>> threads share a stream. For those, it recommends using readdir >>>>> with >>>>> synchronization exclusion (i.e., mutexes I suppose). >>>>> >>>>> A man page is attached.
>>>> This is something we'd need to detect, somehow. >>>> >>>> POSIX still defines readdir_r() and doesn't require that readdir() >>>> be thread-safe (though that may change, see >>>> http://austingroupbugs.net/view.php?id=696 )
>>> This has already been addressed in branch arc_readdir_after5260 >>> Aaron promised to merge after 5.26.0
>> This can be merged into blead-next.
> This is on our blockers list for 5.28. Did this merge ever happen?
I found this: c6709bf9918ed61b4a7a0ad24887085bdf1732c9.
RT-Send-CC: perl5-porters [...] perl.org
I'm closing it then. -- Karl Williamson


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org