Software Archive
Read-only legacy content
17061 Discussions

idb debugger fails to start any programs.

Richard_Suignard
Beginner
1,223 Views
The product is parallel_studio_xe_2011_sp1_update3_intel64

As soon as you click run, after the program is loaded idb just responds with the following:

[New Thread 47144 (LWP 47144)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.


This was working fine, nothing on our end has changed.
0 Kudos
7 Replies
Georg_Z_Intel
Employee
1,223 Views
Hello,

could you provide me a simple reproducer for this problem?
When exactly do you see this error? Did the application already run for a while or does it occur right at the beginning?
Also, please let me know what OS you're running and whether it is 32 or 64 bit (OS and application).

Thank you & best regards,

Georg Zitzlsberger
0 Kudos
Richard_Suignard
Beginner
1,223 Views
It is running CentOS 6.3 (64-Bit)
Linux 2.6.32-279.2.1.el6.x86_64 #1 SMP Fri Jul 20 01:55:29 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

It occurs as soon as you try to run, never gets to user code.
It doesn't matter what program it is C/C++/Fortran even a simple "Hello World" in any of those languages, compiled with icc/gcc doesn't matter.

Doesn't matter if it is the command-line idbc/iidb or the GUI idb.

I just have the 64-bit of parallel studio installed, so they would all be 64-bit programs.
0 Kudos
Richard_Suignard
Beginner
1,223 Views
$ cat test.c
#include
int main(int argc, char *argv[])
{
  printf("Hello World!\n");
}
$ icc test.c
$ ./a.out
Hello World!
$ idbc a.out
Intel® Debugger for applications running on Intel® 64, Version 12.1, Build [78.226.14]
------------------
object file name: a.out
Reading symbols from /a.out...done.
(idb) r
Starting program: /a.out
[New Thread 51646 (LWP 51646)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb)
0 Kudos
Richard_Suignard
Beginner
1,223 Views
Looks like there is a bug where if that initial thread (used for whatever by idb) gets a PID > 32767 it dies with that error.

Starting program: /home/suignard/a.out
[New Thread 32763 (LWP 32763)]
Hello World!
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 32765 (LWP 32765)]
Hello World!
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 32767 (LWP 32767)]
Hello World!
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 32769 (LWP 32769)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 32771 (LWP 32771)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 32775 (LWP 32775)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb)
.
.

.
-then it works again once the pid wraps at 65536-
.
.
.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 65530 (LWP 65530)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 65532 (LWP 65532)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 65534 (LWP 65534)]
Cannot run thread, error #COULDNT_READ_REGISTER_VALUE
Program exited normally.
(idb) r
Starting program: /home/suignard/a.out
[New Thread 300 (LWP 300)]
Hello World!
Program exited normally.
r(idb) r
Starting program: /home/suignard/a.out
[New Thread 302 (LWP 302)]
Hello World!
Program exited normally.
r(idb) r
Starting program: /home/suignard/a.out
[New Thread 304 (LWP 304)]
Hello World!
Program exited normally.
r(idb) r
Starting program: /home/suignard/a.out
[New Thread 306 (LWP 306)]
Hello World!
Program exited normally.
(idb)



0 Kudos
Richard_Suignard
Beginner
1,223 Views
If anyone else is getting this error you can fix this by setting the pid_max kernel paramater to 32767 by (as root)

$ sysctl -w kernel.pid_max=32767


then edit /etc/sysctl.conf and add the line:
kernel.pid_max = 32767

0 Kudos
Richard_Suignard
Beginner
1,223 Views
I would still like intel to fix their issue though as I would like to increase this paramater on our development server again so we can verify our software works correctly with PIDs > 32767.
0 Kudos
Georg_Z_Intel
Employee
1,223 Views
Hello,

thank you for providing the workaround! I can confirm it. After talking with our engineers it was already fixed some weeks ago and will be first available with Intel® Composer XE 2013 (initial release), out beginning of September.
Unfortunately there won't be a fix for Intel® Composer XE 2011 anymore.

Best regards,

Georg Zitzlsberger
0 Kudos
Reply