Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the POE-Component-MessageQueue CPAN distribution.

Report information
The Basics
Id: 45831
Status: open
Priority: 0/
Queue: POE-Component-MessageQueue

People
Owner: Nobody in particular
Requestors: czarek [...] thebestisp.co.uk
Cc:
AdminCc:

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



Subject: stomp server fails when consumer brakes during receiving a message
Date: Thu, 7 May 2009 21:41:26 +0100
To: <bug-POE-Component-MessageQueue [...] rt.cpan.org>
From: "Cezary Siwek" <czarek [...] thebestisp.co.uk>
our $VERSION = '0.2.6'; perl v5.10.0 I've discovered during my tests that server crashes when the consumer brakes during receiving a message (basically, when doesn't ack the message). This happens when the BigMemory storage type is in use. I'm using this simple consumer: $stomp->subscribe({ destination => '/queue/services.provision', ack => 'client' }); while (1) { my $frame = $stomp->receive_frame; log_debug "Received: ".$frame->body . "\n"; process_frame($frame->headers,$frame->body); $stomp->ack({ frame => $frame }); } the 'process_frame' subroutine fails because mysql query fails in other part of my code, consumer crashes so the message is not being acked. the server prints: Thu May 7 20:19:59 2009 RECV (11): CONNECT nothing:manager Use of uninitialized value in string eq at /usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Message.pm line 111. Thu May 7 20:19:59 2009 RECV (11): SEND message 7023CAD8-3B44-11DE-AF56-E220F2EF0066 (148 bytes) to /queue/services.provision (persistent: 0) Thu May 7 20:19:59 2009 QUEUE: Message 7023CAD8-3B44-11DE-AF56-E220F2EF0066 claimed by 9 during send Thu May 7 20:19:59 2009 STORE: COMPLEX: FRONT: Added 7023CAD8-3B44-11DE-AF56-E220F2EF0066. Thu May 7 20:19:59 2009 Dispatching message 7023CAD8-3B44-11DE-AF56-E220F2EF0066 to client 9 Thu May 7 20:19:59 2009 RECV (11): DISCONNECT Thu May 7 20:19:59 2009 MASTER: Removing client 11 Thu May 7 20:19:59 2009 MASTER: Removing client 9 Can't call method "add" on an undefined value at /usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Storage/BigMemory.pm line 296. Cezary
I am having trouble recreating this bug.. Attached is the consumer I'm using to try to recreate. And here are the log messages I get, which are extremely similar to yours except there is no crash at the end: RECV (11): CONNECT system:manager Use of uninitialized value in string eq at lib/POE/Component/MessageQueue/Message.pm line 111. RECV (11): SEND message D69F9AB6-68C7-11DE-8F92-911971680E33 (6 bytes) to /queue/monkey_bin (persistent: 0) QUEUE: Message D69F9AB6-68C7-11DE-8F92-911971680E33 claimed by 9 during send STORE: COMPLEX: FRONT: Added D69F9AB6-68C7-11DE-8F92-911971680E33 Dispatching message D69F9AB6-68C7-11DE-8F92-911971680E33 to client 9 MASTER: Removing client 9 RECV (11): DISCONNECT MASTER: Removing client 11 If you have time, could you test my script on your system and let me know if it still causes the same problem for you? I may have not done a faithful job recreating it. If the problem still does happen, it could be caused by some different version of modules between our two systems. Or maybe its a Perl 5.10 issue? I'm using 5.8 and don't have a 5.10 system to test on. In any case, thanks for the bug report! Happy Hacking, David. On Czw. 07 Maj 2009, 16:42:03, czarek@thebestisp.co.uk wrote: Show quoted text
> > our $VERSION = '0.2.6'; > perl v5.10.0 > > I've discovered during my tests that server crashes when the consumer > brakes > during receiving a message (basically, when doesn't ack the message). > This happens when the BigMemory storage type is in use. > > I'm using this simple consumer: > > $stomp->subscribe({ > destination => '/queue/services.provision', > ack => 'client' > }); > > > while (1) > { > my $frame = $stomp->receive_frame; > > log_debug "Received: ".$frame->body . "\n"; > process_frame($frame->headers,$frame->body); > $stomp->ack({ frame => $frame }); > } > > > the 'process_frame' subroutine fails because mysql query fails in > other part > of my code, consumer crashes so the message is not being acked. > > > > the server prints: > > Thu May 7 20:19:59 2009 RECV (11): CONNECT nothing:manager > > Use of uninitialized value in string eq at > /usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Message.pm > line 111. > Thu May 7 20:19:59 2009 RECV (11): SEND message > 7023CAD8-3B44-11DE-AF56-E220F2EF0066 (148 bytes) to > /queue/services.provision (persistent: 0) > > Thu May 7 20:19:59 2009 QUEUE: Message 7023CAD8-3B44-11DE-AF56- > E220F2EF0066 > claimed by 9 during send > > Thu May 7 20:19:59 2009 STORE: COMPLEX: FRONT: Added > 7023CAD8-3B44-11DE-AF56-E220F2EF0066. > > Thu May 7 20:19:59 2009 Dispatching message > 7023CAD8-3B44-11DE-AF56-E220F2EF0066 to client 9 > > Thu May 7 20:19:59 2009 RECV (11): DISCONNECT > > Thu May 7 20:19:59 2009 MASTER: Removing client 11 > > Thu May 7 20:19:59 2009 MASTER: Removing client 9 > > Can't call method "add" on an undefined value at >
/usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Storage/BigMemory.pm Show quoted text
> line 296. > > > > > Cezary > >
use Net::Stomp; use strict; my $port = 61613; my $hostname = "localhost"; my $stomp = Net::Stomp->new({ hostname => $hostname, port => $port }); $stomp->connect({ login => 'nothing', passcode => 'manager' }); $stomp->subscribe({ 'destination' => '/queue/monkey_bin', 'ack' => 'client', }); while (1) { my $frame = $stomp->receive_frame; print $frame->body . "\n"; # simumlate problem before ACK can happen exit 1; $stomp->ack({ frame => $frame }); }
From: czarek [...] thebestisp.co.uk
Hi, I'm getting exactly the same using your test consumer's script. I've tested this using perl 5.8.8 (Debian 'Etch' instead of 'Lenny') and it worked as you expected. Any idea what needs to be done to make this working under perl 5.10? Regards, Cezary BTW, your Polish is really good (especially the hard 'R') ;) On Sat Jul 04 14:28:48 2009, DSNOPEK wrote: Show quoted text
> > I am having trouble recreating this bug.. Attached is the consumer
I'm Show quoted text
> using to try to recreate. And here are the log messages I get, which > are extremely similar to yours except there is no crash at the end: > > RECV (11): CONNECT system:manager > Use of uninitialized value in string eq at > lib/POE/Component/MessageQueue/Message.pm line 111. > RECV (11): SEND message D69F9AB6-68C7-11DE-8F92-911971680E33 (6 bytes) > to /queue/monkey_bin (persistent: 0) > QUEUE: Message D69F9AB6-68C7-11DE-8F92-911971680E33 claimed by 9
during send Show quoted text
> STORE: COMPLEX: FRONT: Added D69F9AB6-68C7-11DE-8F92-911971680E33 > Dispatching message D69F9AB6-68C7-11DE-8F92-911971680E33 to client 9 > MASTER: Removing client 9 > RECV (11): DISCONNECT > MASTER: Removing client 11 > > If you have time, could you test my script on your system and let me > know if it still causes the same problem for you? I may have not
done a Show quoted text
> faithful job recreating it. > > If the problem still does happen, it could be caused by some different > version of modules between our two systems. Or maybe its a Perl 5.10 > issue? I'm using 5.8 and don't have a 5.10 system to test on. > > In any case, thanks for the bug report! > > Happy Hacking, > David. > > On Czw. 07 Maj 2009, 16:42:03, czarek@thebestisp.co.uk wrote:
> > > > our $VERSION = '0.2.6'; > > perl v5.10.0 > > > > I've discovered during my tests that server crashes when the
consumer Show quoted text
> > brakes > > during receiving a message (basically, when doesn't ack the
message). Show quoted text
> > This happens when the BigMemory storage type is in use. > > > > I'm using this simple consumer: > > > > $stomp->subscribe({ > > destination => '/queue/services.provision', > > ack => 'client' > > }); > > > > > > while (1) > > { > > my $frame = $stomp->receive_frame; > > > > log_debug "Received: ".$frame->body . "\n"; > > process_frame($frame->headers,$frame->body); > > $stomp->ack({ frame => $frame }); > > } > > > > > > the 'process_frame' subroutine fails because mysql query fails in > > other part > > of my code, consumer crashes so the message is not being acked. > > > > > > > > the server prints: > > > > Thu May 7 20:19:59 2009 RECV (11): CONNECT nothing:manager > > > > Use of uninitialized value in string eq at > > /usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Message.pm > > line 111. > > Thu May 7 20:19:59 2009 RECV (11): SEND message > > 7023CAD8-3B44-11DE-AF56-E220F2EF0066 (148 bytes) to > > /queue/services.provision (persistent: 0) > > > > Thu May 7 20:19:59 2009 QUEUE: Message 7023CAD8-3B44-11DE-AF56- > > E220F2EF0066 > > claimed by 9 during send > > > > Thu May 7 20:19:59 2009 STORE: COMPLEX: FRONT: Added > > 7023CAD8-3B44-11DE-AF56-E220F2EF0066. > > > > Thu May 7 20:19:59 2009 Dispatching message > > 7023CAD8-3B44-11DE-AF56-E220F2EF0066 to client 9 > > > > Thu May 7 20:19:59 2009 RECV (11): DISCONNECT > > > > Thu May 7 20:19:59 2009 MASTER: Removing client 11 > > > > Thu May 7 20:19:59 2009 MASTER: Removing client 9 > > > > Can't call method "add" on an undefined value at > >
> /usr/local/share/perl/5.10.0/POE/Component/MessageQueue/Storage/BigMem
ory.pm Show quoted text
> > line 296. > > > > > > > > > > Cezary > > > >
> >