SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Use of uninitialized value in chdir at /usr/local/lib/perl5/
Author Message
Post Use of uninitialized value in chdir at /usr/local/lib/perl5/ 
I believe the error above from BackupPC_nightly is caused by a change to the API
in File::Find. Since all of my backups are in cpool, my pool directory is
completely empty, and trying to do a File::Find(undef) is what is causing the
problem. I've patched my BackupPC_nightly to skip directories that don't exist
and will report success/failure tomorrow.

Simple diff:


*** BackupPC_nightly.orig 2004-07-20 17:27:40.000000000 -0400
--- BackupPC_nightly 2004-07-20 17:29:39.000000000 -0400
***************
*** 148,153 ****
--- 148,154 ----
$fileLinkMax = 0;
$fileCntRename = 0;
%FixList = ();
+ next if ( ! -d "$TopDir/$pool/$dir" );
find({wanted => \&GetPoolStats}, "$TopDir/$pool/$dir");
my $kb = $blkCnt / 2;
my $kbRm = $blkCntRm / 2;


--
Tony Nelson
Director of IT Operations
Starpoint Solutions LLC
115 Broadway, 2nd Fl
New York, NY 10006





This email message from Starpoint Solutions LLC is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it.

Post Use of uninitialized value in chdir at /usr/local/lib/perl5/ 
It appears that my little patch had no effect on the error messages. If I find
some time this afternoon, I will take another look and see if I can find the
trouble spot..

I'm pretty sure this error is specific to Perl 5.8.4.

--
Tony Nelson
Director of IT Operations
Starpoint Solutions LLC
115 Broadway, 2nd Fl
New York, NY 10006


Quoting Tony Nelson <tnelson < at > starpoint.com>:

I believe the error above from BackupPC_nightly is caused by a change to the
API
in File::Find. Since all of my backups are in cpool, my pool directory is
completely empty, and trying to do a File::Find(undef) is what is causing
the
problem. I've patched my BackupPC_nightly to skip directories that don't
exist
and will report success/failure tomorrow.

Simple diff:


*** BackupPC_nightly.orig 2004-07-20 17:27:40.000000000 -0400
--- BackupPC_nightly 2004-07-20 17:29:39.000000000 -0400
***************
*** 148,153 ****
--- 148,154 ----
$fileLinkMax = 0;
$fileCntRename = 0;
%FixList = ();
+ next if ( ! -d "$TopDir/$pool/$dir" );
find({wanted => \&GetPoolStats}, "$TopDir/$pool/$dir");
my $kb = $blkCnt / 2;
my $kbRm = $blkCntRm / 2;


--
Tony Nelson
Director of IT Operations
Starpoint Solutions LLC
115 Broadway, 2nd Fl
New York, NY 10006





This email message from Starpoint Solutions LLC is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply email and destroy all copies of the original message. Opinions,
conclusions and other information in this message that do not relate to the
official business of Starpoint Solutions shall be understood as neither given
nor endorsed by it.



This email message from Starpoint Solutions LLC is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it.

Post Use of uninitialized value in chdir at /usr/local/lib/perl5/ 
Tony Nelson writes:

It appears that my little patch had no effect on the error messages.
If I find some time this afternoon, I will take another look and see
if I can find the trouble spot..

I'm pretty sure this error is specific to Perl 5.8.4.

This is strange. I would have guessed your fix would have solved
the problem. It would be great if you could understand what is
going wrong so we can work out a fix. To test, you could just run:

su backuppc
bin/BackupPC_nightly 0 15

while BackupPC is not running.

File::Find certainly changed between 5.8.2 and 5.8.5. I upgraded perl
to 5.8.5 from 5.8.3 and I still don't see the error messages. I didn't
try 5.8.4.

Craig


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Use of uninitialized value in chdir at /usr/local/lib/perl5/ 
Quoting Craig Barratt <cbarratt < at > users.sourceforge.net>:

Tony Nelson writes:

It appears that my little patch had no effect on the error messages.
If I find some time this afternoon, I will take another look and see
if I can find the trouble spot..

I'm pretty sure this error is specific to Perl 5.8.4.

This is strange. I would have guessed your fix would have solved
the problem. It would be great if you could understand what is
going wrong so we can work out a fix. To test, you could just run:

su backuppc
bin/BackupPC_nightly 0 15

while BackupPC is not running.

File::Find certainly changed between 5.8.2 and 5.8.5. I upgraded perl
to 5.8.5 from 5.8.3 and I still don't see the error messages. I didn't
try 5.8.4.


I had very interesting results with the test you suggested:

backuppc < at > backuppc:~$ bin/BackupPC_nightly 0 15
BackupPC_stats 0 = cpool,7071,18,848636,552916,0,0,3,2,0,127
BackupPC_stats 1 = cpool,6956,17,934708,713332,0,0,0,0,0,133
BackupPC_stats 2 = cpool,7024,17,1140124,933468,0,0,1,1,0,233
BackupPC_stats 3 = cpool,7002,17,891416,781420,0,0,1,1,0,229
BackupPC_stats 4 = cpool,7175,17,626420,404744,0,0,6,6,0,166
BackupPC_stats 5 = cpool,7004,17,1096832,869224,0,0,0,0,0,337
BackupPC_stats 6 = cpool,7057,17,1308088,1109720,0,0,0,0,0,132
BackupPC_stats 7 = cpool,6943,17,419756,241932,0,0,2,1,0,1477
BackupPC_stats 8 = cpool,6850,17,1273108,1112952,0,0,2,1,0,273
BackupPC_stats 9 = cpool,7014,17,698208,545092,0,0,0,0,0,175
BackupPC_stats 10 = cpool,7148,17,1064916,826732,0,0,0,0,0,1671
BackupPC_stats 11 = cpool,7063,17,755252,597824,0,0,1,1,0,131
BackupPC_stats 12 = cpool,7093,17,1858440,1709136,0,0,0,0,0,175
BackupPC_stats 13 = cpool,7138,17,1211712,820784,0,0,1,1,0,489
BackupPC_stats 14 = cpool,7083,17,534172,311284,0,0,0,0,0,115
BackupPC_stats 15 = cpool,7051,17,2316100,2191824,0,0,6,6,0,73
BackupPC_nightly lock_off


I had assumed that BackupPC would fork() BackupPC_nightly so I didn't bother to
restart BackupPC after I made my change. Is it possible that a restart was
necessary? Doh!?!? Is it possible that BackupPC does some type of eval()
instead of an exec?

Since I did a stop/start for the test, I will check my logs again tomorrow and
advise of any progress.

Tony


This email message from Starpoint Solutions LLC is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it.

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB