[DBI] msvcrt.dll issues when running in an XP environment

[DBI] msvcrt.dll issues when running in an XP environment

am 03.09.2010 04:33:41 von Andrew McLaren

This is my first delve into Apache on Windows (XP Pro SP3), so
potentially it's a dumb user issue.

The webserver is Apache 2.2 (2.2.16) based, running mod_perl, with a
Postgre database buried otherneath accessed via DBI and DBD::Pg (have
also tried DBD::ODBC but that caused other dll problems so won't go
there). The mod_perl handler is using the Apache2:RequestRec and IO
modules, and running Apache::DBI to manage persistent DB connections. It
is also using Log4perl, primarily as a debugging resource while the
handler is developed, and some basic XML packages to decode the incoming
data.

Once I got past a trivial mod_perl handler to verify that there was a
basic Apache server running, I've been plagued with stability issues.
Sometimes httd crashes (more often than not with msvcrt.dll expections),
but other times it just hangs. This has got to the state where just
moving whitespace around in the mod_perl handler changes how it behaves.
If it's crashing httpd.exe with msvcrt.dll exceptions, simply adding or
removing blank lines or comments can cure the problem! But as soon as
there are any code changes to fix a real problem, the msvcrt problems
can recur, or sometimes httpd.exe just 'expires' with no information at
all. At present httpd is running OK from a console window, but any
attempt to start it as a service (httpd -k start) hangs with no
information at all. I'm running out of hair. All I am certain about is
that it's related to my mod_perl handler (and by default its associated
packages). The handler logic is running with warnings enabled, strict in
force, and have also run this under an external shell with no issues
flagged.

From various notes in here and elsewhere on the net, there are issues
related to msvcrt.dll, and particularly problems due to inconsistancies
between the versions used to build Apache and mod_perl. Based on this,
I've deinstalled Apache, and reinstalled with a fresh copy of the
Apache binaries from the ASF (2.2.16), and mod_perl from theoryx5 (which
I understand is consistent with the ASF base release). This resulted in
no perceptible changes in stability.

While I'm writing this I've clicked there are no doubt a number of other
Perl packages that are also XS based, and potentially have the same
consistency issues, such as DBD::Pg for Postgre (maybe even Perl
itself?). Other than mod_perl, everything else I had been using was from
my vanilla Perl installation, and hadn't really given much thought to
where packages were sourced from (my PPM repositories include
ActiveState, Bribes and Roth). I did have 1.45 DBD::Pg installed which
was crashing when a second DBI connect was attempted, so had upgraded
this to V2.01 from pgfoundry.org. I've seen that theoryx5 has a 1.45
DBD::Pg package there, so that is something to try. Initially I had
thought that Log4perl could have been the problem, but I had earlier
removed all references to that but the problems remained. However, its
still potentially one of many.

Any advice on where to from here? I'll definitely try reverting DBD::Pg
back to the theoryx5 1.45 version (and should do DBI at the same time),
but what of the multitude of other packages, such as Log4Perl, or even
packages that ship with Perl (I'm using 5.8.8 build 822). Just how
paranoid do I need to be? Any other tips or ideas on getting any
visibility into what httpd is doing when it starts - I've got the
logging levels to debug, but this doesn't give any more detail than what
modules are being loaded. Windows is a bit of a black box at the best of
times...

The other option is to bite the bullet, and port everything the other
way (ie to Unix). When I started it seemed a trivial matter to add an
Apache websever and some mod_perl to Windows - now I suspect it would
have been a lot quicker to go what appeared the longer route and move
the rest of the application to Unix.

Any advice, ideas or thoughts appreciated.

Thanks and regards - Andrew

Re: [DBI] msvcrt.dll issues when running in an XP environment

am 03.09.2010 08:13:51 von Jacek Pasternak

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01CB4B3F.F18B4450
Content-Type: text/plain;
charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Try setting in httpd.conf:

PerlInterpStart 1
PerlInterpMax 1
PerlInterpMinSpare 1
PerlInterpMaxSpare 1

Jacek
----- Original Message -----=20
From: Andrew McLaren=20
To: modperl@perl.apache.org=20
Sent: Friday, September 03, 2010 4:33 AM
Subject: [DBI] msvcrt.dll issues when running in an XP environment


This is my first delve into Apache on Windows (XP Pro SP3), so
potentially it's a dumb user issue.

The webserver is Apache 2.2 (2.2.16) based, running mod_perl, with a
Postgre database buried otherneath accessed via DBI and DBD::Pg (have
also tried DBD::ODBC but that caused other dll problems so won't go
there). The mod_perl handler is using the Apache2:RequestRec and IO
modules, and running Apache::DBI to manage persistent DB connections. =
It
is also using Log4perl, primarily as a debugging resource while the
handler is developed, and some basic XML packages to decode the =
incoming
data.

Once I got past a trivial mod_perl handler to verify that there was a
basic Apache server running, I've been plagued with stability issues.
Sometimes httd crashes (more often than not with msvcrt.dll =
expections),
but other times it just hangs. This has got to the state where just
moving whitespace around in the mod_perl handler changes how it =
behaves.
If it's crashing httpd.exe with msvcrt.dll exceptions, simply adding =
or
removing blank lines or comments can cure the problem! But as soon as
there are any code changes to fix a real problem, the msvcrt problems
can recur, or sometimes httpd.exe just 'expires' with no information =
at
all. At present httpd is running OK from a console window, but any
attempt to start it as a service (httpd -k start) hangs with no
information at all. I'm running out of hair. All I am certain about is
that it's related to my mod_perl handler (and by default its =
associated
packages). The handler logic is running with warnings enabled, strict =
in
force, and have also run this under an external shell with no issues
flagged.

From various notes in here and elsewhere on the net, there are issues
related to msvcrt.dll, and particularly problems due to =
inconsistancies
between the versions used to build Apache and mod_perl. Based on this,
I've deinstalled Apache, and reinstalled with a fresh copy of the
Apache binaries from the ASF (2.2.16), and mod_perl from theoryx5 =
(which
I understand is consistent with the ASF base release). This resulted =
in
no perceptible changes in stability.

While I'm writing this I've clicked there are no doubt a number of =
other
Perl packages that are also XS based, and potentially have the same
consistency issues, such as DBD::Pg for Postgre (maybe even Perl
itself?). Other than mod_perl, everything else I had been using was =
from
my vanilla Perl installation, and hadn't really given much thought to
where packages were sourced from (my PPM repositories include
ActiveState, Bribes and Roth). I did have 1.45 DBD::Pg installed which
was crashing when a second DBI connect was attempted, so had upgraded
this to V2.01 from pgfoundry.org. I've seen that theoryx5 has a 1.45
DBD::Pg package there, so that is something to try. Initially I had
thought that Log4perl could have been the problem, but I had earlier
removed all references to that but the problems remained. However, its
still potentially one of many.

Any advice on where to from here? I'll definitely try reverting =
DBD::Pg
back to the theoryx5 1.45 version (and should do DBI at the same =
time),
but what of the multitude of other packages, such as Log4Perl, or even
packages that ship with Perl (I'm using 5.8.8 build 822). Just how
paranoid do I need to be? Any other tips or ideas on getting any
visibility into what httpd is doing when it starts - I've got the
logging levels to debug, but this doesn't give any more detail than =
what
modules are being loaded. Windows is a bit of a black box at the best =
of
times...

The other option is to bite the bullet, and port everything the other
way (ie to Unix). When I started it seemed a trivial matter to add an
Apache websever and some mod_perl to Windows - now I suspect it would
have been a lot quicker to go what appeared the longer route and move
the rest of the application to Unix.

Any advice, ideas or thoughts appreciated.

Thanks and regards - Andrew


------=_NextPart_000_000A_01CB4B3F.F18B4450
Content-Type: text/html;
charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable



charset=3Diso-8859-1">




Try setting in httpd.conf:

 

PerlInterpStart 1
PerlInterpMax=20
1
PerlInterpMinSpare 1
PerlInterpMaxSpare 1

 

Jacek

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
----- Original Message -----

style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black">From:=20
href=3D"mailto:andrew@aratika.co.nz">Andrew=20
McLaren

To: title=3Dmodperl@perl.apache.org=20
href=3D"mailto:modperl@perl.apache.org">modperl@perl.apache. org
=

Sent: Friday, September 03, =
2010 4:33=20
AM

Subject: [DBI] msvcrt.dll =
issues when=20
running in an XP environment


This is my first delve into Apache on Windows (XP Pro =
SP3),=20
so
potentially it's a dumb user issue.

The webserver is =
Apache 2.2=20
(2.2.16) based, running mod_perl, with a
Postgre database buried =
otherneath=20
accessed via DBI and DBD::Pg (have
also tried DBD::ODBC but that =
caused=20
other dll problems so won't go
there). The mod_perl handler is =
using the=20
Apache2:RequestRec and IO
modules, and running Apache::DBI to =
manage=20
persistent DB connections. It
is also using Log4perl, primarily as =
a=20
debugging resource while the
handler is developed, and some basic =
XML=20
packages to decode the incoming
data.

Once I got past a =
trivial=20
mod_perl handler to verify that there was a
basic Apache server =
running,=20
I've been plagued with stability issues.
Sometimes httd crashes =
(more often=20
than not with msvcrt.dll expections),
but other times it just =
hangs. =20
This has got to the state where just
moving whitespace around in =
the=20
mod_perl handler changes how it behaves.
If it's crashing httpd.exe =
with=20
msvcrt.dll exceptions, simply adding or
removing blank lines or =
comments=20
can cure the problem! But as soon as
there are any code changes to =
fix a=20
real problem, the msvcrt problems
can recur, or sometimes httpd.exe =
just=20
'expires' with no information at
all. At present httpd is running =
OK from a=20
console window, but any
attempt to start it as a service (httpd -k =
start)=20
hangs with no
information at all. I'm running out of hair. All I am =
certain=20
about is
that it's related to my mod_perl handler (and by default =
its=20
associated
packages). The handler logic is running with warnings =
enabled,=20
strict in
force, and have also run this under an external shell =
with no=20
issues
flagged.

From various notes in here and elsewhere on =
the net,=20
there are issues
related to msvcrt.dll, and particularly problems =
due to=20
inconsistancies
between the versions used to build Apache and =
mod_perl.=20
Based on this,
I've deinstalled Apache, and reinstalled with =
a  fresh=20
copy of the
Apache binaries from the ASF (2.2.16), and mod_perl =
from=20
theoryx5 (which
I understand is consistent with the ASF base =
release). This=20
resulted in
no perceptible changes in stability.

While I'm =
writing=20
this I've clicked there are no doubt a number of other
Perl =
packages that=20
are also XS based, and potentially have the same
consistency =
issues, such=20
as DBD::Pg for Postgre (maybe even Perl
itself?). Other than =
mod_perl,=20
everything else I had been using was from
my vanilla Perl =
installation, and=20
hadn't really given much thought to
where packages were sourced =
from (my=20
PPM repositories include
ActiveState, Bribes and Roth). I did have =
1.45=20
DBD::Pg installed which
was crashing when a second DBI connect was=20
attempted, so had upgraded
this to V2.01 from pgfoundry.org. I've =
seen that=20
theoryx5 has a 1.45
DBD::Pg package there, so that is something to =
try.=20
Initially I had
thought that Log4perl could have been the problem, =
but I=20
had earlier
removed all references to that but the problems =
remained.=20
However, its
still potentially one of many.

Any advice on =
where to=20
from here? I'll definitely try reverting DBD::Pg
back to the =
theoryx5 1.45=20
version (and should do DBI at the same time),
but what of the =
multitude of=20
other packages, such as Log4Perl, or even
packages that ship with =
Perl (I'm=20
using 5.8.8 build 822). Just how
paranoid do I need to be? Any =
other tips=20
or ideas on getting any
visibility into what  httpd is doing =
when it=20
starts - I've got the
logging levels to debug, but this doesn't =
give any=20
more detail than what
modules are being loaded. Windows is a bit of =
a black=20
box at the best of
times...

The other option is to bite the =
bullet,=20
and port everything the other
way (ie to Unix). When I started it =
seemed a=20
trivial matter to add an
Apache websever and some mod_perl to =
Windows - now=20
I suspect it would
have been a lot quicker to go what appeared the =
longer=20
route and move
the rest of the application to Unix.

Any =
advice,=20
ideas or thoughts appreciated.

Thanks and regards -=20
Andrew



------=_NextPart_000_000A_01CB4B3F.F18B4450--

RE: [DBI] msvcrt.dll issues when running in an XP environment

am 05.09.2010 04:35:45 von Andrew McLaren

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01CB4D07.A09DD840
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Further to the earlier note, I have been and done the following;

Replaced DBI, DBD-Pg and Log-Log4perl with the packages from theoryx5
(1.59, 1.45 and 1.06 respectively), which should all be compatible
builds with the ASF Apache release. At this point httpd is starting
successfully, but I'm immediately having a different problem with
Postgre. This is not Apache related - a simple bit of standalone Perl to
connect to a database crashes Perl with an exception on an unknown
ModName. Not a lot of help there. I've reverted back to the pgfoundry
2.10 DBD-Pg package. This gives connectivity back to the database, but
immediately starts giving the msvcrt.dll errors when running under
Apache.

At the moment I'm at a bit of a Catch 22. I can't totally verify that
the theoryx5 packages have resolved the Apache problems, as the lack of
a database connection limits what I can test. However, it does appear
that this may have resolved that issue. However, this build of DBD-Pg
appears to have other problems that prevent it working at all (and
appears that these may be known issues with this version of DBD-Pg).

As an alternative I've tried using ODBC to get to the database. The ODBC
package works fine standalone, but also exhibits the msvcrt problems
running under Apache. This is another package that I don't know the
build history of, and there is no known consistent package available at
theoryx5.

I've just tried a 2.14 DBD-Pg package from trouchelle.com, but have no
details of how this was constructed,, and this takes over and installs a
heap of replacement dll's. This won't even start standalone, and I'm
probably going to have to do a clean Perl install to recover from that.

Still struggling

Andrew




------=_NextPart_000_0000_01CB4D07.A09DD840
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable



charset=3Dus-ascii">
Message





class=3D968494901-05092010>Further to the earlier note, I have been and =
done the=20
following;

class=3D968494901-05092010> 

class=3D968494901-05092010>Replaced DBI, DBD-Pg and Log-Log4perl with =
the packages=20
from theoryx5 (1.59, 1.45 and 1.06 respectively), which should all be =
compatible=20
builds with the ASF Apache release. At this point httpd is starting=20
successfully, but I'm immediately having a different problem with =
Postgre. This=20
is not Apache related - a simple bit of standalone Perl to connect to a =
database=20
crashes Perl with an exception on an unknown ModName. Not a lot of help =
there.=20
I've reverted back to the pgfoundry 2.10 DBD-Pg package. This gives =
connectivity=20
back to the database, but immediately starts giving the msvcrt.dll =
errors when=20
running under Apache.

class=3D968494901-05092010> 

class=3D968494901-05092010>At the=20
moment I'm at a bit of a Catch 22. I can't totally verify that the =
theoryx5=20
packages have resolved the Apache problems, as the lack of a database =
connection=20
limits what I can test. However, it does appear that this may have =
resolved that=20
issue. However, this build of DBD-Pg appears to have other problems =
that=20
prevent it working at all (and appears that these may be known issues =
with this=20
version of DBD-Pg).

class=3D968494901-05092010> 

class=3D968494901-05092010>As an=20
alternative I've tried using ODBC to get to the database. The ODBC =
package works=20
fine standalone, but also exhibits the msvcrt problems running under =
Apache.=20
This is another package that I don't know the build history of, and =
there is no=20
known consistent package available at theoryx5.

class=3D968494901-05092010> 

class=3D968494901-05092010>I've=20
just tried a 2.14 DBD-Pg package from trouchelle.com, but have no =
details of how=20
this was constructed,, and this takes over and installs a heap of =
replacement=20
dll's. This won't even start standalone, and I'm probably going to have =
to do a=20
clean Perl install to recover from that.

class=3D968494901-05092010> 

class=3D968494901-05092010>Still=20
struggling

class=3D968494901-05092010> 

class=3D968494901-05092010>Andrew

class=3D968494901-05092010> 

class=3D968494901-05092010> 

 


------=_NextPart_000_0000_01CB4D07.A09DD840--

RE: [DBI] msvcrt.dll issues when running in an XP environment

am 05.09.2010 21:55:52 von Michiel Beijen

On zo, 2010-09-05 at 14:35 +1200, Andrew McLaren wrote:
> Still struggling

Hi Andrew,

You might want to check out StrawberryPerl @ http://strawberryperl.com/
- They provide lots of often used binary modules, such as DBD::Pg,
pre-installed, and they go through a great deal of trouble to make sure
the dll's won't clash with any other DLLs that happen to be inside your
path. This might just help you.

There are also packages available for using mod_perl with Strawberry:
http://strawberryperl.com/package/kmx/mod_perl/

You should no longer need to hunt for PPD packages (actually, you'd
better not) but you can install everything with the bundled CPAN client
and build environment.

Hope it helps,

Mike.

RE: [DBI] msvcrt.dll issues when running in an XP environment

am 12.09.2010 12:52:10 von Andrew McLaren

Thanks for the support and ideas. I eventually came to the conclusion
that even if I got this resolved, it was likely to be an ongoing
management issue, so have decided to go the Linux route. This is now all
running on Apache/mod_perl there with minimal problems. Now alls that
left on Windows is a linked Access database to give me a quick and dirty
query interface into the DB.

Regards

Andrew

Re: [DBI] msvcrt.dll issues when running in an XP environment

am 12.09.2010 16:29:38 von Michael Ludwig

Andrew McLaren schrieb am 12.09.2010 um 22:52 (+1200):
>
> Thanks for the support and ideas. I eventually came to the conclusion
> that even if I got this resolved, it was likely to be an ongoing
> management issue, so have decided to go the Linux route. This is now
> all running on Apache/mod_perl there with minimal problems. Now alls
> that left on Windows is a linked Access database to give me a quick
> and dirty query interface into the DB.

Good you've been able to nicely solve the issue.

From running some basic experiments, I'd think that on Windows,
IIS/ActivePerl/PerlEx would be a good solution. But there is
little user feedback available on the net, which lends a somewhat,
well, experimental or pioneering touch to the whole undertaking.

Anyone around here ever tried that combo? Or has feedback on it?
--
Michael Ludwig