Bug 15897 - VS 2012 lose connection to mac and can not establish it again
Summary: VS 2012 lose connection to mac and can not establish it again
Status: RESOLVED DUPLICATE of bug 15247
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 1.3.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2013-11-04 05:19 UTC by Szilárd Széll
Modified: 2016-05-10 17:02 UTC (History)
11 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 15247

Description Szilárd Széll 2013-11-04 05:19:20 UTC
Hi,

So, I start a Debug from VS 2012, connection to build host is fine, simulator showing up, app running.
But after a while, simulator exits unexpectedly (not an unhandled exception) and of course, the debugger detach.
After this, I can not connect to the build host, I have to restart VS to make it work again.

Here is the mac server log:

[2013-11-04 10:18:04.3] Started debugger!
[2013-11-04 10:18:04.3] Started debugger! [Done]
[2013-11-04 10:18:04.3] Established application connection: (output)
[2013-11-04 10:18:04.3] Established app connection: (sdb)
[2013-11-04 10:18:04.3] WaitForAppConnected Waited!
[2013-11-04 10:18:04.3] Command [DebugApplication: CommmandUrl=DebugApplication] finished (12)
[2013-11-04 10:18:04.3] Handling with command: [ChangeActiveApplication: CommmandUrl=ChangeActiveApplication] (10)
[2013-11-04 10:18:04.3] Attempting to acquire command execution lock, timeout set to 00:10:00
[2013-11-04 10:18:04.3] Command [ChangeActiveApplication: CommmandUrl=ChangeActiveApplication] finished (10)
[2013-11-04 10:18:04.3] Using https://developer.apple.com/rss/com.apple.adc.documentation.AppleiPhone6.1.atom
[2013-11-04 10:18:04.7] API Docs installed version: 44.30.0.0
[2013-11-04 10:18:04.7] API Docs official version: 44.30.0.0
[2013-11-04 10:18:04.7] Command [StatusSdk: CommmandUrl=StatusSdk] finished (9)
[2013-11-04 10:19:55.8] mtbserver: No KEEPALIVE command, exiting...
[2013-11-04 10:28:32.4] ERROR: Another instance is running
[2013-11-04 10:28:32.9] ERROR: Another instance is running
[2013-11-04 10:28:54.1] ERROR: Another instance is running
[2013-11-04 10:28:54.5] ERROR: Another instance is running
[2013-11-04 10:30:01.4] ERROR: Another instance is running
[2013-11-04 10:30:01.8] ERROR: Another instance is running

/Developer/MonoTouch/usr/bin/mtouch --version
mtouch 7.0.2.7 (57edee2)

Xamarin.iOS version 1.3.250.0
Comment 1 Alan McGovern 2013-11-07 19:19:27 UTC
The 'Another instance is running' issue should go away after a minute or two. You can speed this process up by restarting the Xamarin.iOS Build Host application on your Mac. We are actively investigating the root cause of both the connection loss and the inability to reconnect instantly.
Comment 2 Allie Miller 2013-11-14 09:31:12 UTC
This issue is still occurring in the latest version of the software (Full versioning info below)
*Note: Restarting the Build Host works for them as a workaround. 
I'll attach the mtbserver log to the bug report as well.

Windows Versioning information:
Microsoft Visual Studio Premium 2012
Version 11.0.60315.01 Update 2
Microsoft .NET Framework
Version 4.5.50709

Installed Version: Premium

LightSwitch for Visual Studio 2012 04941-004-0043007-02729
Microsoft LightSwitch for Visual Studio 2012

Office Developer Tools 04941-004-0043007-02729
Microsoft Office Developer Tools

Team Explorer for Visual Studio 2012 04941-004-0043007-02729
Microsoft Team Explorer for Visual Studio 2012

Visual Basic 2012 04941-004-0043007-02729
Microsoft Visual Basic 2012

Visual C# 2012 04941-004-0043007-02729
Microsoft Visual C# 2012

Visual C++ 2012 04941-004-0043007-02729
Microsoft Visual C++ 2012

Visual F# 2012 04941-004-0043007-02729
Microsoft Visual F# 2012

Visual Studio 2012 Code Analysis Spell Checker 04941-004-0043007-02729
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Visual Studio 2012 SharePoint Developer Tools 04941-004-0043007-02729
Microsoft Visual Studio 2012 SharePoint Developer Tools

BusinessObjectEditor 1.0
Information about my package

CodeRush for Visual Studio 12.2

DXCore for Visual Studio 12.2
DXCore for Visual Studio

Mobile.Design 1.0
Information about my package

MySQL Connector/Net 6.6.6
Data design and management tools for MySQL. Copyright © 2007-2011 Oracle, Inc.

NuGet Package Manager 2.2.40116.9051
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.0
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Refactor! for Visual Studio 12.2
Refactor! for Visual Studio

SQL Server Data Tools 11.1.20627.00
Microsoft SQL Server Data Tools

Web Developer Tools 1.2.40308.0
Microsoft Web Developer Tools contains the following components:
Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
Web Form Templates: Includes the default templates for Web Form Applications.
Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

Xamarin.Android 4.8.03015 (a25a31d0)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS 1.8.361 (e5496d20)
Visual Studio extension to enable development for Xamarin.iOS

XtraReports package 1.0
XtraReports package

Mac Versioning information:
=== Xamarin Studio ===

Version 4.2 (build 2)
Installation UUID: 29a433b3-fe29-404d-9438-fb06ce0e1d15
Runtime:
	Mono 3.2.4 ((no/294f999)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302040000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.8.3 (Starter Edition)
Android SDK: /Users/XXXXXX/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.iOS ===

Version: 7.0.4.209 (Business Edition)
Hash: 23a0827
Branch: 
Build date: 2013-11-11 16:04:00-0500

=== Build Information ===

Release ID: 402000002
Git revision: a37a8e0cda771d222cabe1f9af29c4d586e7fc7d
Build date: 2013-11-11 22:38:26+0000
Xamarin addins: 2f88a112110098d5c6964bce4251c617c2e8a968

=== Operating System ===

Mac OS X 10.9.0
Darwin XXXXXXX13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 4 Alan McGovern 2013-11-14 10:20:46 UTC
Marek, any idea what might cause this? It looks like we are unable to send a keepalive. If i remember correctly, the code which sends the keepalive requires the 'connectionLock' to be taken. My initial thought was that a thread had deadlocked while holding the connection lock making it impossible to send the keepalive, however if that happened then nothing would work. As such, this is an odd one.
Comment 7 Marek Habersack 2013-11-15 15:59:47 UTC
@Allie, so a handful of observations from the latest log:

 - there's no Android SDK or Java SDK installed, but Xamarin.Android is present
   on the system. This casues a few of the errors.
 - it appears that the VS instance is not paired with the Mac build server. 
   Customer needs to start the Xamarin Build Host App on Mac, click Unpair then
   Pair and try to connect to the machine from VS. At this point they will be
   prompted to enter the PIN generated on the Mac side.
 - mtbserver appears to be crashing on Mac. Can you please get mtbserver.log from 
   that machine?
Comment 8 Allie Miller 2013-11-15 16:02:42 UTC
Hi @Marek,
The mtbserver log is already attached to the bug. If you'd like me to get an updated log I can ask.

However, I'll also have them attempt your other suggestions and provide feedback shortly.
Comment 9 Marek Habersack 2013-11-15 16:09:53 UTC
@Allie, haha, sorry about that :) - I read only the last comment and forgot to check above. Too many bug reports to reply to :)
Comment 11 Marek Habersack 2013-11-20 10:27:05 UTC
Is the OSX version on the build machine 10.9, by chance?
Comment 13 Dominique Louis 2013-11-20 11:53:37 UTC

*** This bug has been marked as a duplicate of bug 15247 ***