Rare Fatal Errors using Threads and libwww

Rare Fatal Errors using Threads and libwww

am 10.07.2007 22:33:19 von brian.foddy

I have a simple perl script that uses libwww and related modules to post
web forms to www.my2way.com (2 way pagers). For throughput, I have
made the script multi-threaded, its running on a large Solaris 8 server
so cpu / memory are not issues.
I'm using Perl 5.8.7 built sun4-solaris-thread-multi.
I recently upgrade the CPAN modules in May to the latest (I forget how
to get the versions installed); the upgrade was attempting to fix the
problem
but it didn't help.

The whole script is 475 lines long, but the working parts where the error is
believed to be isolated to is about 150. Unfortunately I cannot trace
it down
to a specific line, but am willing to post any/all of the code needed to
help
diagnose the problem. Let me know how much you want.

The error only occurs maybe every 1 in 20-50 executions, and it usually
results in one or more errors like below. Some of the recurring behavior
is cause by attempting to error recover, but the basic error sense is here.

I'm certainly no Perl expert, as I dabble occasionally in it.

============================================================ ====================
Jul 10 17:59:39 send_page.pl [13244]: FATAL: Can't use string
("URI::_generic") as a SCALAR ref while "strict refs" in use at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_generic.pm line 10,
line 15.

Jul 10 18:03:07 send_page.pl [13244]: FATAL: Can't use string
("URI::_generic") as a SCALAR ref while "strict refs" in use at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_generic.pm line 10,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_server.pm line 2,
line 15.

Jul 10 18:04:48 send_page.pl [13244]: FATAL: Can't use string
("URI::_generic") as a SCALAR ref while "strict refs" in use at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_generic.pm line 10,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_server.pm line 2,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/http.pm line 3, line 15.

Jul 10 18:06:24 send_page.pl [13244]: FATAL: Can't use string
("URI::_generic") as a SCALAR ref while "strict refs" in use at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_generic.pm line 10,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_server.pm line 2,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/http.pm line 3, line 15.
Compilation failed in require at (eval 6) line 3, line 15.

Jul 10 18:08:19 send_page.pl [13244]: FATAL: Can't use string
("URI::_generic") as a SCALAR ref while "strict refs" in use at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_generic.pm line 10,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_server.pm line 2,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/http.pm line 3, line 15.
Compilation failed in require at (eval 6) line 3, line 15.

Jul 10 18:09:51 send_page.pl [13244]: WARNING: Thread 15 terminated
abnormally: Can't use string ("URI::_generic") as a SCALAR ref while
"strict refs" in use at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_generic.pm line 10,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/_server.pm line 2,
line 15.
Compilation failed in require at
/apps/soc/perl_5.8/lib/site_perl/5.8.7/URI/http.pm line 3, line 15.
Compilation failed in require at (eval 6) line 3, line 15.
============================================================ ====================

Can anyone provide some guidance?
Thanks,
Brian Foddy