Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

ThreadChecker and Linux daemons

bulka
Beginner
544 Views
Is it possible to analyze threading problems in Linux daemons with the Intel Thread Checker?
I have tried to run Asterisk PBX under control of ThreadChecker. I got the following error:

[root@localhost tcheck]# tcheck_cl -- /usr/sbin/asterisk
Intel Thread Checker 3.1 command line instrumentation driver (27583)
Copyright (c) 2007 Intel Corporation. All rights reserved.

WARNING: Running tcheck_cl application in root privilleges
might lead to security leaks and is not recommended.

Building project
Instrumenting
4% asterisk ( All Functions ):........................................................
.
12% libc-2.3.4.so ( Minimal ):....
16% libcom_err.so.2.1 ( All Functions ):..
20% libcrypt-2.3.4.so ( All Functions ):..
24% libcrypto.so.0.9.7a ( All Functions ):.......................................................
28% libdl-2.3.4.so ( Minimal ):..
32% libexpat.so.0.5.0 ( All Functions ):........................
36% libgcc_s-3.4.3-20041213.so.1 ( Minimal ):..
40% libgssapi_krb5.so.2.2 ( All Functions ):...........................
44% libh323_linux_x86_r.so.1.18.0 ( All Functions ):.......................................................
.
48% libk5crypto.so.3.0 ( All Functions ):...........................
52% libkrb5.so.3.2 ( All Functions ):........................................................
56% liblber-2.2.so.7.0.6 ( All Functions ):............................
60% libldap-2.2.so.7.0.6 ( All Functions ):...............................
.
64% libldap_r-2.2.so.7.0.6 ( All Functions ):............................
68% libm-2.3.4.so ( Minimal ):..
72% libpt_linux_x86_r.so.1.10.0 ( All Functions ):.......................................................
.
76% libpthread-2.3.4.so ( Minimal ):..
80% libresolv-2.3.4.so ( All Functions ):...............................
84% libsasl2.so.2.0.19 ( All Functions ):............................
88% libssl.so.0.9.7a ( All Functions ):...............................
92% libstdc++.so.6.0.3 ( Minimal ):..
96% libtermcap.so.2.0.8 ( All Functions ):..
100% libz.so.1.2.1.2 ( All Functions ):........................

Running: /usr/sbin/asterisk

Bistro[5935]: SERVER: ERROR in unlinking /tmp/root_tc_cl_cache/VTune_FIFO_files/asterisk.bpj_6018_6018 --> No such file or directory

Application finished

_______________________________________________________________________________
|ID|Short Des|Severit|Cou|Context[|Description |1st Acce|2nd Acce|
| |cription |y Name |nt |Best] | |ss[Best]|ss[Best]|
_______________________________________________________________________________
|1 |Thread te|Informa|1 |Whole |Thread termination at |[libz.so|[libz.so|
| |rmination|tion | |Program1|[libz.so.1, 0x1630] - |.1, |.1, |
| | | | | |includes stack allocation|0x1630] |0x1630] |
| | | | | |of 10 MB and use of | | |
| | | | | |14,965 KB | | |
_______________________________________________________________________________




BTW, I have successfully compiled and analyzed program from examples/ directory that comes with ThreadChecker.
0 Kudos
4 Replies
TimP
Honored Contributor III
544 Views
I don't think you have told us what your question is. Do you mean that the unlink failure occurs only when profiling? Could you try the alternative of building it with -tcheck set?
0 Kudos
bulka
Beginner
544 Views
I am using only evaluation copy of tcheck and I does not use Intel compilers.
I have compiled project with gcc (using flags -g -O0).
The question is:
are there additional tweaks I have to apply to tchec in order to analyze a daemon process?

A also tried to profile (with tcheck) vsftpd daemon but application finished after 10 sec of run without any errors or crashes. (normally (without tcheck instrumentation) it can run forever):

[root@localhost tcheck]# tcheck_cl /usr/sbin/vsftpd
Intel Thread Checker 3.1 command line instrumentation driver (27583)
Copyright (c) 2007 Intel Corporation. All rights reserved.

WARNING: Running tcheck_cl application in root privilleges
might lead to security leaks and is not recommended.

Building project
Instrumenting
5% vsftpd ( All Functions ):............
17% libaudit.so.0.0.0 ( All Functions ):.........................
23% libc-2.3.4.so ( Minimal ):....
29% libcap.so.1.10 ( All Functions ):..
35% libcom_err.so.2.1 ( All Functions ):..
41% libcrypto.so.0.9.7a ( All Functions ):.......................................................
.
47% libdl-2.3.4.so ( Minimal ):..
52% libgssapi_krb5.so.2.2 ( All Functions ):............................
58% libk5crypto.so.3.0 ( All Functions ):.........................
64% libkrb5.so.3.2 ( All Functions ):........................................................
70% libnsl-2.3.4.so ( All Functions ):...........................
76% libpam.so.0.77 ( All Functions ):........................
82% libresolv-2.3.4.so ( All Functions ):.........................
88% libssl.so.0.9.7a ( All Functions ):.............................
94% libwrap.so.0.7.6 ( All Functions ):.......
100% libz.so.1.2.1.2 ( All Functions ):........................

Running: /usr/sbin/vsftpd


Application finished

_______________________________________________________________________________
|ID |Short |Severity |Count|Context[B|Descript|1st Access[|2nd Access[|
| |Description |Name | |est] |ion |Best] |Best] |
_______________________________________________________________________________


0 Kudos
Mark_D_Intel
Employee
544 Views
Try running asterisk as a foreground process (-f).
0 Kudos
sag_dnepr
Beginner
544 Views
Try running asterisk as a foreground process (-f).

Thx, but it stil doesn't work.

BTW I have, the same problem with asterisk. Also I try comile with icc with -tchek but doesn't work (with the same error). Please help, if you can/
0 Kudos
Reply