View Issue Details

IDProjectCategoryView StatusLast Update
0002068Slicer4Core: Documentation and Wikipublic2012-05-18 11:48
Reporterjcfr Assigned Tocrmullin  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.1.1 
Summary0002068: Update wiki adding information specific to GDB / Attach process
Description

See http://www.slicer.org/slicerWiki/index.php/Documentation/4.1/Developers/Tutorials/Debug_Instructions#GDB_debug_by_attaching_to_running_process_.5BRECOMMENDED.5D

To create a wiki account - see http://www.slicer.org/slicerWiki/index.php/Special:RequestAccount

Additional Information

From christopher.mullins - May 16, 2012:

In Ubuntu 10.10, Ubuntu introduced a patch to disallow ptracing of non-child processes by non-root users -ie. only a process which is a parent of another process can ptrace it for normal users.
You can temporarily disable this restriction by:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
To permanently allow it to edit /etc/sysctl.d/10-ptrace.conf and change the line:
kernel.yama.ptrace_scope = 1
to read:
kernel.yama.ptrace_scope = 0

See http://askubuntu.com/questions/41629/after-upgrade-gdb-wont-attach-to-process

There's also a good suggestion on there about adding it to the user's bin file, to turn it on and off since it's a security thing.

TagsNo tags attached.

Activities

jcfr

jcfr

2012-05-17 08:53

administrator   ~0004458

Would it be possible to update the following text:

Now, run "ps -Afww | grep SlicerQT-real" and note the PID of this binary.
Now, run "gdb --pid $PIDABOVE"

"SlicerQT" has been changed into "SlicerApp".

Would also possible to talk about "--attach-process" ?

Thanks

crmullin

crmullin

2012-05-18 11:42

developer   ~0004500

Added the following to the wiki:

An alternative to quickly obtain the PID -- Run Slicer with the following command line argument:

$ ./Slicer --attach-process

This will bring up a window with the PID before loading any modules, which is helpful for debugging the loading process.

jcfr

jcfr

2012-05-18 11:48

administrator   ~0004501

Re-organized the section: http://www.slicer.org/slicerWiki/index.php/Documentation/4.1/Developers/Tutorials/Debug_Instructions#GDB_debug_by_attaching_to_running_process_.5BRECOMMENDED.5D

Issue History

Date Modified Username Field Change
2012-05-16 12:10 jcfr New Issue
2012-05-16 12:11 jcfr Assigned To => crmullin
2012-05-16 12:11 jcfr Status new => assigned
2012-05-16 12:11 jcfr Description Updated
2012-05-16 12:11 jcfr Target Version => Slicer 4.2.0 AHM Summer 2012
2012-05-17 07:07 crmullin Status assigned => resolved
2012-05-17 08:53 jcfr Note Added: 0004458
2012-05-18 11:42 crmullin Note Added: 0004500
2012-05-18 11:42 crmullin Status resolved => feedback
2012-05-18 11:42 crmullin Resolution open => reopened
2012-05-18 11:48 jcfr Note Added: 0004501
2012-05-18 11:48 jcfr Status feedback => closed
2012-05-18 11:48 jcfr Resolution reopened => fixed
2012-05-18 11:48 jcfr Fixed in Version => Slicer 4.1.1
2016-06-20 14:15 jcfr Category Core: Documentation & Wiki => Core: Documentation and Wiki