You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ken Perl <ke...@gmail.com> on 2006/02/09 16:09:22 UTC

debugger command always return IO::Handle::DESTROY

I am using Apache::DB as debugger to debug my modperl2 program. No
breakpoints are defined, I input many 'r' and the return is always
like below, and the home page can't be displayed in the debug mode
while turning off debug mode it home page can be rendered as normal.

  DB<1> r
void context return from IO::Handle::DESTROY
IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
75:     sub DESTROY {}
  DB<1> r
void context return from IO::Handle::DESTROY
Apache2::SizeLimit::handler(/usr/lib/perl5/Apache2/SizeLimit.pm:248):
248:        my $r = shift;

Anybody knows about the problem in it?

--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
")'

Re: debugger command always return IO::Handle::DESTROY

Posted by Ken Perl <ke...@gmail.com>.
Yes, my browser gets most of the home page back if I input lots of
'r', except some images are still waiting for downloading.
If starting server with -X only the page could be retrieved complete
successfully.


On 2/14/06, Perrin Harkins <pe...@elem.com> wrote:
> On Mon, 2006-02-13 at 14:27 +0800, Ken Perl wrote:
> > Normaly, ctrl +c works for a simple modperl program, I am trying to
> > debug a more complex modperl program.
>
> I don't see how that would a make difference.  You're just trying to
> send a signal to the httpd process by hitting Ctrl-C.
>
> > I'd like to provide all info you need, maybe I need some guide on what's needed.
>
> Your previous message said that it didn't work, but didn't say what
> would have happened if it did work, or what it actually did.  The
> information you gave here is better.
>
> > When I request the home page, I get the prompt of the debugger
>
> That's good.
>
> > then I
> > input command 'r' to let debugger return from the contentHandler(),
> > and input many other 'r' to return too, I just want to see if I can
> > see the home page under debugging mode, but I can't
>
> Your browser never gets anything back?  Try using telnet or lwp-get to
> test it, so you can see if anything gets sent back.  You don't need to
> test the images.
>
> > only lots of
> > IO::Handle::DESTROY, and finally, hang there,
> > I can't input any more debugger command, kill the apache2 process is
> > the only thing left could be done.
> > And on the browser side, I see from the status bar it is still waiting
> > to dowload the .gif images, however, if trun the debugging mode off,
> > home page can be displayed smoothly.
>
> What happens if you run the server with -X but don't add the debugger?
> Can you get the page then?
>
> - Perrin
>
>


--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
")'

Re: debugger command always return IO::Handle::DESTROY

Posted by Ken Perl <ke...@gmail.com>.
Normaly, ctrl +c works for a simple modperl program, I am trying to
debug a more complex modperl program.

I'd like to provide all info you need, maybe I need some guide on what's needed.

What I want to do is stepping into the modperl2 WebGUI
program(https://svn.webgui.org/svnroot/WebGUI/ and fix some bugs.

When I request the home page, I get the prompt of the debugger, then I
input command 'r' to let debugger return from the contentHandler(),
and input many other 'r' to return too, I just want to see if I can
see the home page under debugging mode, but I can't, only lots of
IO::Handle::DESTROY, and finally, hang there,
I can't input any more debugger command, kill the apache2 process is
the only thing left could be done.
And on the browser side, I see from the status bar it is still waiting
to dowload the .gif images, however, if trun the debugging mode off,
home page can be displayed smoothly.

In my httpd.conf, I enabled Apache2::Reload and Apache2::Status.

Anything I missed or anything you want to know, please let me know.

On 2/13/06, Perrin Harkins <pe...@elem.com> wrote:
> Ken Perl wrote:
> > I tried to stop apache by issuing apache2ctl -k stop in another
> > terminal, the command exit without any output, but the debugger is
> > still hung there. I have to send signal KILL to the process.
>
> That will work, but the usual way to stop is to hit Ctrl-C in the
> debugger terminal.  The apache2ctl script probably fails because you are
> running with a single process so the PID file isn't there or isn't accurate.
>
> I haven't seen your IO::Handle issue before, but I suspect the debugger
> is just informing you about some code that ran after your return.  The
> real issue is why your home page doesn't display as you expect.  To help
> you with that, you need to give us more details about what happens and
> what was supposed to happen.
>
> - Perrin
>


--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
")'

Re: debugger command always return IO::Handle::DESTROY

Posted by Perrin Harkins <pe...@elem.com>.
Ken Perl wrote:
> I tried to stop apache by issuing apache2ctl -k stop in another
> terminal, the command exit without any output, but the debugger is
> still hung there. I have to send signal KILL to the process.

That will work, but the usual way to stop is to hit Ctrl-C in the 
debugger terminal.  The apache2ctl script probably fails because you are 
running with a single process so the PID file isn't there or isn't accurate.

I haven't seen your IO::Handle issue before, but I suspect the debugger 
is just informing you about some code that ran after your return.  The 
real issue is why your home page doesn't display as you expect.  To help 
you with that, you need to give us more details about what happens and 
what was supposed to happen.

- Perrin

Re: debugger command always return IO::Handle::DESTROY

Posted by Ken Perl <ke...@gmail.com>.
I tried to stop apache by issuing apache2ctl -k stop in another
terminal, the command exit without any output, but the debugger is
still hung there. I have to send signal KILL to the process.

On 2/12/06, Frank Wiles <fr...@wiles.org> wrote:
> On Sun, 12 Feb 2006 18:55:13 +0800
> Ken Perl <ke...@gmail.com> wrote:
>
> > And I also can't quit Apache::DB by entering many 'q' commands,
> >   DB<5> q
> > IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
> > 75:     sub DESTROY {}
> >   DB<5> q
> > IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
> > 75:     sub DESTROY {}
> >   DB<5> q
> > IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
> > 75:     sub DESTROY {}
> >   DB<5> q
> >
> > the last 'q' command hang there, any comments?
>
>  I believe you have to stop Apache to exit the debugger when using it.
>  If that doesn't fix it let me know.
>
>  ---------------------------------
>   Frank Wiles <fr...@wiles.org>
>   http://www.wiles.org
>  ---------------------------------
>
>


--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
")'

Re: debugger command always return IO::Handle::DESTROY

Posted by Ken Perl <ke...@gmail.com>.
And I also can't quit Apache::DB by entering many 'q' commands,
  DB<5> q
IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
75:     sub DESTROY {}
  DB<5> q
IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
75:     sub DESTROY {}
  DB<5> q
IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
75:     sub DESTROY {}
  DB<5> q

the last 'q' command hang there, any comments?


On 2/9/06, Ken Perl <ke...@gmail.com> wrote:
> I am using Apache::DB as debugger to debug my modperl2 program. No
> breakpoints are defined, I input many 'r' and the return is always
> like below, and the home page can't be displayed in the debug mode
> while turning off debug mode it home page can be rendered as normal.
>
>  DB<1> r
> void context return from IO::Handle::DESTROY
> IO::Handle::DESTROY(/usr/lib/perl/5.8/IO/Handle.pm:75):
> 75:     sub DESTROY {}
>  DB<1> r
> void context return from IO::Handle::DESTROY
> Apache2::SizeLimit::handler(/usr/lib/perl5/Apache2/SizeLimit.pm:248):
> 248:        my $r = shift;
>
> Anybody knows about the problem in it?
>
> --
> perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
> ")'
>


--
perl -e 'print unpack(u,"62V5N\"FME;G\!E<FQ`9VUA:6PN8V]M\"\@``
")'