8 Replies Latest reply on Mar 23, 2015 11:02 PM by zhongliangong

    Segmentation fault with connection through ssh X forwarding

    yurtesen

      Hi,

       

      I have CodeXL installed on an Ubuntu box with Kaveri processor. I realized that remote connections work from some machines and it does not work from some. I have one machine with AMD GPU that CodeXL works. But 2 machines with Nvidia GPUs which cause crash.

       

      In the machine with Kaveri processor, the COMPUTE=:0 set when logging in which allows running OpenCL programs remotely.  But this seem to cause segmentation faults at CodeXL if the client machine is using a non-amd gpu (at least so far that seems to be the pattern). If I unset COMPUTE then CodeXL executes fine but does not seem to detect the GPU in the kaveri machine.

       

      Is this a known bug? or is there a workaround for this?

       

      Thanks,

        • Re: Segmentation fault with connection through ssh X forwarding
          urishomroni

          Hi yurtesen,

           

          1. The CodeXL client uses the OpenCL library for the system information, as well as to enable OpenCL debugging (as of v1.3). There is also the issue of OpenCL-OpenGL interop which might be breaking here. The latter part will change in the upcoming CodeXL version (so you will be able to run normally if OpenCL is not present. That being said, running the CodeXL client through SSH / X forwarding is not a tested scenario and may cause unexpected behavior - especially if the SSH client and server machines have different hardware configurations. The CodeXL client assumes it runs on the same machine that displays it.

           

          2. That being said, CodeXL does have an option for remote debugging (added in v1.3) - so you can have the remote machine be debugged from the other machine (do note that debugging Windows machines from Linux and vice-versa does not yet work).

           

          3. If you could provide us with the log files for the crash, we might be able to supply a better workaround / fix for the issue.

          These files are generated in /tmp/ and are called CodeXL*-<username>.log.

           

          Hope this helps,

          • Re: Segmentation fault with connection through ssh X forwarding
            yurtesen

            I am still having problems with CodeXL 1.6. I wonder if this issue will ever be fixed. It prints a slightly different message now, an assertion failure...

              • Re: Segmentation fault with connection through ssh X forwarding
                dorono

                Hi yurtesen,

                SSH forwarding presents several problems to OpenCL/OpenGL work, as you have witnessed with the failing clinfo.

                The recommended way to work with CodeXL on a remote platform is to run the CodeXL graphic client at hand and run the CodeXL Remote Agent on the remote target platform. Note: Communication between the client and agent is not secure and requires configuring your firewall to allow use of a few port numbers. The CodeXL Options dialog can be used to select these port numbers.



                  • Re: Segmentation fault with connection through ssh X forwarding
                    yurtesen

                    Dorono, can you tell why the local machine needs to have an AMD GPU to run CodeXL from a remote machine which already has an AMD GPU? This does not make much sense on my mind. It is not like I am debugging a local program. I want to debug the program which is on the remote machine.

                     

                    I tried the remote agent before but it was not working so good (I don't really remember exactly why this was at this point, it was a while ago when we used it last time). I wonder why AMD can not make it so that the remote agent is used automatically when X forwarding is used?

                     

                    In addition, CodeXL does not even start from remote location when X forwarding is used. I need to copy it to local machine first, keep versions synced etc. This situation is quite inconvenient.  Also, nvidia's debuggers work fine over forwarded X connections. This is a real inconvenience which should be fixed. People will simply use tools which work out of the box from other  manufacturers, such as CUDA tools etc.