-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Nailgun python client gets connection closed #534
Comments
Thanks for reporting, and sorry for the problem. Can you just zip up the buck-out/log/ directory and include a link to that? |
It worth noting, that you could easily reproduce it yourself. All you need is to clone gerrit: [1] and apply this pending Buck upgrade patch: [2]. |
Thanks, @dborowitz. That error is helpful. It's not quite the same as the one I fixed; your error is a failure to shut down the Nailgun server. Could you possibly provide a zip of the buck-out/log/ directory as I mentioned? @davido, I have been trying and I've been unable to reproduce the problem. There's something about the build environment that triggers this issue. Here's the steps I tried; it worked fine. |
I also tried a second time and induced the client to kill the server like @dborowitz's gist, but it didn't reproduce the error: |
The zip file is in the same gist as the console output. |
Ah ha, thanks! I didn't realize you could attach binary files to gists, so my eyes just glanced over that. Reading through now. |
Aside...
Not the simplest thing in the world, you have to actually clone the gist repo and add the file manually. And directories aren't supported. shrug |
Ah, there's no buck logs in there at all, since you did It'd be great if you could reproduce this without the |
Oops. I was trying to be helpful by not polluting the directory with logs from other runs. Done: https://gist.github.com/dborowitz/d2c83924066c067dbf5f/3dd0ea6d7694544dae10024a0518c27a565575a4 |
Ah hah. I bet this is a Linux vs. OS X issue. Let me test some more on Linux. By the way, what version of Python are you running on this system? |
Python 2.7.6. |
OK, now I know what the problem is. Can you try this patch to Buck? Here's my analysis. In 3c872ec , I changed the behavior of the Buck wrapper for the Nailgun client. Previously, it would The C client would exit with error code 227 if the server ever closed the socket without sending an exit code—and this is "expected" behavior whenever running the With the new Python client, I updated the check to look for a |
Unable to reproduce this with
so I think we're good. Thanks! |
Great! Fix should land today. Thanks again for the detailed report. |
The new Buck version fixed annoying stdout spamming bug on unit test failures: [1]. Now we can revert our monkey patching hack to prevent that. Since [2] Buck interferes with files in buck-out directory: [3]. Switch to using eclipse-out directory as Eclipse output directory instead. For this change it's necessary to clean up buck-out directory, otherwise `buck test` would fail. This version also fixed "Python client lost connection" bug: [4]. This reverts commit 94e93aa. [1] facebook/buck#505 [2] facebook/buck@35cb495 [3] facebook/buck#527 [4] facebook/buck#534 Change-Id: I4cd1a99ce9d0615713c235d873e6cdd61b1854bb
Summary: Users on Linux reported the new Python Nailgun client was leaking `socket.error` exceptions. This caused the client (at least on Linux) to incorrectly exit with an error code when shutting down the server, since the server abruptly closes the socket without sending an exit code when we do that. This fixes the Python client to turn `socket.error` exceptions into `NailgunException`s with code `CONNECTION_BROKEN` to mirror the behavior of the C client. Now, the Buck wrapper for the Python Nailgun client will correctly ignore connection broken errors when shutting down the server. Closes facebook#534 Test Plan: `buck clean; buck build buck` on Mac. Asked original bug reporters to test patch, they confirmed it fixed the issue in the Gerrit repo. Reviewed By: sdwilsh fb-gh-sync-id: 1d9aa34
I'm having the issue described in d32c960, but that commit hasn't fixed the problem (I'm running at 665524d). I didn't see an open issue tracking this, so I'm filing a new one.
I went to look for the debug logging referred to in bhamiltoncx/nailgun@c2788d6, but can't find it in buck-out/log. I can reproduce this pretty reliably (25% or so of the time), so let me know where to find logs and I'll be happy to provide them.
I'm reproducing with:
The text was updated successfully, but these errors were encountered: