NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
dbg-cli and error 98


Joined: 15 Feb 2006
Posts: 3
Reply with quote
Hi to all,

I'm using the DBG Debugger on my local machine and it works wonderfully, except for a little snag.

I'm just interested in the profiler information, so I adopted the solution reported a while ago here in this forum (howto-get-results-from-dbg-get-profiler-results-t1848.html).

the shell-script which starts the dbg-cli program in a while loop and the ~/.dbgcli_init is as the article in the above posted link.

But if I start this script, the first time it works, but after reloading the page, it gives me the following error:
Code:

Failed to start listener.Error (98)
The program is not being run.


Can anyone explain me what happens and how this error can be avoided?

Thanks in advance,
Daniel
View user's profileFind all posts by daniel.rSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
dbg-cli failed to start its listener. Most probably it is because there is another listener is already running (another copy of dbg-cli) or socket was not freed after last run. Did you kill dbg-cli?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Feb 2006
Posts: 3
Reply with quote
Hi,

I use the following shell script to run dbg-cli
Code:

#! /bin/sh
while true; do
  dbg-cli
  sleep 1
done


Theoritically after every time dbg-cli listen, it quits, the loop starts again and the previous started process should be killed.
I've noticed that it behaves always different. Sometimes it fails after the first cycle, sometimes after the nth cycle of the loop.

bye,
Daniel
View user's profileFind all posts by daniel.rSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
run
netstat -naop|grep 7869
(substitute 7869 to port number you're using for dbg communications)
and check the output to see if port is in use and what process (pid) uses it.

BTW,
a) what's the purpose of your script? What do you need to achieve?
b) check keep-alive setting for Apache to make sure keep-alive interval is short enough.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Feb 2006
Posts: 3
Reply with quote
This is the output of the netstat program, while the dbg-cli was giving the error.
tcp 0 0 0.0.0.0:7869 0.0.0.0:* LISTEN 1 2266/dbg-cli aus (0.00/0/0)

So, if I'm not wrong, a previous started dbg-cli is listening but it should not listen.

I am interested in looking at the profiler information of the running script (in order to optimize it). I've found a topic in this forum (howto-get-results-from-dbg-get-profiler-results-t1848.html) about a way of doing it, and I've adopted it.

Maybe it is not the best way do it, but if the error wouldn't encounter, it would work.

Is there a way to do it in another way? I'm just interested in the profiler data.

Thanks for your reply,
Daniel
View user's profileFind all posts by daniel.rSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
While dbg-cli listens no other dbg-cli instances can listen until the first one stops.
Effectively it means that there is no problem with dbg-cli and you got two dbg-cli instances running concurently.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Aug 2007
Posts: 1
Reply with quote
This seems to be a bug between 2.13.1 and 2.15.5 of the debugger. The problem happens with 15 but not with 13.

I manged to get 2.13 to compile and it works fine.

I had to modify line dbg_ser as follows for php 5.2.2:

--- org/dbg_ser.c 2007-08-23 03:16:19.000000000 -0400
+++ dbg-2.13.1/dbg_ser.c 2007-08-23 03:08:15.000000000 -0400
@@ -45,11 +45,12 @@
ulong index;
char *key;
int cnt = 0;
+ uint len;

zend_hash_internal_pointer_reset_ex(ht, &pos);
while (zend_hash_get_current_data_ex(ht, (void **) &tmp, &pos) == SUCCESS) {
cnt++;
- switch (ZEND_HASH_GET_CURRENT_KEY_EX(ht, &key, NULL, &index, &pos)) {
+ switch (ZEND_HASH_GET_CURRENT_KEY_EX(ht, &key, &len, &index, &pos)) {
case HASH_KEY_IS_LONG:
MAKE_STD_ZVAL(d);
d->type = IS_LONG;
@@ -69,7 +70,7 @@
#else
if (Flags & DSER_DEMANGLE) {
char *propname, *classname;
- zend_unmangle_property_name(key, &classname, &propname);
+ zend_unmangle_property_name(key, len-1, &classname, &propname);
Z_STRVAL_P(d) = propname;
Z_STRLEN_P(d) = strlen(propname);
} else {
View user's profileFind all posts by pwillia6Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
What you changed is serializer. It's responsible for sending values back to the client and is not used by the listener at all.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
dbg-cli and error 98
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic