error starting remote debugging

peterbrodt wrote on Mon Dec 11 13:48:03 CET 2006:
Hello everyone,

trying to start a remote debugging sesseion I get the error on my windows
machine:

An internal error occured during: "Fetching children from debug target".

I have started the start_epicDB.pl from my remote machine (AIX) and it seems
to connect to the client correctly. When I use nestat -an I get the information
that a connection has been established to the remote machine with ports
5000, 5001 and 5002.

We run the latest version of the Debugger (0.5.24) in combination with Eclipse
3.1.

Has anyone got an idea what we are doing wrong. 

Regards

Peter
jploski wrote on Mon Dec 11 19:07:46 CET 2006:
Can you send the stack trace from your error log (the log file is in $WORKSPACE/.metadata/.log)?
peterbrodt wrote on Tue Dec 12 10:38:37 CET 2006:
Hi Jan,

here is the stack trace:

!SESSION 2006-12-12 10:34:46.554 -----------------------------------------------
eclipse.buildId=M20060921-0945
java.version=1.4.2_10
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.jobs 4 2 2006-12-12 10:35:49.683
!MESSAGE An internal error occurred during: "Retrieving Children".
!STACK 0
java.lang.NullPointerException
	at org.epic.debug.varparser.TokenVarParser.readVars(TokenVarParser.java:169)
	at org.epic.debug.varparser.TokenVarParser.parseVars(TokenVarParser.java:37)
	at org.epic.debug.db.StackFrame.readTopFrameVars(StackFrame.java:386)
	at org.epic.debug.db.StackFrame.getVariables(StackFrame.java:208)
	at org.eclipse.debug.internal.ui.elements.adapters.StackFrameContentAdapter.getChildren(StackFrameContentAdapter.java:26)
	at org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousContentAdapter.computeChildren(AsynchronousContentAdapter.java:105)
	at org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousContentAdapter$1.run(AsynchronousContentAdapter.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Peter
jploski wrote on Tue Dec 12 22:09:27 CET 2006:
I committed some relevant fixes today. Please try again after upgrading
to 0.5.25.
peterbrodt wrote on Fri Dec 15 12:23:58 CET 2006:
Hi Jan,

with 0.5.25 I am able to start remote debugging. But now various other problems
occur. First of all I can't trace any variables although the PadWalker module
is installed on the machine. The second problem is, that I can't set any
breakpoints. Unfortunately this applies to local debugging as well. I have
tried with eclipse 3.1 and 3.2. I also have restarted eclipse with the -clean
option. Any further idea?

Peter
jploski wrote on Sat Dec 16 00:33:32 CET 2006:
Regarding breakpoints, see if your problem is the same as this one:

https://sourceforge.net/forum/forum.php?thread_id=1631894&forum_id=258688

Regarding PadWalker: if you are doing remote debugging, PadWalker must be
installed on the remote machine. You should use PadWalker >= 1.0.

Also note that any differences between the remote and local versions of
modules will cause trouble (e.g. EPIC unable to find the local versions
of remote files and unable to position the current instruction pointer properly).
peterbrodt wrote on Tue Dec 19 17:03:10 CET 2006:
Hi Jan,

regarding breakpoints:
I use the epic editor. I am able to define a breakpoint (toggle breakpoint)
but it doesn't stop there. This behaviour is the same regardless if I perform
local or remote debugging.

regarding PadWalker:
I have installed PadWalker 1.2 in combination with Perl 5.8.8 on both machines
(local and remote). I also have written a simple testdriver which does nothing
but a few prints. The source is exactly the same on both machines.

I have no idea where the problem(s) could be located.

Peter
jploski wrote on Tue Dec 19 18:34:34 CET 2006:
Let's focus on the claim which is the most severe and should be easiest
to debug: breakpoints ignored during local debugging under Windows.

Please read my recommendation about setting up the debug console and replaying
debug sessions in the other thread:

https://sourceforge.net/forum/message.php?msg_id=4066901

It would also help if you could paste the contents of the "perl -d" output
from the Console view here, together with a simple sample script which reproduces
the problem in your environment.
peterbrodt wrote on Fri Dec 22 14:25:46 CET 2006:
Ok, here you go.
First of all I have set up two complete new eclipse installations with seperate
workspaces but identical perl projects. One installation use 0.524 the other
0.525. The result is the same with 0.524 the debugger stops at breakpoints
with 0.525 he doesn't.

Here is the perl -d output from the console:
----------------------------------------------

Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `perldoc perldebug' for more help.

main::(C:\Daten\Perlworkspace_e.p.ic_0.525\Client\TestPerlLocal.pl:17):
17:	my $ss = 'TestPerlLocal.pl >>>>>';
  DB<1> printf $DB::OUT "%vd", $^V;
5.8.8
  DB<2> f C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl
No file matching `C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl'
is loaded.
  DB<3> b load C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl
Will stop on load of `C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl'.
  DB<4> .
main::(C:\Daten\Perlworkspace_e.p.ic_0.525\Client\TestPerlLocal.pl:17):
17:	my $ss = 'TestPerlLocal.pl >>>>>';
  DB<5> T
  DB<6> .
main::(C:\Daten\Perlworkspace_e.p.ic_0.525\Client\TestPerlLocal.pl:17):
17:	my $ss = 'TestPerlLocal.pl >>>>>';
  DB<7> ;{
    if (eval { require PadWalker; PadWalker->VERSION(0.08) })
    {
        do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dumpvar_epic;

        defined &dumpvar_epic::dumpvar_epic
            or print $DB::OUT "dumpvar_epic.pm not available.\n";
    
        my $h = eval { PadWalker::peek_my(2) };
        my @vars = split(' ', '');
        $@ and $@ =~ s/ at .*//, print $DB::OUT ($@);
        my $savout = select($DB::OUT);
        dumpvar_epic::dumplex(
            $_,
            $h->{$_},
            defined $option{dumpDepth} ? $option{dumpDepth} : -1,
            @vars) for sort keys %$h;
        print "E";
        select($savout);
    }
    else
    {
        print $DB::OUT "PadWalker module not found - please install\n";
       
    }
};

E
  DB<8> ;{
    do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dumpvar_epic;

    defined &dumpvar_epic::dumpvar_epic
        or print $DB::OUT "dumpvar_epic.pm not available.\n";
        
    my $savout = select($DB::OUT);
    dumpvar_epic::dumpvar_epic();
    select($savout);
};

NS00000003$^AS00000002''NS00000003$^DS000000010NS00000003$^ES0000003c'Ein
Vorgang bezog sich auf ein Objekt, das kein Socket ist'NS00000003$^FS000000012NS00000003$^HS00000003256NS00000003$^LS00000005"\cL"NS00000003$^OS00000009'MSWin32'NS00000003$^PS00000003831NS00000003$^SS000000011NS00000007$^TAINTS000000010NS00000009$^UNICODES000000010NS00000003$^VS0000000b"\cE\cH\cH"NS00000003$^WS000000010NS0000000e$^WARNING_BITSS00000026"\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@"NS00000003$^XS00000020'C:\Programme\Perl\bin\perl.exe'NS00000002$!S00000002''NS00000002%!S00000003...INS00000007'E2BIG'S000000010NS00000008'EACCES'S000000010NS0000000c'EADDRINUSE'S000000010NS0000000f'EADDRNOTAVAIL'S000000010NS0000000e'EAFNOSUPPORT'S000000010NS00000008'EAGAIN'S000000010NS0000000a'EALREADY'S000000010NS00000007'EBADF'S000000010NS00000007'EBUSY'S000000010NS00000008'ECHILD'S000000010NS0000000e'ECONNABORTED'S000000010NS0000000e'ECONNREFUSED'S000000010NS0000000c'ECONNRESET'S000000010NS00000009'EDEADLK'S000000010NS0000000b'EDEADLOCK'S000000010NS0000000e'EDESTADDRREQ'S000000010NS00000009'EDISCON'S000000010NS00000006'EDOM'S000000010NS00000008'EDQUOT'S000000010NS00000008'EEXIST'S000000010NS00000008'EFAULT'S000000010NS00000007'EFBIG'S000000010NS0000000b'EHOSTDOWN'S000000010NS0000000e'EHOSTUNREACH'S000000010NS00000008'EILSEQ'S000000010NS0000000d'EINPROGRESS'S000000010NS00000007'EINTR'S000000010NS00000008'EINVAL'S000000010NS00000005'EIO'S000000010NS00000009'EISCONN'S000000010NS00000008'EISDIR'S000000010NS00000007'ELOOP'S000000010NS00000008'EMFILE'S000000010NS00000008'EMLINK'S000000010NS0000000a'EMSGSIZE'S000000010NS0000000e'ENAMETOOLONG'S000000010NS0000000a'ENETDOWN'S000000010NS0000000b'ENETRESET'S000000010NS0000000d'ENETUNREACH'S000000010NS00000008'ENFILE'S000000010NS00000009'ENOBUFS'S000000010NS00000008'ENODEV'S000000010NS00000008'ENOENT'S000000010NS00000009'ENOEXEC'S000000010NS00000008'ENOLCK'S000000010NS00000008'ENOMEM'S000000010NS0000000d'ENOPROTOOPT'S000000010NS00000008'ENOSPC'S000000010NS00000008'ENOSYS'S000000010NS0000000a'ENOTCONN'S000000010NS00000009'ENOTDIR'S000000010NS0000000b'ENOTEMPTY'S000000010NS0000000a'ENOTSOCK'S000000010NS00000008'ENOTTY'S000000010NS00000007'ENXIO'S000000010NS0000000c'EOPNOTSUPP'S000000010NS00000007'EPERM'S000000010NS0000000e'EPFNOSUPPORT'S000000010NS00000007'EPIPE'S000000010NS0000000a'EPROCLIM'S000000010NS00000011'EPROTONOSUPPORT'S000000010NS0000000c'EPROTOTYPE'S000000010NS00000008'ERANGE'S000000010NS00000009'EREMOTE'S000000010NS00000007'EROFS'S000000010NS0000000b'ESHUTDOWN'S000000010NS00000011'ESOCKTNOSUPPORT'S000000010NS00000008'ESPIPE'S000000010NS00000007'ESRCH'S000000010NS00000008'ESTALE'S000000010NS0000000b'ETIMEDOUT'S000000010NS0000000e'ETOOMANYREFS'S000000010NS00000008'EUSERS'S000000010NS0000000d'EWOULDBLOCK'S000000010NS00000007'EXDEV'S000000010ONS00000002$"S00000003'
'NS00000002$$S000000042944NS00000002$%S000000010NS00000002$-S000000010NS00000002$/S00000003'
'NS00000002$0S0000003d'C:\Daten\Perlworkspace_e.p.ic_0.525\Client\TestPerlLocal.pl'NS00000002$:S00000005'

-'NS00000002$;S00000005"\c\"NS00000002$ &CODE(0x1a1932c) in ???NS00000006'CHLD'S00000005undefNS00000005'CLD'S00000005undefNS00000006'CONT'S00000005undefNS00000005'FPE'S00000005undefNS00000005'HUP'S00000005undefNS00000005'ILL'S00000005undefNS00000005'INT'S0000000fCODE(0x1a00890)S00000013
-> &DB::catch in 0NS00000006'KILL'S00000005undefNS00000007'NUM05'S00000005undefNS00000007'NUM06'S00000005undefNS00000007'NUM07'S00000005undefNS00000007'NUM10'S00000005undefNS00000007'NUM12'S00000005undefNS00000007'NUM16'S00000005undefNS00000007'NUM17'S00000005undefNS00000007'NUM18'S00000005undefNS00000007'NUM19'S00000005undefNS00000007'NUM24'S00000005undefNS00000006'PIPE'S00000005undefNS00000006'QUIT'S00000005undefNS00000006'SEGV'S0000000fCODE(0x1a1932c)RNS00000006'STOP'S00000005undefNS00000006'TERM'S00000005undefNS00000009'__DIE__'S0000000fCODE(0x1a19668)S00000013
-> &DB::dbdie in 0NS0000000a'__WARN__'S0000000fCODE(0x1a194dc)S00000014
-> &DB::dbwarn in 0ONS00000012FileHandle(STDERR)S0000000c=> fileno(2)NS00000011FileHandle(STDIN)S0000000c=>
fileno(0)NS00000012FileHandle(STDOUT)S0000000c=> fileno(1)NS00000002$]S000000085.008008NS00000002$^S0000000a'GEN0_TOP'NS00000002@_S00000003...INS00000003[0]S000000010NS00000003[1]S00000003'_'NS00000003[2]S00000008*main::_NS00000003[3]S000000010NS00000003[4]S00000004'-1'ONS00000012FileHandle(stderr)S0000000c=>
fileno(2)NS00000011FileHandle(stdin)S0000000c=> fileno(0)NS00000012FileHandle(stdout)S0000000c=>
fileno(1)NS00000002$|S000000011NS00000002$~S00000006'GEN0'E
  DB<9> .
main::(C:\Daten\Perlworkspace_e.p.ic_0.525\Client\TestPerlLocal.pl:17):
17:	my $ss = 'TestPerlLocal.pl >>>>>';
  DB<10> c
Debugged program terminated.  Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.  
q
  DB<11> 
----------------------------------------------

And here is the little sample script. I have performed a local test on windows:
----------------------------------------------
#########################################################################

=head1 NAME

TestPerlRemote.pl

Testtreiber für Debugging mit E.P.I.C.

=cut

#######################################################################
# use-Section
#######################################################################

use strict;

my $ss = 'TestPerlLocal.pl >>>>>';
my $ee = 'TestPerlLocal.pl >>>>> Error:';

my $debug   = 1;
my $machine = $ENV{COMPUTERNAME};

#
#----- CCC/Harvest - Footprinting-Info
#
if ($debug) {
	my $HarvestVersion = "1";        # @(#)
	my $HarvestProject = "S9208_CCM-CS_1.5_S";    # @(#)
	my $HarvestState   = "STEST";          # @(#)
	my $HarvestItem    = "TestPerlLocal.pl";           # @(#)

	print
"\n========================================================================
\n";
	print "Harvest Footprinting Informationen\n";
	print "HARVEST - $HarvestItem"
	  . " (Version $HarvestVersion"
	  . ") aus $HarvestProject von $HarvestState\n";
	print
"\n========================================================================
\n";
}

foreach (@INC) {
	print "$_\n";
}

print "Dies ist ein Test auf Maschine $machine\n";

exit(0);

----------------------------------------------
peterbrodt wrote on Fri Dec 22 15:49:44 CET 2006:
I have just compared the debug output. 

0.524
-------
DB<2> f TestPerlLocal.pl
Choosing C:\Daten\Perlworkspace_e.p.ic_0.524\Client\TestPerlLocal.pl matching
`TestPerlLocal.pl':
Already in C:\Daten\Perlworkspace_e.p.ic_0.524\Client\TestPerlLocal.pl.
  DB<3> b 26
  DB<4> f TestPerlLocal.pl
Choosing C:\Daten\Perlworkspace_e.p.ic_0.524\Client\TestPerlLocal.pl matching
`TestPerlLocal.pl':
Already in C:\Daten\Perlworkspace_e.p.ic_0.524\Client\TestPerlLocal.pl.
  DB<5> b 46
  DB<6> .

0.525
-------
  DB<2> f C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl
No file matching `C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl'
is loaded.
  DB<3> b load C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl
Will stop on load of `C:/Daten/Perlworkspace_e.p.ic_0.525/Client/TestPerlLocal.pl'.
  DB<4> .
main::(C:\Daten\Perlworkspace_e.p.ic_0.525\Client\TestPerlLocal.pl:17):
17:	my $ss = 'TestPerlLocal.pl >>>>>';
  DB<5> T
  DB<6> .

Could the slashes instead of backslashes be the cause of the problem?
jploski wrote on Fri Dec 22 16:02:07 CET 2006:
> Could the slashes instead of backslashes be the cause of the problem?

That is also my guess. I just changed it in 0.5.26 (please upgrade) and
also created this bug report:

http://sourceforge.net/tracker/index.php?func=detail&aid=1620809&group_id=75859&atid=545274
peterbrodt wrote on Fri Dec 22 17:00:57 CET 2006:
When I try to upgrade via eclipse update i am only getting offered 0.5.25.
I have removed the plugin completely, but that didn't help.
jploski wrote on Fri Dec 22 17:14:09 CET 2006:
I just upgraded through updates/testing myself without any problems. Give
it another try? Maybe there is some lazy proxy involved on your side?
peterbrodt wrote on Fri Dec 22 17:27:47 CET 2006:
Seems to be, now the uprade worked.
And the problem has been solved. The debugger stopps at breakpoints. Thanks
a lot.
Next week I will give the remote debugging another try.

Merry Christmas to you
peterbrodt wrote on Wed Dec 27 13:29:49 CET 2006:
Hi Jan,

I did get a little further with remote debugging. First I got the following
error: Undefined subroutine &dumpvar_epic::dumpvar_epic called at (eval
21)[/opt/local/lib/perl5/5.8.8/perl5db.pl:628] line 9. I then extracted
all perl programs and perl moduls from org.epic.debug_0.5.18.jar, transfered
them to the remote machine. There I modified the environment variable PERLLIB
accordingly. Now when I start debugging the variables are displayed. I wasn't
aware of the fact that I have to install anything on my remote machine.
Or is there a better way to do it?

But I still have got the problem, that the debugger doesn't stop at breakpoints
(only remote debugging). Anything else I have to copy to the remote machine.

Peter
jploski wrote on Wed Dec 27 20:29:32 CET 2006:
The undefined subroutine error that you mentioned should not occur when
you use the start_epicDB.pl script from the ZIP archive created by EPIC.
The required file dumpvar_epic.pm is included in this archive and resides
in the same directory as the debugged script. start_epicDB.pl changes to
this directory before launching perl, so dumpvar_epic.pm should be found.

The other problem (ignored breakpoints) is caused by the (still) improper
handling of paths in EPIC, corrected in 0.5.27:
http://sourceforge.net/tracker/index.php?func=detail&aid=1623087&group_id=75859&atid=545274

peterbrodt wrote on Wed Dec 27 15:19:25 CET 2006:
I've got the following debug output.

  DB<12> f \apps\harvest\Harvest7\Skripte\TestPerlRemote.pl
No file matching `\apps\harvest\Harvest7\Skripte\TestPerlRemote.pl' is loaded.
  DB<13> b load \apps\harvest\Harvest7\Skripte\TestPerlRemote.pl
Will stop on load of `\apps\harvest\Harvest7\Skripte\TestPerlRemote.pl'.

Seems as if there is a problem with backslashes on the remote machine (Unix).
The error occured while setting a breakpoint.

Peter
peterbrodt wrote on Thu Dec 28 08:34:37 CET 2006:
I wasn't aware that epic modules are included in the ZIP archive. I copied
those files to the remote directory and the dumpvar_epic.pm is found. Your
correction in 0.5.27 solved the problem of breakpoints being ignored while
remote debugging.

Perfect, thanks for your help

Peter

Note: The above is an archived snapshot of a forum thread. Use the original thread at sf.net to post comments.