Skip Menu |

This queue is for tickets about the MQSeries CPAN distribution.

Report information
The Basics
Id: 43074
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: MQSeries

People
Owner: Hildo.Biersma [...] gmail.com
Requestors: morten.bjornsvik [...] experian-da.no
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: "Secana Support" <secanasupport [...] experian-scorex.no>
Subject: MQSeries/Queue.pm - close program error patch
Date: Fri, 6 Feb 2009 10:51:59 +0100
To: <bug-MQSeries [...] rt.cpan.org>
From: Morten Bjørnsvik <morten.bjornsvik [...] experian-da.no>
Hi $ /opt/perl/bin/perl -e 'use MQSeries; print $MQSeries::VERSION."\n";' 1.28 Our MQ-Connector spits out this messages from time to time. I've traced it down to being queuemanagers that we already have closed all active connections on when program exits or queues that have never been used. Use of uninitialized value in subroutine entry at /opt/perl/lib/site_perl/5.10.0/x86_64-linux/MQSeries/Queue.pm line 264 during global destruction. There is no need to execute MQCLOSE if $self->{QueueManager}->{Hconn} is not defined. Just return. Enclosed is a 2liners patch: # cat MQSeries_Queue.pm_v.128b.patch --- Queue.pm_orig 2009-02-06 10:05:54.000000000 +0100 +++ Queue.pm 2009-02-06 10:22:54.000000000 +0100 @@ -260,6 +260,8 @@ $self->{CloseOptions} = $args{Options}; } + # in case Connector not established no need to close + return if(! defined $self->{QueueManager}->{Hconn}); MQCLOSE( $self->{QueueManager}->{Hconn}, $self->{Hobj}, Thanks -- Morten Bjørnsvik Experian Decision Analytics AS PB 121, 0102 Oslo, Norway Morten.bjornsvik@experian-da.no
RT-Send-CC: hildo.biersma [...] morganstanley.com
Thanks for this patch. I'll fold it in the next release of MQSeries. Time constraints mean that may be some time - I'm doing DB2/Linux these days, not MQ. Hildo On Fri Feb 06 04:53:19 2009, morten.bjornsvik@experian-da.no wrote: Show quoted text
> Hi > $ /opt/perl/bin/perl -e 'use MQSeries; print $MQSeries::VERSION."\n";' > 1.28 > > Our MQ-Connector spits out this messages from time to time. I've > traced it down to being > queuemanagers that we already have closed all active connections on > when program exits or > queues that have never been used. > > Use of uninitialized value in subroutine entry at > /opt/perl/lib/site_perl/5.10.0/x86_64-linux/MQSeries/Queue.pm line 264 > during global destruction. > > There is no need to execute MQCLOSE if $self->{QueueManager}->{Hconn} > is not defined. Just return. > > Enclosed is a 2liners patch: > > # cat MQSeries_Queue.pm_v.128b.patch > --- Queue.pm_orig 2009-02-06 10:05:54.000000000 +0100 > +++ Queue.pm 2009-02-06 10:22:54.000000000 +0100 > @@ -260,6 +260,8 @@ > $self->{CloseOptions} = $args{Options}; > } > > + # in case Connector not established no need to close > + return if(! defined $self->{QueueManager}->{Hconn}); > MQCLOSE( > $self->{QueueManager}->{Hconn}, > $self->{Hobj}, > > > Thanks > > > -- > Morten Bjørnsvik > Experian Decision Analytics AS > PB 121, 0102 Oslo, Norway > Morten.bjornsvik@experian-da.no > >
This is fixed in the MQSeries 1.29 release, now available on CPAN.