[reviewer]
enableByEmail = true
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In the end we found (and it has happened three times now) that gerrit's email thread gets stuck in some sort of deadlock talking to the mail server
Hostname (or IP address) of a SMTP server that will relay messages generated by Gerrit to end users. By default, 127.0.0.1 (aka localhost). DO NOT CHANGE, ANYTHING ELSE MAY CAUSE RANDOM DEADLOCKS.
On 6 Nov 2018, at 19:35, Richard Christie <r.d.f.c...@gmail.com> wrote:Sadness! I wish I had known.Suggest that documention for smtp is updated:
Hostname (or IP address) of a SMTP server that will relay messages generated by Gerrit to end users. By default, 127.0.0.1 (aka localhost). DO NOT CHANGE, ANYTHING ELSE MAY CAUSE RANDOM DEADLOCKS.
That said it has been working absolutely fine until 2.15 which is the first time we've seen it have issues. It still works fine 99% of the time.
Anyway, thanks for the info!
Is this related to this issue? https://bugs.chromium.org/p/gerrit/issues/detail?id=3259&can=2&start=0&num=100&q=&colspec=ID%20Type%20Stars%20Milestone%20Status%20Priority%20Owner%20Summary&groupby=&sort=
I’ll say here what I said there:
We recently ran into this issue as well after upgrading to 2.15.2. After doing some research, the fact that it gets hung appears to be a java issue, not a Gerrit issue. If you look a the thread dump for the sendemail thread, it's stuck in the socketRead0 method (which is a native java read method). Why it is initially stuck in that method is still unclear because there's very little information to go off of (thread dumps, logs, etc. don't reveal anything).
Gerrit does provide you with a connectTimeout config setting under sendmail, but that config setting doesn't do anything because there's a bug in the socketRead0 method. Check the description of the bug here to find the details of why the timeout doesn't affect anything: https://bugs.openjdk.java.net/browse/JDK-8075484
The above bug was fixed in java version 9, and was backported to many versions of java 1.8. Unfortunately the fix was not backported to the native java version that you get when you run apt-get install java (1.8.0_181), so you need to first verify that the bug fix was not backported to the version of java you're running, check the list of versions the bug fix *was* backported to (in the link above), then upgrade to one of those specific versions (We were running java 1.8.0_171 and upgraded to 1.8.0_172). Or, you can simply upgrade to any Java version 10+. You also need to make sure you add a sendemail.connectTimeout in your gerrit.config, because it's set to infinite by default.
I do believe there is a Gerrit bug within all this, however. When the mail thread is hung, I would expect killing the thread would open up that thread for other mail tasks to run, but killing the hung thread does nothing except kill that thread. All the queued mail tasks never move from waiting to running. The only way to recover after that is to restart Gerrit.
Thanks,
Luke