PhpStorm freezes when trying to acces the PHP -> Servers settings

When I try to access the PHP → Servers settings, the entire IDE freezes and I'm forced to kill the process and restart. Unfortunately, since this is the last settings page I accessed, the IDE now freezes whenever I open the settings dialog.

I've uploaded my threaddump files here in the hopes that they will help:

Upload id: 2024_04_22_tdjS8b15LHmMdwUKWr7HX1

2
14 comments

Hey,

Thank you for sharing the freeze thread dumps.

Would it be possible to collect & share a full logs pack?
(Help > Collect Logs)

0

Hi here's my logs:

 

Upload id: 2024_04_23_6YpLJi7fKonFpZr7KtETdG

0

Thank you for sharing the full logs pack.

Basically, there is a similar issue on YouTrack:
https://youtrack.jetbrains.com/issue/WI-77238/PhpStorm-stuck-when-trying-to-create-a-new-Server

Both your case and the one mentioned above also have signs of the following issue:
https://youtrack.jetbrains.com/issue/WI-76242/UI-freezes-in-com.jetbrains.php.composer.lib.ComposerLibrariesNodePatcher.

 

So it might be related to the Composer subsystem or, to be specific, a structure/number of added packages.
 

Could you please tell a bit more about your project? 
Do you have multiple composer.json files in it? Can you share a project's `.idea` folder as well? 

0

Interesting…

 

I'm not using the AWS plugin. So the first issue you linked isn't really relevant.

However, the project is a drupal project with multiple contrib drupal modules which typically have composer.json files in them. So it's possible the second issue is related.

 

Here is my .idea folder (gzipped): Upload id: 2024_04_23_22e9ANTWmX9GbQRdwNeww8

0

Thank you for sharing the `.idea` folder!

I'm not using the AWS plugin. So the first issue you linked isn't really relevant.

Turns out it has nothing to do with the AWS plugin, it was just a theory.
Apparently, it is an aforementioned Composer issue causing this new problem. Personally, I have seen it on Magento and Drupal projects with lots of dependencies and child “composer.json” files.

We will try to reproduce it on our side and deliver a fix as soon as possible. Thanks again!

0

Just sharing that…
Mine has been frozen a couple of times on randomly different Magento 2 projects, upon clicking to PHP > Servers, regardless of the weight.
As a workaround, I first removed .idea folder so the IDE might start all over again and hopefully it worked.
Recently, I simply removed the path to composer.json and it's also resolved.

Looking forward for a fix soon.
Thanks.

0

the same happens for me with few Magento 2 websites
removing .idea directory helps

0

I have the same problem when upgrading to 2024.2 for all my magento installations. Basically freezes on the Php→Servers window.

Removing project's .idea helps but of course I lose all my settings for the project (xdebug, exlude and source folders ecc). Not really a viable solution but can be used as a last resort.

it seems something has changed on the way 2024.2 reads the xml files in .idea that contains the “Servers” list. 

As a better workaround rename the .idea/workspace.xml file and it will work just fine. After a few tests it turned out it is the workspace.xml component composerConfigs:

<component name="ComposerConfigs">
   <option name="configs">
   .....

there are no more that 70 lines in the file ComposerConfigs component.

this seems to confirm Vasiliy Yur theory about the issue being related to child composer files, but perhaps it's more complicated than that. I thought I could easily reproduce with a vanilla magento 2 installation. But the thing is this: let's say I have 10 different magento 2 projects: when you experience the issue with project “1" you can close project 1 and go to project “2”, “3” ecc and they all experience the issue as log as you have something already set in Php→Servers. But when you fix the .idea in the project "1" folder…. the other projects get fixed as well, no matter if they have their own .idea folder. This is absolutely weird for me and I can not find any explanation for that. Perhaps it has something to do with a global reindex being carried out after upgrade? this will lock many functions but if it is the case, the notice reindex in progress does not appear: it could simply be “under the hood” as a consequence of the 2024.2 upgrade.

**********

Furthermore, if submitting a report for an error it gives “Success” and then a successive popup with “Error” pops up and it is not possible to close the “Report error” popup window: it continues to popup in a loop. The only solution is killing phpstorm via terminal.

Running 2024.2 on Ubuntu 20.04.6 LTS

0

Hey,

Sorry, I have just noticed your reply.

Removing project's .idea helps but of course I lose all my settings for the project (xdebug, exlude and source folders ecc). Not really a viable solution but can be used as a last resort.

it seems something has changed on the way 2024.2 reads the xml files in .idea that contains the “Servers” list. 

From what I have noticed, “PHP > Servers” (and the whole tab in general) may freeze on an include paths enumeration. It might happen when the list of paths is abnormally huge. In one case, I have noticed more that 130k records most of those were simply duplicates (600+ cloned entries of each path). And of course, these freezes are reproducible for me if I manually create similar conditions in `php.xml` file by cloning <include_path> section contents several times.

The question remains why this list if filled with duplicates and why it mostly happen in Magento/Drupal projects, though.
Do you mind me asking to share a copy of an `.idea` folder next time you notice freezes in “PHP > Servers” before recreating the whole directory? That would help to prove my theory regarding the overgrowing `php.xml` and `workspace.xml` configuration files.

0

thanks Vasiliy Yur 

sure no problem. I guess I can reproduce it opening a “old” project. I'll send you the .idea folder asap

by the way, where do you see duplicates? I mean, the “600+ cloned entries of each path”: in .idea/workspace.xml and .idea/workspace.xml?

I don't see any duplication in there. I just checked a magento 2 project.

let me try to launch it with the new phpstorm version just to check if it causes the duplicates. I'll sent you the .idea folder before and after it that happens.

thanks a lot 

0

so Vasiliy Yur this is what I checked.

  • check an old project .idea without opening phpstorm: no issues, no duplications.
  • check an old project .idea with php storm new version (the 2024.2 version that has been known for causing the issue): no issues, no duplications.
  • let reindex be completed: no issues, no duplications.
  • reopen ide:  no issues, no duplications.
  • re-try everything with project up and running (docker): no issues, no duplications.

basically is not reproducible anymore using PhpStorm 2024.2.3 Build #PS-242.23339.16, built on September 25, 2024

what I see is that directly or indirectly it has been fixed by one of the latest builds

0

Hi,

Thank you for your reply!

by the way, where do you see duplicates? I mean, the “600+ cloned entries of each path”: in .idea/workspace.xml and .idea/workspace.xml?

From what I saw already, both `php.xml` (which is more important) and `workspace.xml` are affected. Namely, this section:

<component name="PhpWorkspaceProjectConfiguration" interpreter_name="my cool interpreter"> 
	<include_path> 
		<path value="$PROJECT_DIR$/vendor/some/library" />
		... thousands of identical records for each library ...

In the most recent case last week, there was more than a thousand (!) identical records for each library summing up the `php.xml`/`workspace.xml` file growth to 40+ MB.

Surely, the `.idea` folder recreation helps to get rid of these records for a while but the main thing that we cannot yet understand and reproduce is how those records appear multiple times. Also, it is yet unknown if it happens instantly after some external action or duplicated records are being accumulated over the time.

By the way, there is already an internal fix that mitigates freezes on abnormally huge `<include_path>` section. Once it fully tested for any possible side effects, hopefully, it will be introduced in nearest next versions.

0

mmh.. I can confirm I see no duplicates in workspace.xml and php.xml. I checked a dozen of projects and apparently the issue is not reproducible.

I can confirm It happened to me right after the phpstorm ide upgrade, and resrtarting ide/pc didn't help. 

 

0

Since updating this morning, I cannot open settings at all. None of the PHP Settings load, when I open settings, I get the pinwheel preloader, and under Settings > PHP, it just says “loading….”.

I'm on a Mac, if I CMD+OPT+ESC, PHPStorm is listed as Not Responding.

Is there a fix for this? I do not see one in this thread.

PhpStorm 2024.3
Build #PS-243.21565.202, built on November 13, 2024
Licensed to Action Industrial Supply / Aaron McGuire
Subscription is active until March 31, 2025.
Runtime version: 21.0.5+8-b631.16 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.5
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 20000M
Cores: 16
Metal Rendering is ON
Registry:
 projectView.hide.dot.idea=false
 run.processes.with.pty=TRUE
 ide.experimental.ui=true
 i18n.locale=
Non-Bundled Plugins:
 com.intellij.ml.llm (243.21565.247)
 org.jetbrains.plugins.gitlab (243.21565.204)
 org.jetbrains.plugins.github (243.21565.204-ultimate)
 de.php_perfect.intellij.ddev (1.2.5)
 com.ppolivka.plugin.gitcleaner (1.1.4)
 

 

  Model Name: MacBook Pro

  Model Identifier: Mac15,9

  Model Number: MUW63LL/A

  Chip: Apple M3 Max

  Total Number of Cores: 16 (12 performance and 4 efficiency)

  Memory: 48 GB

  System Firmware Version: 10151.121.1

  OS Loader Version: 10151.121.1

  System Version: macOS 14.5 (23F79)

  Kernel Version: Darwin 23.5.0

  Boot Volume: Macintosh HD

  Boot Mode: Normal

  Secure Virtual Memory: Enabled

  System Integrity Protection: Enabled

 

0

Please sign in to leave a comment.