I’m trying to profile a prototype application using the NVidia OpenCL profiler. Unfortunately, the profiler appears to hang the Xorg process indefintely. From the process tree I can see my application has finished running:
├─gdm-binary,8461 -nodaemon
│ └─gdm-binary,8980 -nodaemon
│ ├─Xorg,8983 :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt8
│ └─gnome-session,9008
│ └─ssh-agent,9044 /bin/sh -c ...
├─gdm-rh-security,8498
│ └─{gdm-rh-security},8507
├─gnome-keyring-d,9087
├─gnome-panel,9108 --sm-client-id default2
├─gnome-power-man,9175
├─gnome-screensav,9225
├─gnome-settings-,9089
│ └─{gnome-settings-},9091
├─gnome-terminal,9196
│ ├─bash,9200
│ │ └─gdb,9289 --args ./openclprof
│ │ └─openclprof,9290
│ │ └─{openclprof},9294
│ ├─bash,9253
│ ├─gnome-pty-helpe,9199
│ └─{gnome-terminal},9201
However, the entire gnome desktop environment is frozen. The Xorg process is running at full tilt:
top - 14:38:14 up 5:10, 7 users, load average: 1.00, 1.00, 0.98
Tasks: 193 total, 2 running, 191 sleeping, 0 stopped, 0 zombie
Cpu(s): 25.0%us, 0.1%sy, 0.0%ni, 74.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1025756k total, 758716k used, 267040k free, 27052k buffers
Swap: 3469384k total, 172k used, 3469212k free, 448460k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8983 root 25 0 3180m 27m 16m R 99.8 2.8 134:15.38 Xorg
9615 root 15 0 32908 2236 1540 R 0.3 0.2 0:00.03 top
1 root 15 0 10344 700 584 S 0.0 0.1 0:02.41 init
strace shows that Xorg is looping forever in sigalrm calls:
root@tesla/scr/coleb/oecl$ strace -p 8983 2>&1 | head
Process 8983 attached - interrupt to quit
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = 2147483648
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = 2147483648
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = 47405314768896
--- SIGALRM (Alarm clock) @ 0 (0) ---
rt_sigreturn(0xe) = 47405314768896
--- SIGALRM (Alarm clock) @ 0 (0) ---
My only recourse at this point is to ‘kill -9’ the Xorg process. Is there any way to run the profiler without the GUI?