Build failure "Command exited with code 259"

Vinney Kelly's Avatar

Vinney Kelly

01 Sep, 2014 05:40 PM

I'm looking for some help interpreting an error in our project's CI build. The process completes unit tests (with all tests passing) and the very next line is the error, "Command exited with code 259" (screenshot attached). There is no exception information displayed on the console or anywhere else I can find. We are using a SQL Server instance for our testing environment. Any help would be gratefully appreciated.

Best,
Vinney

Showing page 2 out of 2. View the first page

  1. Support Staff 31 Posted by Feodor Fitsner on 12 Sep, 2014 09:18 PM

    Feodor Fitsner's Avatar

    Ah, OK, great!

  2. 32 Posted by Vinney Kelly on 15 Sep, 2014 08:59 PM

    Vinney Kelly's Avatar

    Feodor,

    It looks like the 259 error code persists but we're also not seeing the test messages even though we've reverted to the Auto settings for Tests. Could this be due to the rd C:\Tools\NUnit\bin\addins -Recurse -Force command that was in the script? Do the Nunit addins need to restored?

    EDIT: Check that, we removed the rd command and the test messages are back. 259 remains though.

  3. Support Staff 33 Posted by Feodor Fitsner on 15 Sep, 2014 09:51 PM

    Feodor Fitsner's Avatar

    OK, I see. Thanks for the update. I'll continue investigating.

  4. Support Staff 34 Posted by Feodor Fitsner on 15 Sep, 2014 09:52 PM

    Feodor Fitsner's Avatar

    Will still appreciate if you could provide a simple test to reproduce the problem :)

  5. 35 Posted by Vinney Kelly on 18 Sep, 2014 03:28 PM

    Vinney Kelly's Avatar

    FYI, we're working on reproducing the error in a new build. We currently have to run the entire test suite in order to get the 259 status code. The issue appears to be related to some code in one or more of the tests. We're in the process of discovering the catalyst and will report back with our findings.

    Best,
    Vinney

  6. Support Staff 36 Posted by Feodor Fitsner on 18 Sep, 2014 03:31 PM

    Feodor Fitsner's Avatar

    Great, thank you!

    -Feodor

  7. 37 Posted by Vinney Kelly on 23 Sep, 2014 09:54 PM

    Vinney Kelly's Avatar

    Looks like we may be on to something here regarding the 259 return code. This response occurs when nunit runs for over 1 hour. We have a test project called "rvcappveyortest" which contains a single test with a 1-hour delay and will consistently reproduce the 259 error. Let me know if we can further assist the resolution of this issue.

  8. Support Staff 38 Posted by Feodor Fitsner on 23 Sep, 2014 09:57 PM

    Feodor Fitsner's Avatar

    Wow, that's really interesting! Could you share that project please?

  9. 39 Posted by Vinney Kelly on 23 Sep, 2014 10:23 PM

    Vinney Kelly's Avatar

    Sure thing. We had some of our client's code in that test set. Let me create a new project with only the code necessary for the 259 error and I'll make that public.

  10. 40 Posted by Vinney Kelly on 23 Sep, 2014 10:29 PM

    Vinney Kelly's Avatar
  11. Support Staff 41 Posted by Feodor Fitsner on 23 Sep, 2014 10:50 PM

    Feodor Fitsner's Avatar

    Great, thanks!

  12. 42 Posted by Vinney Kelly on 29 Sep, 2014 07:47 PM

    Vinney Kelly's Avatar

    Feodor,

    Just wondering if you all have had any success understanding the issue. Also, are you aware of any other projects which run unit tests for an hour or longer without experiencing this issue?

    Best,
    Vinney

  13. Support Staff 43 Posted by Feodor Fitsner on 29 Sep, 2014 08:06 PM

    Feodor Fitsner's Avatar

    Hi Vinney,

    I was going to look into that today. Will let you know about results.

  14. 44 Posted by Vinney Kelly on 30 Sep, 2014 08:36 PM

    Vinney Kelly's Avatar

    We have a green build today! It looks like you've managed to fix the error. Thanks : D

  15. Support Staff 45 Posted by Feodor Fitsner on 30 Sep, 2014 08:42 PM

    Feodor Fitsner's Avatar

    That scares me because the only thing we did yesterday was moving to a different region. :)
    However, also NUnit logger was recently moved back to use HTTP API.

    So, you have test results under "Tests" tab and don't have 259 exit code?

  16. 46 Posted by Vinney Kelly on 30 Sep, 2014 09:23 PM

    Vinney Kelly's Avatar

    On second look, the tests took less than an hour. 1 hour is the magic number where 259 errors reside.

  17. Support Staff 47 Posted by Feodor Fitsner on 30 Sep, 2014 09:31 PM

    Feodor Fitsner's Avatar

    That's interesting indeed. It seems to it's something with NUnit, maybe kind of timeout related to remote context or hosting event handler add-ins. Will investigate more.

  18. 48 Posted by Vinney Kelly on 13 Oct, 2014 09:55 PM

    Vinney Kelly's Avatar

    Hey again, Feodor! Have you managed to get any further with understanding the problem? Sorry to pester but I know it's only a matter of time before our test suite grows large enough to trigger this issue again.

    Thanks!
    Vinney

  19. Support Staff 49 Posted by Feodor Fitsner on 13 Oct, 2014 10:04 PM

    Feodor Fitsner's Avatar

    Hi Vinney,

    I think we can win more time for this issue by moving you to a new build environment! :) It's now ready for beta testing and we are going to move customers one-by-one.

    You will be the first one! I already switched your account to a new environment. You should see performance improvement by 3-5 times. Let me know about your results!

  20. 50 Posted by Vinney Kelly on 17 Oct, 2014 04:50 PM

    Vinney Kelly's Avatar

    Thanks for the preferential treatment, Feodor! We haven't been able to get a successful build since the transition due to PostSharp licensing errors. Which I thought odd since we're just using the Express version/features. I'm researching the issue but I though I should mention it just in case you know of some settings on the build server that need to be tweaked. Thanks!

  21. Support Staff 51 Posted by Feodor Fitsner on 17 Oct, 2014 04:54 PM

    Feodor Fitsner's Avatar

    Re: PostSharp licensing - that's really odd. There is basically the same VHD image as on Azure. It was unsync maybe for 2 weeks, now the list of software is identical. Public IPs are different though - maybe this is the cause.

  22. Support Staff 52 Posted by Feodor Fitsner on 17 Oct, 2014 04:55 PM

    Feodor Fitsner's Avatar

    I can put you back to Azure - just let me know.

  23. 53 Posted by Vinney Kelly on 17 Oct, 2014 05:03 PM

    Vinney Kelly's Avatar

    It's most likely something we haven't been forced to learn about using PostSharp in a non-Visual Studio environment yet. Let me see if I can get something worked out before we revert.

    As an aside, does that mean AppVeyor is not an Azure-based service anymore?

  24. Support Staff 54 Posted by Feodor Fitsner on 17 Oct, 2014 05:07 PM

    Feodor Fitsner's Avatar

    OK, let me know about your results.

    Well, we are going to maintain two environments: Azure and Hyper-V. These are like two tiers: "basic" (Azure) and "premium" (Hyper-V). There will be new plans soon using this model.

  25. 55 Posted by Vinney Kelly on 17 Oct, 2014 05:55 PM

    Vinney Kelly's Avatar

    According to PostSharp Docs, PostSharp should be able to identify when it's being invoked by an automated process; in which case, the license is not required. I'm trying to verify whether this is actually the issue we're experiencing however, I'm having a hard time actually locating my PostSharp license (StackOverflow question pending]. There is, however, a chance that the issue is due to the environment, FYI. I'll keep you posted!

  26. 56 Posted by Vinney Kelly on 17 Oct, 2014 07:06 PM

    Vinney Kelly's Avatar

    Success! It turns out PostSharp wasn't recognizing the new environment as an automated build environment. Supplying the license (which you have to fish out of the registry--see StackOverflow answer for details) fixed the issue for us. However, I imagine you'll want to get in touch with the support team and open up the discussion with them.

    As for performance on the new environment, total build time has gone from 1hr 1min on the last successful build to 20m 53s! Very nice!

  27. Support Staff 57 Posted by Feodor Fitsner on 17 Oct, 2014 07:06 PM

    Feodor Fitsner's Avatar

    How do they identify an automated process? The trick with new environment is that build agent there runs as an interactive process which can access desktop session. This is cool for various Selenium-like scenarios. I tend to think more we might revert to Windows service for now to make migration more smooth and to avoid issues like that.

    -Feodor

  28. 58 Posted by Vinney Kelly on 17 Oct, 2014 07:11 PM

    Vinney Kelly's Avatar

    I'm not really savvy about all the PostSharp details but here's what the docs say:

    The License Agreement specifies that build servers don’t need their own license. PostSharp will not attempt to enforce licensing if it detects that it runs in unattended mode. PostSharp uses several heuristics to detect whether it is running unattended. These heuristics include the use of Environment.UserInteractive, checking Process.SessionId (from Windows Vista, all processes running in session 0 are unattended), or checking the parent process.

    If this check does not work for any reason, you may use the license key of any licensed user for the build server. This will not be considered a license infringement. However, it is better to report the issue to our technical support so that we can fix the detection algorithms.

    I have informed someone from their support team of the issue so you might hear from them.

  29. Support Staff 59 Posted by Feodor Fitsner on 17 Oct, 2014 07:17 PM

    Feodor Fitsner's Avatar

    Ha ha, these are characteristics of Windows process :) Yes, build agent on a new environment gives Environment.UserInteractive = true and non-zero Process.SessionId, but that doesn't mean it's not unattended ;)

    Running in interactive mode gives more scenarios especially when testing web or Windows apps.

    OK, great it's been resolved - we should definitely contact PostSharp developers and describe the situation.

    -Feodor

  30. 60 Posted by Vinney Kelly on 17 Oct, 2014 07:22 PM

    Vinney Kelly's Avatar

    Feodor Fitsner: Best. Support. Ever.

    I think it's safe to close this thread now. Thanks for all your help!

  31. Vinney Kelly closed this discussion on 17 Oct, 2014 07:22 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM