Opened 9 years ago

Closed 9 years ago

#49647 closed defect (worksforme)

Xcode build hangs in configure phase on Yosemite

Reported by: mkae (Marko Käning) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: g5pw (Aljaž Srebrnič), neverpanic (Clemens Lang)
Port:

Description (last modified by mkae (Marko Käning))

This is the last thing I see in the log for e.g. sox:

DEBUG: Using compiler 'Xcode Clang'
DEBUG: Executing org.macports.configure (sox)
DEBUG: Environment: 
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_sox/sox/work/sox-14.4.2" && ./configure --prefix=/opt/local --enable-largefile --disable-silent-libtool --disable-openmp --enable-symlinks --without-libltdl --with-distro=macosx --with-magic --with-png --without

while the configure seemingly idles forever here on Yosemite.

Change History (18)

comment:1 Changed 9 years ago by mkae (Marko Käning)

Resolution: invalid
Status: newclosed

Just noticing that this could be caused entirely by a pending Xcode update already shown in the AppStore...

comment:2 Changed 9 years ago by mkae (Marko Käning)

Cc: g5pw@… removed
Description: modified (diff)
Port: sox removed
Resolution: invalid
Status: closedreopened
Summary: sox @ 14.4.2 : hangs in configure phase on YosemiteXcode build hangs in configure phase on Yosemite

This is indeed still an issue on an iMac running Yosemite...

Wondering why xcodebuild hangs in configure phase here, although there are NO unfinished Xcode updates dangling around.

comment:3 Changed 9 years ago by mkae (Marko Käning)

Owner: hans@… deleted
Status: reopenednew

comment:4 Changed 9 years ago by mkae (Marko Käning)

Owner: set to macports-tickets@…

comment:5 Changed 9 years ago by mkae (Marko Käning)

I tried to find out what's going on with dtrace:

$ sudo dtrace  -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' | grep xcodebuild
...
  0    151                       open:entry xcodebuild /usr/lib/libssl.0.9.8.dylib
  0    151                       open:entry xcodebuild /dev/dtracehelper
  1    151                       open:entry xcodebuild /.vol/16777219/132779777/xcodebuild/..namedfork/rsrc
  0    937              open_nocancel:entry xcodebuild /Applications/Xcode.app/Contents/Developer/usr/bin/
  0    937              open_nocancel:entry xcodebuild /Applications/Xcode.app/Contents/Developer/usr/bin//English.lproj
  0    937              open_nocancel:entry xcodebuild /Applications/Xcode.app/Contents/Developer/usr/bin//Base.lproj
dtrace: error on enabled probe ID 7 (ID 151: syscall::open:entry): invalid address (0x10f194068) in action #2 at DIF offset 24
dtrace: error on enabled probe ID 7 (ID 151: syscall::open:entry): invalid address (0x10cd77f92) in action #2 at DIF offset 24
dtrace: error on enabled probe ID 7 (ID 151: syscall::open:entry): invalid address (0x1094dd068) in action #2 at DIF offset 24
dtrace: error on enabled probe ID 7 (ID 151: syscall::open:entry): invalid address (0x1070dbf92) in action #2 at DIF offset 24
^C

Those last lines repeat on and on...

So, there seems to be some Xcode problem here!

But it seems that those errors occur also without a prior run of xcodebuild...

Last edited 9 years ago by mkae (Marko Käning) (previous) (diff)

comment:6 Changed 9 years ago by g5pw (Aljaž Srebrnič)

Interesting... It builds fine on El Cap. Did you install/update the command line tools and accepted the license again?

comment:7 Changed 9 years ago by g5pw (Aljaž Srebrnič)

Cc: g5pw@… added

Cc Me!

comment:8 Changed 9 years ago by mkae (Marko Käning)

I updated Xcode a few days ago. The command line tools were installed already before that of course. So, you think I should try reinstalling them? If they needed to be updated as well I expect the AppStore to take care of it...

Just to be sure I ran sudo xcodebuild -license once more and agreed another time, but to no avail: the configure calls still stop. :(

Last edited 9 years ago by mkae (Marko Käning) (previous) (diff)

comment:9 Changed 9 years ago by neverpanic (Clemens Lang)

We've seen those hangs in xcodebuild a couple of times now. I suspect that they are caused by a problem in a temp file – to verify that, try to blow away the contents of /var/folders and see if that helps.

Rebooting has reproducibly fixed the hangs in former cases. We'd like to find out why these hangs happen some time, though, and rebooting doesn't really do that.

comment:10 Changed 9 years ago by mkae (Marko Käning)

Oh, thanks for the hint. With that in mind I checked for access to that directory when running a build and it returned this:

$ sudo dtrace  -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' 2>/dev/null | grep folders
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  0    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  0    151                       open:entry xcrun /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/PlugInCache-xcodebuild-Debug.xcplugincache
  0    937              open_nocancel:entry quicklookd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C/com.apple.QuickLook.thumbnailcache/dirty
  0    151                       open:entry findNames /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/T/.AddressBookLocks
  0    151                       open:entry findNames /private/var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/T/.AddressBookLocks/database.lock
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mds.lock
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mdsObject.db_
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mds.lock
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mdsObject.db_
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mds.lock
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mdsObject.db_
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mds.lock
  0    151                       open:entry syncdefaultsd /var/folders/8w/q0c184t573b3_hyvdx2b4vqm0000gr/C//mds/mdsObject.db_
  0    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mds.lock
  0    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mdsObject.db_
  1    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mds.lock
  1    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mdsObject.db_
  1    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mds.lock
  1    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mdsObject.db_
  0    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mds.lock
  0    151                       open:entry syncdefaultsd /var/folders/7w/wr4npq0x6q3ccdfn18090cgw0000gp/C//mds/mdsObject.db_

when restarting the build I see the first two folder being reused:

$ sudo dtrace  -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' 2>/dev/null | grep folders
Password:
Password:
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  0    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  0    151                       open:entry xcrun /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/PlugInCache-xcodebuild-Debug.xcplugincache

I tried to delete both folders in question:

$ sudo rm -rf /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/
$ sudo rm -rf /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz

but this wouldn't change anything. Now trying to reboot the machine...

comment:11 Changed 9 years ago by mkae (Marko Käning)

After reboot the iMac suddenly had a reset system clock and asked for setting it... Strange. After a few moments obviously the time had been fetched via NTP...

OK, trying another reboot now. :(

See also this.

Last edited 9 years ago by mkae (Marko Käning) (previous) (diff)

comment:12 Changed 9 years ago by neverpanic (Clemens Lang)

I don't think the time has anything to do with it, at least I've never heard before about problems with it.

Thanks for falsifying my theory on /var/folders. Bummer that's not the issue, so we're back at square one. :/

comment:13 Changed 9 years ago by mkae (Marko Käning)

So, now after the 2nd reboot I am successful:

$ sudo dtrace  -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' 2>/dev/null | grep folders
Password:
  0    151                       open:entry backupd /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/../Cleanup At Startup/.dat00c7.000
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    937              open_nocancel:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-Ep4mjiSG
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    937              open_nocancel:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-KNfLvCHO
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    937              open_nocancel:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-yiXMp7uy
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/PlugInCache-xcodebuild-Debug.xcplugincache
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/.dat01d9.000
  0    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/CachedSpecifications-xcodebuild
  0    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/CachedSpecifications-xcodebuild
  1    151                       open:entry xcodebuild /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/CachedSpecifications-xcodebuild
  0    937              open_nocancel:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db-UXqbMjDx
  0    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  0    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry clang /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  1    151                       open:entry xcrun /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/xcrun_db
  0    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  0    937              open_nocancel:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db-VfPDiOJv
  0    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/0//com.apple.LaunchServices-107511.csstore
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mds.lock
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsObject.db_
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsDirectory.db_
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsObject.db
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsDirectory.db
  1    151                       open:entry lsregister /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/0//com.apple.LaunchServices-107511.csstore
  0    151                       open:entry lsregister /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mds.lock
  0    151                       open:entry lsregister /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsObject.db_
  0    151                       open:entry lsregister /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsDirectory.db_
  0    151                       open:entry lsregister /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsObject.db
  0    151                       open:entry lsregister /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsDirectory.db
  0    937              open_nocancel:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db-YpoxogDP
  0    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/PlugInCache-xcodebuild-Debug.xcplugincache
  1    151                       open:entry xcodebuild /private/var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/TemporaryItems/(A Document Being Saved By xcodebuild)/PlugInCache-xcodebuild-Debug.xcplugincache
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/CachedSpecifications-xcodebuild
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/CachedSpecifications-xcodebuild
  0    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C/com.apple.DeveloperTools/7.1.1-7B1005/Xcode/CachedSpecifications-xcodebuild
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mds.lock
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsObject.db_
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsDirectory.db_
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsObject.db
  1    151                       open:entry xcodebuild /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/C//mds/mdsDirectory.db
  0    937              open_nocancel:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db-ktM9hq4i
  0    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  1    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  0    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
  1    151                       open:entry clang /var/folders/mp/ymsl09l9253b3vc4b2xl9pw00000gz/T/xcrun_db
---

... after the configure it then starts to build as it should. :-)

Watch the "Cleanup At Startup" of backup right at the top! That wasn't there before when starting a build. But it's perhaps due to the reboot itself?!

Last edited 9 years ago by mkae (Marko Käning) (previous) (diff)

comment:14 in reply to:  12 Changed 9 years ago by mkae (Marko Käning)

Replying to cal@…:

I don't think the time has anything to do with it, at least I've never heard before about problems with it.

The time might have caused rpcsvchost to go rogue.

Thanks for falsifying my theory on /var/folders. Bummer that's not the issue, so we're back at square one. :/

Well, perhaps it would have helped if I had cleaned out the whole /var/folders structure?!?

comment:15 Changed 9 years ago by neverpanic (Clemens Lang)

Yeah, "Cleanup At Startup" by backupd sounds like it's due to the reboot itself. So we still don't know what's wrong, but have confirmed again that the workaround is reliable.

I don't think the complete /var/folders would have made any difference, since you verified only files in those subfolders were opened.

comment:16 Changed 9 years ago by mkae (Marko Käning)

OK, so we can close this, I guess?

Is there a more general ticket for this behaviour on trac to which could be mentioned in this ticket, so that the problem doesn't get forgotten?

Is there a wiki entry perhaps?

Last edited 9 years ago by mkae (Marko Käning) (previous) (diff)

comment:17 Changed 9 years ago by mkae (Marko Käning)

Cc: cal@… added

comment:18 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed

I don't know how to respond to this ticket but it doesn't sound like a MacPorts-specific problem so I'm going to close it. I know of no other ticket or wiki page tracking this kind of problem.

Note: See TracTickets for help on using tickets.