Closed p5pRT closed 10 years ago
Hello\,
I am seeing several systems behaving strangely (details below) in regards to abs_path. I am still tracing this out and wanted to post the details for reference and in case one of you gurus see what the cause could be right off hand\, thanks!
[ -- Working server -- ]
# perl -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' Defined: /etc
[ -- Affected server -- ]
# perl -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' Undefined
[ -- lower level -- ]
If I add debug output before and after line 156 in Cwd.xs like so:
printf("DEBUG Before %d %s\n"\, errno\, resolved); struct stat sb; if (lstat(resolved\, &sb) != 0) { printf("DEBUG After %d %s\n"\, errno\, resolved); if (errno == ENOENT && p == NULL) { errno = serrno; return (resolved); } return (NULL); } printf("DEBUG I got past the return(NULL) above");
and rebuild it\, then we now see that errno was changed from ENOENT to EINVAL and thus the return(NULL) is triggered:
# perl -I. -I./blib/arch -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' DEBUG Before 2 /etc DEBUG After 22 /etc Undefined
It is the same if we change lstat() to PerlLIO_lstat()
[ -- misc info -- ]
Both servers are • 64 bit • CentOS release 5.5 (Final) • Using Cwd 3.33 (but installing older version results in the same behavior) • have “d_lstat” set to “define”
Working server: • This is perl\, v5.8.8 built for x86_64-linux • from RPM: perl.x86_64 4:5.8.8-32.el5_5.2 (another affected server had perl.x86_64 4:5.8.8-27.el5 installed)
Affected server (the server this perlbug was sent from): • This is perl\, v5.8.8 built for x86_64-linux-thread-multi • from RPM: perl.x86_64 4:5.8.8-32.el5_5.1 (another affected server had perl.x86_64 4:5.8.8-27.el5 installed)
A diff of the output of:
perl -MConfig -e 'for $k (sort keys %Config) { print "$k:$Config{$k}\n"; }'
on each box is attached to https://rt.cpan.org/Ticket/Display.html?id=65379
On Thu Feb 17 09:07:03 2011\, dmuey wrote:
Hello\,
I am seeing several systems behaving strangely (details below) in regards to abs_path. I am still tracing this out and wanted to post the details for reference and in case one of you gurus see what the cause could be right off hand\, thanks!
[ -- Working server -- ]
\# perl \-MCwd \-Mstrict \-wle 'my $etc = Cwd​::abs\_path\("/etc"\);if
(defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' Defined: /etc
[ -- Affected server -- ]
\# perl \-MCwd \-Mstrict \-wle 'my $etc = Cwd​::abs\_path\("/etc"\);if
(defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' Undefined
[ -- lower level -- ]
If I add debug output before and after line 156 in Cwd.xs like so:
printf\("DEBUG Before %d %s\\n"\, errno\, resolved\); struct stat sb; if \(lstat\(resolved\, &sb\) \!= 0\) \{ printf\("DEBUG After %d %s\\n"\, errno\, resolved\); if \(errno == ENOENT && p == NULL\) \{ errno = serrno; return \(resolved\); \} return \(NULL\); \} printf\("DEBUG I got past the return\(NULL\) above"\);
and rebuild it\, then we now see that errno was changed from ENOENT to EINVAL and thus the return(NULL) is triggered:
\# perl \-I\. \-I\./blib/arch \-MCwd \-Mstrict \-wle 'my $etc =
Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' DEBUG Before 2 /etc DEBUG After 22 /etc Undefined
It is the same if we change lstat() to PerlLIO_lstat()
[ -- misc info -- ]
Both servers are • 64 bit • CentOS release 5.5 (Final) • Using Cwd 3.33 (but installing older version results in the same behavior) • have “d_lstat” set to “define”
Working server: • This is perl\, v5.8.8 built for x86_64-linux • from RPM: perl.x86_64 4:5.8.8-32.el5_5.2 (another affected server had perl.x86_64 4:5.8.8-27.el5 installed)
Affected server (the server this perlbug was sent from): • This is perl\, v5.8.8 built for x86_64-linux-thread-multi • from RPM: perl.x86_64 4:5.8.8-32.el5_5.1 (another affected server had perl.x86_64 4:5.8.8-27.el5 installed)
I cannot produce this on Mac OS X. Does the affected server remain right itself if you switch to a non-threaded build?
The RT System itself - Status changed from 'new' to 'open'
I cannot produce this on Mac OS X.
Right\, it is only reproducible on certain machines.
Does the affected server remain right itself if you switch to a non-threaded build?
As a matter of fact it does\, nice!
So it appears to be a (64bit) threading issue …
I cannot produce this on Mac OS X.
Right\, it is only reproducible on certain machines.
Does the affected server remain right itself if you switch to a non-threaded build?
As a matter of fact it does\, nice!
So it appears to be a (64bit) threading issue …
On Thu Feb 24 00:43:58 2011\, webmaster@simplemood.com wrote:
I cannot produce this on Mac OS X.
Right\, it is only reproducible on certain machines.
Does the affected server remain right itself if you switch to a non-threaded build?
As a matter of fact it does\, nice!
So it appears to be a (64bit) threading issue …
Tonight I built a threaded perl on the Dromedary server\, at blead\, and then attempted to reproduce the problem the OP reported in early 2011.
##### sh ./Configure -des -Dusedevel -Dusethreads -Duseithreads make -j8 ##### ./perl -I./lib -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' ##### Defined: /etc #####
Granted\, I did not configure with the long list of arguments the OP did. But this tends not to support the presence of a problem.
Can anyone confirm? Is this ticket closable?
Thank you very much. Jim Keenan
On Fri Sep 06 20:09:25 2013\, jkeenan wrote:
On Thu Feb 24 00:43:58 2011\, webmaster@simplemood.com wrote:
I cannot produce this on Mac OS X.
Right\, it is only reproducible on certain machines.
Does the affected server remain right itself if you switch to a non-threaded build?
As a matter of fact it does\, nice!
So it appears to be a (64bit) threading issue …
Tonight I built a threaded perl on the Dromedary server\, at blead\, and then attempted to reproduce the problem the OP reported in early 2011.
##### sh ./Configure -des -Dusedevel -Dusethreads -Duseithreads make -j8 ##### ./perl -I./lib -MCwd -Mstrict -wle 'my $etc = Cwd::abs_path("/etc");if (defined $etc) { print "Defined: $etc" } else { print "Undefined"; }' ##### Defined: /etc #####
Granted\, I did not configure with the long list of arguments the OP did. But this tends not to support the presence of a problem.
Can anyone confirm? Is this ticket closable?
Thank you very much. Jim Keenan
We have not heard from the original poster in 2-3/4 years. No one has provided evidence that this is not fixed in blead.
So I am taking this ticket for the purpose of closing it within 7 days unless someone objects.
Thank you very much. Jim Keenan
On Sun Nov 24 09:50:35 2013\, jkeenan wrote:
We have not heard from the original poster in 2-3/4 years. No one has provided evidence that this is not fixed in blead.
So I am taking this ticket for the purpose of closing it within 7 days unless someone objects.
Closing as per schedule.
@jkeenan - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#84338 (status was 'resolved')
Searchable as RT84338$