Build failure "Command exited with code 259"

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 of 2. View the first page

  1. Ah, OK, great!

  2. 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. OK, I see. Thanks for the update. I'll continue investigating.

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

  5. 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. Great, thank you!

    -Feodor

  7. 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. Wow, that's really interesting! Could you share that project please?

  9. 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. Great, thanks!

  11. 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

  12. Hi Vinney,

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

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

  14. 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?

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

  16. 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.

  17. 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

  18. 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!

  19. 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!

  20. 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.

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

  22. 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?

  23. 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.

  24. 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!

  25. 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!

  26. 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

  27. 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.

  28. 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

  29. Feodor Fitsner: Best. Support. Ever.

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

  30. 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