Project

General

Profile

Bug #17529

Unable to use Xcode debugger after OS X update to Sierra

Added by Tracy Usher almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Setup / Environment
Target version:
-
Start date:
08/17/2017
Due date:
% Done:

100%

Estimated time:
Spent time:
Occurs In:
Experiment:
-
Co-Assignees:
Duration:

Description

I've not been able to use the Xcode debugger since updating to Sierra. If I try to attach to an active lar process I get a series of indecipherable messages all saying something like "failed to send packet" with some hex numbers. If I set up to launch lar from within Xcode then it fails but I see the following in the terminal window:

dhcp-visitor-enr-115-205:workarea usher$ error: Error reading commands from file .lldbinit - file not found.
Traceback (most recent call last):
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/site.py", line 539, in <module>
main()
ost recent call last):
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/site.py", line 539, in <module>
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/site.py", line 521, in main
hon2.7/site.py", line 539, in <module>
known_paths = addusersitepackages(known_paths)
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/site.py", line 266, in addusersitepackages
user_site = getusersitepackages()
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/site.py", line 241, in getusersitepackages
itepackages
user_base = getuserbase() # this will also set USER_BASE
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/site.py", line 231, in getuserbase
USER_BASE = get_config_var('userbase')
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/sysconfig.py", line 520, in get_config_var
userbase
return get_config_vars().get(name)
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/sysconfig.py", line 472, in get_config_vars
r
userbase
_init_posix(_CONFIG_VARS)
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/sysconfig.py", line 356, in _init_posix
config_vars
r
userbase
from _sysconfigdata import build_time_vars
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/_sysconfigdata.py", line 3, in <module>
serbase
this_python_root=env["PYTHON_ROOT"]
_vars
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/_sysconfigdata.py", line 3, in <module>
serbase
File "/LBNE/Products/LarSoft/python/v2_7_13d/Darwin64bit+16/lib/python2.7/UserDict.py", line 40, in getitem
ython2.7/_sysconfigdata.py", line 3, in <module>
serbase
raise KeyError(key)
KeyError: on/v2_7_13d/Darwin64bit+16/lib/python2.7/UserDict.py", line 40, in getitem
ython2.7/_sysconfigdata.py", line 3, in <module>
serbase
'PYTHON_ROOT'
ror(key)
KeyError: on/v2_7_13d/Darwin64bit+16/lib/python2.7/UserDict.py", line 40, in getitem
ython2.7/_sysconfigdata.py", line 3, in <module>
serbase
Assertion failed: (e == 0), function ~recursive_mutex, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/libcxx/libcxx-307.5/src/mutex.cpp, line 86.
n <module>
serbase
error: failed to send packet 00000028
error: failed to send packet 00000029
error: failed to receive response for packet (sequence ID 00000029)
error: failed to send packet 0000002a
error: failed to send packet 0000002b

This leaves me with no working option for debugging code on OS X now that I've upgraded to Sierra. As I'm not the only OS X developer I believe this will become an unacceptable situation going forward, would be nice to get some help/suggestions on solving this problem. My guess this may have something to do with the handling of environment variables? Not sure, builds launched from Xcode work fine, only debugging of executables...

History

#1 Updated by Tracy Usher almost 2 years ago

There is a hint in the above that the issue is related to python. Indeed, in emailing with Adam Lyon he suggested I try to "unsetup python" before launching Xcode and then see if I'm able to run the debugger. Indeed, that does the trick, I'm able to attach to lar and break in the debugger once I do that. So I guess the issue is really a potential conflict with python versions between what Xcode expects and what we have in larsoft?

#2 Updated by Lynn Garren almost 2 years ago

  • Status changed from New to Feedback

Certainly our python as distributed with larsoft is not the same as the python natively installed with Sierra. This is an unresolvable conflict. Does "unsetup python" solve the problem with using XCode? If so, we will make a note on the supported platform wiki page to that effect.

#3 Updated by Tracy Usher almost 2 years ago

Yes it is working for me now (thanks again to Adam's suggestion).

#4 Updated by Katherine Lato almost 2 years ago

Updated https://cdcvs.fnal.gov/redmine/projects/larsoft/wiki/_Supported_platforms_ to add the following:
Must "unsetup python" before running the Xcode debugger on Sierra.

#5 Updated by Lynn Garren almost 2 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

The LArSoft and art supported platform pages have been updated.



Also available in: Atom PDF