Don't start WebStorm as SUDO on Linux - webstorm

Don't start WebStorm as SUDO on Linux.
In terminal:
OpenJDK 64-Bit Server VM warning: Option
UseConcMarkSweepGC was deprecated in version 9.0 and will likely be
removed in a future release. No protocol specified No protocol
specified No protocol specified No protocol specified No protocol
specified No protocol specified No protocol specified No protocol
specified No protocol specified
[0727/120432.142061:FATAL:gpu_data_manager_impl_private.cc(439)] GPU
process isn't usable. Goodbye. Trace/breakpoint trap (core dumped)
How fix this problem?

Looks like a common issue with JCEF on linux:
https://simpleit.rocks/linux/ubuntu/fixing-common-google-chrome-gpu-process-error-message-in-linux/
https://support.google.com/chrome/thread/41722791?hl=en
Please try a workaround from https://youtrack.jetbrains.com/issue/IDEA-248140#focus=Comments-27-4625101.0-0: either disable jcef completely by adding -Dide.browser.jcef.enabled=false to vmoptions or uninstall/disable plugins that use JCEF (Markdown, CUBA, etc)
See also https://youtrack.jetbrains.com/issue/IDEA-248140#focus=Comments-27-4622292.0-0 for one more (possible) workaround

Related

dpdk proc info application generating version mismatch error

If there are two versions of dpdk in the system.To make the primary and secondary dpdkproc info application to use the same dpdk version I have set LD_LIBRARY_PATH to location of libdpdk.so and have run the dpdk sample application and dpdk-proc info of same version. Still Version mismatch error occurs.Please suggest some solution for this.
Based on the current update via comments, using the right DPDK version and tools (meson/makefile) the problem is resolved. This is similar to issue faced by #AshwinKumar and solution suggested DPDK proc-info.
Note: always use the same dpdk version for building primary and secodnary and pass same device arguments too.

Debug remotely on STM32CubeIDE with an STM32 eval board

I want to setup the following environment: I've got a STM32H753I-EVAL2 eval board, connected on a Windows PC. Until now I was developping and debugging locally on this PC with STM32CubeIDE. For several reasons my code source is on a Linux server (Samba mounting) so it takes forever to build a project. Hence I want to develop on the linux server from my Windows machine.
Compiling is working fine (and is way faster) but the issue is about debugging. I know it is possible to debug remotely, the Debug Configuration window from Eclipse (I'm using OpenOcd) allows to connect to a remote GDB server. What I don't know is how to start a GDB server on the Windows machine that will connect to the STM32 board ?
Sorry for the "answer to myself" but I think it might be useful for others (and even to me when I have forgotten in a few weeks ;) ).
Here is how to do.
on host side (on the machine where the eval board is physically plugged in) you have to manually launch the GDB server application that comes with STM32CubeIDE installation. See STMicro application note UM2576 for details. The default command line is:
ST-LINK_gdbserver.exe -d -v -cp "C:\ST\STM32CubeIDE_1.0.0.19w12patch\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.0.0.201903011553\tools\bin"
Now you've done the hardest. On server/remote side you have to setup the Debug Configuration to use OpenOcd with option "Connect to remote GDB server" and simply enter IP address and port number (which is not 3333 by default but 61234, but it can be modified).
This setup is working fine, even if I encoutered some instabilities during debugging once in a while.
I see two (maybe three) options
Use an alternate GDB server (see below)
Run the GDB server from STMCubeIDE in isolation (see OP's answer for Windows, this answer for Linux)
GDB Serial (not really an option right now but I'll share my experience so far)
I have used the second option to succesfully debug my target using arbitary GDBs such as gdb-multiarch command line and in the (non STMCube-ified) Eclipse CDT
Alternative GDB Servers
You could try STLink open source. I did. The problem is, your device might not be supported properly. I built 1.6.1 from Github to enable support for STM32G03x device. While moving to this version enabled it to detect the device, and I can use st-flash to program the device, the debugger is unusable (try and alter a register, it alters the wrong one, try and single step a program, it crashes immediately).
Do try it though .. it's easy and quick to install (or build), so it's worth checking if your device will work correctly with it.
Openocd is another option, but seems not to support SWD connection. I tried a build that allegedly had a patch for this but no luck.
If you can get one of these open source alternatives to work, they have another advantage, you may be able run them on something like a Raspberry PI, which means you don't have to get a PC physically close to your target.
Run the GDB server from STMCubeIDE in isolation
For Windows, see the OP's answer. For Linux, I do this alter the pathnames to suit your installation
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/apps/st/stm32cubeide_1.5.1/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_1.5.0.202011040924/tools/bin/native/linux_x64/ /home/user/apps/st/stm32cubeide_1.5.1/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_1.5.0.202011040924/tools/bin/ST-LINK_gdbserver -p 61234 -l 1 -d -s -cp /home/user/apps/st/stm32cubeide_1.5.1/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_1.5.0.202011040924/tools/bin -m 0 -k
How did I get to this? Firstly launched a debugging session from STMCubeIDE, then ran
ps aux | grep gdbserver
Then we can see how Eclipse (STMCube) is launching the gdbserver and work from there.
If you find it complains about a .so file, locate that file from the STMCube installation and ensure the path to the directory containing it is in LD_LIBRARY_PATH (as per my example)
You can also launch the program with --help to show more options.
If add -e (persistent) you can disconnect and reconnect a GDB client without resetting the target (it will reset on initial invocation of the gdb server though, even without -k).
GDB Serial
This is where the target implements the GDB server end of the protocol. The GDB stub usually runs in an exception handler. This would usually be your breakpoint handler but you can also make it the default handler for unhandled exceptions, or, for example, the ctrl-c interrupt.
I have done a lot of Googling about this recently and basically when people ask about it on forums they usually get responses along the lines of "Here be dragons" or "Why don't you use JTAG?"
So the drivers for this, you might like to know, are in the GDB sources git://sourceware.org/git/binutils-gdb.git under gdb/stubs. The documentation is here. There isn't a stub implementation there for arm. Which is sad really, I used to use GDB remote serial regularly where I worked, and some of those targets were indeed ARM. The operating system was ecos.
So could ecos GDB stubs be ported to bare metal? Having giving it a good coat of looking at, I believe yes they could. The stubs are based on the ones from the GDB sources but they are heavily polluted with Ecos and Redboot build macros and copyright (the ogiringals were written by HP and released without copyright). We don't know what bugs the Ecos stubs may contain (I fixed at least one back in the day and I don't recall whether I submitted a patch). We don't know if they really support the latests architectures properly. And, we don't know if, after that, they simply use up too much memory - my STM32 has 8K of SRAM and I already see buffers that have a default size of 2K (not saying that's necessary but you see how work needs to be done here..)
So this third option, I will revisit this one day but for now, for me, it's a nope.

Force MPI to not use network adapter

I am running a multi-process calculations using MPICH2 from Argonne National Laboratory. The run is on a single machine, so -localonly option of mpiexec is used. Usually everything works.
If the network adapter is enabled when the run starts, and if I disable it during the run, the run fails with error stating:
op_read error on left context: Error = -1
op_read error on parent context: Error = -1
unable to read the cmd header on the left context, Error = -1
.
unable to read the cmd header on the parent context, Error = -1
.
Error posting readv, An existing connection was forcibly closed by the remote host.(10054)
connection to my parent broken, aborting.
state machine failed.
However, if the network adapter is disabled when the run is started, I can enable/disable the adapter as many times as I want, and the run still proceeds to the end.
Is there a way to run mpiexec or modify smpd configuration such that MPICH2 is not using network adapter for inter-process communication for local runs even if the adapter is available when the run starts?
Update
The platform is Windows 7 Professional.
The version of MPICH2 is 1.4.1 (32-bit) which is latest version of MPICH2 that I can find.
As was posted on the mailing list, you're using a very old version of MPICH. You should update to a newer version that does all of this automatically.
UPDATE: As has been pointed out, on Windows, it's not possible to update MPICH past 1.4.1. For anything beyond that, you should use either MS-MPI or Intel MPI.

eclipse-cdt: how to suppress some GDB commands?

I have a remote GDB stub to which my GDB debugger connects over TCP/IP under the control of Eclipse-CDT. The debugger doesn't support set auto-solib-add command. So when I start the application Eclipse (among other commands) sends: -gdb-set auto-solib-add on command to the debugger and it responds with ^error,msg="No symbol \"auto\" in current context." That causes launch to fail.
I tryed to reset Load shared library symbols automatically flag under Run->Debug Configurations...->C/C++ Remote Application->Debugger->Shared libraries. But despite my expectations instead of ommiting the command it sent -gdb-set auto-solib-add off and it didn't work, too.
I need to find a way to influence Eclipse and make it suppress (or in general to gain the full control of Eclipse's behaviour) this command.
Or maybe it is possible to make GDB debugger reply with a warning instead of the error to this command?
Eclipse-CDT: Juno, 4.1.2
GDB debugger: arm-elf-gdb, 6.1
I checked CDT source and apparently there is no way to do it short of implementing custom GDB connector (or forking CDT).
This command is issued as a part of the "final launch sequence" - see org.eclipse.cdt.dsf.gdb.launching.FinalLaunchSequence:370. The reason it still sends the command when you uncheck the launch configuration box is to override whatever you may have in gdbinit.

Enable USB host functionality for my linux system

I recently downloaded new linux kernel source code and compiled on ubuntu. After my system is not recognizing any usb devices. Is there any changes required to compiling procedure or make files in order to enable USB host?
Please help me to get out of this problem. Thanks.
It is possible for the USB support to be disabled though incorrect or incomplete configuration.
You didn't mention how you configured the kernel though.
A good point to start is the existing configuration for the default Ubuntu kernel. There should be a config file in boot, like /boot/config-3.1.0-1-amd64.
Copy that file to your kernel directory as .config, then use make oldconfig to update the configuration.
When installing the kernel take care to create the corresponding initrd as well.