PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Troubleshooting PGDBG on Mac OS X

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
Forum Administrator



Joined: 09 Jul 2004
Posts: 61
Location: Lake Oswego, OR

PostPosted: Wed Jan 09, 2013 5:21 pm    Post subject: Troubleshooting PGDBG on Mac OS X Reply with quote

This posting provides a summary of how to troubleshoot problems running PGDBG on Mac OS X. This applies to PGI 13.x and before.

I. Security Considerations:

PGI 13.5 and above do not require the system configuration for debugging
and profiling that has been required in previous releases. The debugger
and profile data collector no longer need to run using "group procmod"
privileges. However, to use the PGDBG to attach PGDBG to a running
process, users must be able to enter the authentication credentials of a
user that is a member of the unix group "_developer".

Add a user to a group as follows:
Code:
sudo dseditgroup -o edit -a usernametoadd -t user _developer

See the PGI Installation Guide for details.

For 13.4 PGDBG, we recommend using the text mode debugger
(pgdbg -text) due to an OSX GUI bug.

For 13.3 and previous releases, you might see error messages
saying something like "task_for_pid failure". Follow the instructions
below or upgrade to 13.5 to eliminate these errors.

If you are using the Mountain Lion OS (10.8), then you must run PGDBG or PGCOLLECT as an admin user (e.g. root).

Make sure that the PGI software is installed on a local drive (not a network drive)

Make sure that the pgdebug, pgserv, and pgsampt executables have setgid 'procmod' permissions
Code:
    -rwxrwsr-x  1 root  procmod  23031904 Oct 19 16:35 pgdebug
    -rwxrwsr-x  1 root  procmod   1715760 Oct 19 16:35 pgsampt
    -rwxrwsr-x  1 root  procmod    135816 Oct 19 16:35 pgserv   


Make sure that the debugger user is a member of the Unix group 'procmod'
Code:
    $ id
    uid=1010(myuser) gid=1004(users) groups=1004(users),9(procmod)   


Make sure that the taskgated(8) daemon is configured to use the '-p' option in /System/Library/LaunchDaemons/com.apple.taskgated.plist. Find the 'ProgramArguments' section and make sure that '-p' is listed as shown below.
Code:
            <key>ProgramArguments</key>
            <array>
                    <string>/usr/libexec/taskgated</string>
                    <string>-p</string>
                    <string>-s</string>
            </array>


II. Troubleshooting dynamic library issues

PGDBG does not currently support debugging dynamic libraries on Mac OS X

III. Troubleshooting CANNOT LOAD errors:

(1) make sure that the main executable of the program has been built with ASLR disabled
    * this is the default when using the PGI compiler driver to link
    * if not using the PGI compiler driver to link, link with '--no_pie'
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group