Xdebug initiates connections with the client on no error - xdebug

I'm experiencing an issue I'm not sure is an issue or intended.
xdebug.mode=debug
xdebug.start_upon_error=yes
There is no (uncaught) error or exception in the script, but the connection is initiated serveral times during the request handling.
This causes extremly slow responses, especially when the client is not listening, this appears in the console several times (4-6).
[Fri Apr 23 15:32:31 2021] Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
All exceptions are handled correctly, the response is OK, it's just terribly slow.
If I turn start_upon_error to no or the mode to develop, this problem vanishes.
The documentation does not state anything on this topic, while for both xdebug.show_error_trace and xdebug.show_exception_trace there is info, as follows:
When this setting is set to 1, Xdebug will show a stack trace whenever an Error is raised - even if this Error is actually caught.
So my question is, is this behaviour intended? If so, it should appear in the documentation too.
Tried this with Xdebug versions 3.0.0 and 3.0.4 (PHP 8, ZTS, x64).
Thanks for reactions in advance.

When an exception gets through, Xdebug does not know (and can not see) whether it is going to be caught. Because of that, it needs to initiate a debugging request so an IDE can handle the potential warning/error/Exception.
This is therefore intended.
As you say, it should be documented. The best way to get that sorted, is to file a feature/doc bug request at https://bugs.xdebug.org

Related

CefNet on Linux w/o X server

After a lot work invested in getting CefNet to work on Windows, I wanted to port my NET 7 app to Linux (Ubuntu). To my understanding CefNet is the only implementation that will work on Linux.
I got to a point where I am getting the exception below. Spying on source code using DotPeek leaves me under the impression that CefNet won't work in "headless" mode but will require "X server". Not sure why this would be necessary for off-screen rendering.
Any insight is appreciated.
Unhandled exception. System.InvalidOperationException: Operation is not valid due to the current state of the object.
at CefNet.CefScreenInfo.GetPrimaryScreenInfo()
at CefNet.Internal.WebViewGlue.GetScreenInfo(CefBrowser browser, CefScreenInfo& screenInfo)
at CefNet.Internal.CefRenderHandlerGlue.GetScreenInfo(CefBrowser browser, CefScreenInfo& screenInfo)
at CefNet.CefRenderHandler.GetScreenInfoImpl(cef_render_handler_t* self, cef_browser_t* browser, cef_screen_info_t* screen_info)

mod_pagespeed no longer rewrite resources

I have a webserver with PHP 7.4, and have used mod_pagespeed for a long time to speed things up.
But it's stopped working lately and I cannot figure out why. In my error logs I have lots of lines like this:
[pagespeed:warn] [pid 17853] [mod_pagespeed 1.13.35.2-0 #17853] 12029550x267x9435speilvendes-dallas.jpg:0: Resource based on https://example.no/bilder/9435speilvendes-dallas.jpg but cannot access the original
If I run the website with ?PageSpeedFilters=+debug I get a lot of these things in the source
<!--Uncacheable content, preventing rewriting of https://example.no/design/js/uploadfile.min.css-->
I've searched high and low for people with similar problems, trying to add settings for SSL to in pagespeed.conf, confirming that I can fetch the original resources from terminal etc. But i just can't get it to work.
Any ideas are welcome :)

How to fix issue with msg about blocked webdriver.dll when it is not blocked

I'm trying to run Selenium (using WebDriver 3.1.4) with ChromeDriver79 and it throws this error:
Could not load webdriver.dll and webdriver.support.dll from {path} ─
they may be blocked (Properties>General>Unblock)
That msg is wrong, however, because...
those files aren't blocked! (I ran Powershell's Unlock-File on them - but that did not change anything. Ok, is there a difference between "unlock" and "unblock"?)
ChromeDriver.exe instead was blocked - but even after
unblocking it, I got the same error
I also tested with GeckoDriver and it ran w/o problems. However, after that session I noticed that
geckodriver.eve was locked, indeed! (Makes me doubt about the validity
of the whole mechanism.) Anyway, I unlocked geckodriver and it still runs ;)
How can this problem be solved?
Update: I thought this was over when suddenly the message did not show up any more, I even closed the question. Unfortunately I rejoiced too early - it's back again now. And again: I am not aware that I changed anything in the environment. This is really painful - I will start a bounty and hope to get it resolved. This time geckodriver AND chromedriver are affected.
Looked at it again: actually these files are not locked.
I had thought the msg came straight out of Selenium, but in fact it was the error-handler of an old subroutine which did that (I inherited that code). So, the real problem is this exception when instantiating ChromeDriver:
Could not load file or assembly 'System.Security.Permissions,
Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
That issue has been discussed here before. I'm still a bit puzzled why it would work one day and fail on the next...(will update if I find out more...)

Parse4cn1 connection error

I'm facing trouble using parse4cn1 because apparently I have a connection issue with the server(back4app). I was working with parse4cn1 for quite some time and everything went fine until yesterday. Right now I am getting a ParseException when using it -
[parse4cn1] Request failed.
ParseException [code=100, msg=Connection to backend failed., cause=null]
**The project runs perfectly on a different pc. tried to use another network on this computer and still get the same connection issue.
It must be my computer blocking me from using this particular server. unfortunately I do not know how to check if this is true and obviously how to fix it..(am using netbeans if it matters..)
help would be apreciated!
Itay
Eventually the issue was in my codename1 simulator, apparently the default behavior of it is blocking all outgoing network connections (or at least that how it was for me). I had to simply change it to regular network activity.

OpenSSH failures

I am using OpenSSH version13 in a project.
However every now and then nchan.c returns an error when we are trying to connect to the product using ssh, we get the following prints in the product and then the connection is closed.
channel 0: rcvd eof
output open -> drain
channel 0: obuf empty
channel 0: close_write
channel 0: output drain -> closed
All of these outputs are from nchan.c. Just reading the code and trying to see what might have happened seems impossible to me at least! Does anyone have any clue why OpenSSH might print this error messages and close the connection?
I am hoping that someone is very familiar with the OpenSSH implementation to point me to the right direction!
I am using python to connect to the product, more specifically the python pexpect module. I set up a SSH connection, log in with user name, password and then I perform some commands and check output. This works all fine most of the times, but as explained earlier the connections fails every now and then. The output provided above can be seen in the product, and from pexpect an exception is thrown that it received EOF (End Of File) from the product (meaning that a connection could not be set up). That is pretty much all the printouts I get. I hope that someone can understand why OpenSSH does not want to setup the connection!
When SSH debugging (-v) fails to give enough output, I always start sshd in debugging mode and watch from the sshd console directly. It tends to give more feedback on exactly what the root cause is.
If you are really using the version of OpenSSH you linked to, you are using an outdated version.
The latest version of OpenSSH nchan.c file can be found here: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/nchan.c?rev=1.63;content-type=text%2Fx-cvsweb-markup and you can note the difference in version: 1.63 (dated 2010/01/26) vs 1.32 (dated 2001/10/10).
Please make sure you upgrade to the latest version of OpenSSH - I suspect you stumbled upon a bug that has been corrected a long time ago.

Resources