[Jenkins] SUCCESS: CouchDB » master #250

2018-04-17 Thread Apache Jenkins Server
Yay, we passed. https://builds.apache.org/job/CouchDB/job/master/250/

[GitHub] nickva closed pull request #1287: Fix length badarg error in mp parser

2018-04-17 Thread GitBox
nickva closed pull request #1287: Fix length badarg error in mp parser
URL: https://github.com/apache/couchdb/pull/1287
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/couch/src/couch_httpd_multipart.erl 
b/src/couch/src/couch_httpd_multipart.erl
index e556b283fa..33795a3a1b 100644
--- a/src/couch/src/couch_httpd_multipart.erl
+++ b/src/couch/src/couch_httpd_multipart.erl
@@ -208,7 +208,8 @@ remove_writer(WriterPid, WriterRef, Counters) ->
 {ok, {WriterRef, _}} ->
 case num_mp_writers() of
 N when N > 1 ->
-num_mp_writers(N - 1);
+num_mp_writers(N - 1),
+orddict:erase(WriterPid, Counters);
 _ ->
 abort_parsing
 end;


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nickva commented on issue #1287: Fix length badarg error in mp parser

2018-04-17 Thread GitBox
nickva commented on issue #1287: Fix length badarg error in mp parser
URL: https://github.com/apache/couchdb/pull/1287#issuecomment-382231924
 
 
   Thank you!


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nickva opened a new pull request #1287: Fix length badarg error in mp parser

2018-04-17 Thread GitBox
nickva opened a new pull request #1287: Fix length badarg error in mp parser
URL: https://github.com/apache/couchdb/pull/1287
 
 
   This was introduced in:
   
   
https://github.com/apache/couchdb/commit/083239353e919e897b97e8a96ee07cb42ca4eccd
   
   Issue #1286
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nickva commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
nickva commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382166890
 
 
   Great find, @wohali !
   
   The call to length is blowing up at 
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_httpd_multipart.erl#L92
   
   Somehow we call `length(3)` on it as seen in the log line. The `Counters` is 
an orddict (implemented as a list) and length accept a list only.
   
   However in `eof` parsing stage, when writers are removed, the `C2` return 
from `remove_writer` 
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_httpd_multipart.erl#L115
   is not a list but a number or `abort_parsing` atom: 
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_httpd_multipart.erl#L225.
 The value is `3` because the new `N=2` and `put` returns the previous value 
which was `3`.
   
   The change was introduced by this commit: 
https://github.com/apache/couchdb/commit/083239353e919e897b97e8a96ee07cb42ca4eccd


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] nickva commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
nickva commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382166890
 
 
   Great find, @wohali !
   
   The call to length is blowing up at 
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_httpd_multipart.erl#L92
   
   Somehow we call `length(3)` on it as seen in the log line. The `Counters` is 
an orddict (implemented as a list). 
   
   However in `eof` parsing stage, when writers are removed, the `C2` from 
`remove_writer` 
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_httpd_multipart.erl#L115
   doesn't return a list but a number or `abort_parsing` atom: 
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_httpd_multipart.erl#L225.
 The value is 3 because N is not put into process dictionary as 3-1=2 and `put` 
returns the previous value which was 3.
   
   The change was introduced by this commit: 
https://github.com/apache/couchdb/commit/083239353e919e897b97e8a96ee07cb42ca4eccd


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali opened a new issue #273: Improve first-time install & setup

2018-04-17 Thread GitBox
wohali opened a new issue #273: Improve first-time install & setup
URL: https://github.com/apache/couchdb-documentation/issues/273
 
 
   Needs a few hints after installation:
   
   * Where is my data stored?
   * Where are my log files?
   * Where are various server-level settings stored / where should I edit?
   
   with deltas for installing by package (and, maybe, using the Docker images, 
though this is still not recommended)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382138726
 
 
   Logfile error that is telling:
   
   ```
   [error] 2018-04-17T20:43:06.499644Z couchdb01@couchdb01 emulator  
Error in process <0.11367.217> on node 'couchdb01@couchdb01' with exit value: 
{badarg,[{erlang,length,[3],[]},{couch_httpd_multipart,mp_parse_atts,2,[{file,"src/couch_httpd_multipart.erl"},{line,92}]},{couch_httpd,parse_part_body,1,[{file,"src/couch_httpd.erl"},{line,1108}]},{couch_httpd,parse_multipart_request...
   ```
   
   Other errors that follow:
   
   ```
   2018-04-17T20:45:46.292662Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
req_err(366701363) unknown_error : function_clause
 [<<"chttpd_db:update_doc/4 L1051">>,<<"chttpd_db:send_updated_doc/6 
L1015">>,<<"chttpd_db:db__doc_req/3 L832">>,<<"chttpd:process_request/1 
L295">>,<<"chttpd:handle_request_int/1 L231">>,<<"mochiweb_http:headers/6 
L124">>,<<"proc_lib:init_p_do_apply/3 L237">>]
   2018-04-17T20:45:46.293206Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
HOSTNAME IPADDR undefined PUT /{db}/{doc}?new_edits=false 500 ok 2207
   ```
   
   Note that this error doesn't seem to be on a specific "bad" doc, it's 
happening on many documents.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382138726
 
 
   Logfile error that is telling:
   
   ```
   [error] 2018-04-17T20:43:06.499644Z couchdb01@couchdb01 emulator  
Error in process <0.11367.217> on node 'couchdb01@couchdb01' with exit value: 
{badarg,[{erlang,length,[3],[]},{couch_httpd_multipart,mp_parse_atts,2,[{file,\"src/couch_httpd_multipart.erl\"},{line,92}]},{couch_httpd,parse_part_body,1,[{file,\"src/couch_httpd.erl\"},{line,1108}]},{couch_httpd,parse_multipart_request...
   ```
   
   Other errors:
   
   ```
   2018-04-17T20:45:46.292662Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
req_err(366701363) unknown_error : function_clause
 [<<"chttpd_db:update_doc/4 L1051">>,<<"chttpd_db:send_updated_doc/6 
L1015">>,<<"chttpd_db:db__doc_req/3 L832">>,<<"chttpd:process_request/1 
L295">>,<<"chttpd:handle_request_int/1 L231">>,<<"mochiweb_http:headers/6 
L124">>,<<"proc_lib:init_p_do_apply/3 L237">>]
   2018-04-17T20:45:46.293206Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
HOSTNAME IPADDR undefined PUT /{db}/{doc}?new_edits=false 500 ok 2207
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382138726
 
 
   Logfile error that is telling:
   
   ```
   [error] 2018-04-17T20:43:06.499644Z couchdb01@couchdb01 emulator  
Error in process <0.11367.217> on node 'couchdb01@couchdb01' with exit value: 
{badarg,[{erlang,length,[3],[]},{couch_httpd_multipart,mp_parse_atts,2,[{file,\"src/couch_httpd_multipart.erl\"},{line,92}]},{couch_httpd,parse_part_body,1,[{file,\"src/couch_httpd.erl\"},{line,1108}]},{couch_httpd,parse_multipart_request...
   ```
   
   Other errors:
   
   ```
   2018-04-17T20:45:46.292662Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
req_err(366701363) unknown_error : function_clause
 [<<\"chttpd_db:update_doc/4 L1051\">>,<<\"chttpd_db:send_updated_doc/6 
L1015\">>,<<\"chttpd_db:db__doc_req/3 L832\">>,<<\"chttpd:process_request/1 
L295\">>,<<\"chttpd:handle_request_int/1 L231\">>,<>,<<\"proc_lib:init_p_do_apply/3 L237\">>]
   2018-04-17T20:45:46.293206Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
HOSTNAME IPADDR undefined PUT /{db}/{doc}?new_edits=false 500 ok 2207
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382138726
 
 
   Logfile error that is telling:
   
   ```
   [error] 2018-04-17T20:43:06.499644Z couchdb01@couchdb01 emulator  
Error in process <0.11367.217> on node 'couchdb01@couchdb01' with exit value: 
{badarg,[{erlang,length,[3],[]},{couch_httpd_multipart,mp_parse_atts,2,[{file,\"src/couch_httpd_multipart.erl\"},{line,92}]},{couch_httpd,parse_part_body,1,[{file,\"src/couch_httpd.erl\"},{line,1108}]},{couch_httpd,parse_multipart_request...
   ```
   
   Other errors:
   
   ```
   2018-04-17T20:45:46.292662Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
req_err(366701363) unknown_error : function_clause
   2018-04-17T20:45:46.293206Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
HOSTNAME IPADDR undefined PUT /{db}/{doc}?new_edits=false 500 ok 2207
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali commented on issue #1286: badarg in mp_parse_atts leading to memory leak 
with replications of DBs with larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382138726
 
 
   Logfile error that is telling:
   
   ```
   [error] 2018-04-17T20:43:06.499644Z couchdb01@couchdb01 emulator  
Error in process <0.11367.217> on node 'couchdb01@couchdb01' with exit value: 
{badarg,[{erlang,length,[3],[]},{couch_httpd_multipart,mp_parse_atts,2,[{file,\"src/couch_httpd_multipart.erl\"},{line,92}]},{couch_httpd,parse_part_body,1,[{file,\"src/couch_httpd.erl\"},{line,1108}]},{couch_httpd,parse_multipart_request...
   ```
   
   Other errors:
   
   ```
   2018-04-17T20:45:46.292662Z couchdb01@couchdb01 <0.22915.217> 8b8501e841 
req_err(366701363) unknown_error : function_clause
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #1286: Memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali commented on issue #1286: Memory leak with replications of DBs with 
larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286#issuecomment-382138726
 
 
   Logfile error that is telling:
   
   ```
   [error] 2018-04-17T20:43:06.499644Z couchdb01@couchdb01 emulator  
Error in process \u003c0.11367.217\u003e on node 'couchdb01@couchdb01' with 
exit value: 
{badarg,[{erlang,length,[3],[]},{couch_httpd_multipart,mp_parse_atts,2,[{file,\"src/couch_httpd_multipart.erl\"},{line,92}]},{couch_httpd,parse_part_body,1,[{file,\"src/couch_httpd.erl\"},{line,1108}]},{couch_httpd,parse_multipart_request...
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali opened a new issue #1286: Memory leak with replications of DBs with larger docs/attachments

2018-04-17 Thread GitBox
wohali opened a new issue #1286: Memory leak with replications of DBs with 
larger docs/attachments
URL: https://github.com/apache/couchdb/issues/1286
 
 
   Well, we thought we'd fixed #745 , but we're still seeing a memory leak in 
production on replication of databases with large-ish documents (with 
attachments, docs are ~50-150 MB in size.)
   
   Review of running processes on a machine running out of RAM showed ~17k PIDs 
hung in ssl negotiation of some sort.
   
   A workaround was applied by adding `-ssl session_lifetime 300` to 
`etc/vm.args` and this stopped the massive PID leak, but memory usage continues 
to increase.
   
   At the same time, `max_http_request_size` was bumped sufficiently to handle 
the biggest doc + attachments + some overhead to ensure no problems from 413s.
   
   After the workarounds were applied, replications from the production 
(`2.1.1`) cluster to the test (`master`) cluster shows no increase in RAM, but 
only when documents were not being requested (i.e., continuous replications on 
DBs with no activity).
   
   As soon as documents needed replicating, memory usage starts to climb. A 
test script was written to one-shot replicate 4 databases from production to 
test, nuke the DBs, recreate them as empty, and repeat. The test cluster 
(target) is acting as the replicator, and `/_replicator` documents are being 
used (as opposed to `/_replicate`.) This approach steadily leaks memory in 
`beam.smp` on the test cluster.
   
   ## Current vs. Expected Behaviour
   CouchDB memory usage should be relatively flat. Instead, with the test case 
above, memory usage monotonically increases at a rate of ~250MB / 8h:
   
   
![memory-leak-1](https://user-images.githubusercontent.com/112292/38895098-15ab6208-425d-11e8-8f8e-83f344ed4f07.png)
   
   Forcing GC doesn't reduce the memory used.
   
   ## Steps to Reproduce (for bugs)
   See above - create a few databases with biggish docs/attachments on one 
server. Use another server to act both as the target and the replicator, 
running `master`. The target will experience the memory leak.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] chegeiser commented on issue #999: Fix View Attachments menu and upload modal in doc editor

2018-04-17 Thread GitBox
chegeiser commented on issue #999: Fix View Attachments menu and upload modal 
in doc editor
URL: https://github.com/apache/couchdb-fauxton/pull/999#issuecomment-382103092
 
 
   I pulled the actions.js and components.js files and put them in too my 
installation of CDB 2.1.1 - no luck. I next grabbed the latest copy of CDB from 
here: 
https://www.apache.org/dyn/closer.lua?path=/couchdb/source/2.1.1/apache-couchdb-2.1.1.tar.gz
 using the link here: 
http://mirrors.sorengard.com/apache/couchdb/source/2.1.1/apache-couchdb-2.1.1.tar.gz
   
   Still have the same problem.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[Jenkins] FAILURE: CouchDB » master #249

2018-04-17 Thread Apache Jenkins Server
Boo, we failed. https://builds.apache.org/job/CouchDB/job/master/249/

[GitHub] popojargo commented on issue #999: Fix View Attachments menu and upload modal in doc editor

2018-04-17 Thread GitBox
popojargo commented on issue #999: Fix View Attachments menu and upload modal 
in doc editor
URL: https://github.com/apache/couchdb-fauxton/pull/999#issuecomment-382072035
 
 
   Have you tried with the latest version?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #819: Debian Buster package missing

2018-04-17 Thread GitBox
wohali commented on issue #819: Debian Buster package missing
URL: https://github.com/apache/couchdb/issues/819#issuecomment-382069815
 
 
   Hi Uche @uogbuji , 
   
   Buster aka testing is not a fully supported release at this time. Again, 
when it becomes stable, we'll have an answer - which will likely mean that we 
provide libmozjs185 for buster as we do for CentOS 6.
   
   Until then you will need to compile and install libmozjs185-dev yourself.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eiri closed pull request #1285: Fix mem3 tests

2018-04-17 Thread GitBox
eiri closed pull request #1285: Fix mem3 tests
URL: https://github.com/apache/couchdb/pull/1285
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/mem3/src/mem3_shards.erl b/src/mem3/src/mem3_shards.erl
index 0975d2f8fd..c84b87397a 100644
--- a/src/mem3/src/mem3_shards.erl
+++ b/src/mem3/src/mem3_shards.erl
@@ -724,42 +724,25 @@ spawn_link_mock_writer(Db, Shards, Timeout) ->
 
 
 mem3_shards_changes_test_() -> {
-"Test mem3_shards changes listener", {
-foreach,
-fun setup_changes/0, fun teardown_changes/1,
+"Test mem3_shards changes listener",
+{
+setup,
+fun test_util:start_couch/0, fun test_util:stop_couch/1,
 [
-fun should_kill_changes_listener_on_shutdown/1
+fun should_kill_changes_listener_on_shutdown/0
 ]
 }
 }.
 
 
-setup_changes() ->
-RespDb = test_util:fake_db([{name, <<"dbs">>}, {update_seq, 0}]),
-ok = meck:expect(mem3_util, ensure_exists, ['_'], {ok, RespDb}),
-ok = meck:expect(couch_db, close, ['_'], ok),
-ok = application:start(config),
+should_kill_changes_listener_on_shutdown() ->
 {ok, Pid} = ?MODULE:start_link(),
+{ok, ChangesPid} = get_changes_pid(),
+?assert(is_process_alive(ChangesPid)),
 true = erlang:unlink(Pid),
-Pid.
-
-
-teardown_changes(Pid) ->
-true = exit(Pid, shutdown),
-ok = application:stop(config),
-meck:unload().
-
-
-should_kill_changes_listener_on_shutdown(Pid) ->
-?_test(begin
-?assert(is_process_alive(Pid)),
-{ok, ChangesPid} = get_changes_pid(),
-?assert(is_process_alive(ChangesPid)),
-true = test_util:stop_sync_throw(
-ChangesPid, fun() -> exit(Pid, shutdown) end, wait_timeout),
-?assertNot(is_process_alive(ChangesPid)),
-ok
-end).
-
+true = test_util:stop_sync_throw(
+ChangesPid, fun() -> exit(Pid, shutdown) end, wait_timeout),
+?assertNot(is_process_alive(ChangesPid)),
+exit(Pid, shutdown).
 
 -endif.
diff --git a/src/mem3/test/01-config-default.ini 
b/src/mem3/test/01-config-default.ini
deleted file mode 100644
index dde92ce2d9..00
--- a/src/mem3/test/01-config-default.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License. You may obtain a copy of
-# the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-[cluster]
-n=3
diff --git a/src/mem3/test/mem3_sync_security_test.erl 
b/src/mem3/test/mem3_sync_security_test.erl
index 8b6af3c0fa..4e06dd8073 100644
--- a/src/mem3/test/mem3_sync_security_test.erl
+++ b/src/mem3/test/mem3_sync_security_test.erl
@@ -19,11 +19,14 @@
 
 go_test() ->
 Ctx = test_util:start_couch([fabric, mem3]),
-ok = meck:new(fabric, [passthrough]),
-meck:expect(fabric, all_dbs, fun() ->
-{ok, [<<"NoExistDb1">>, <<"NoExistDb2">>]}
-end),
-Result = mem3_sync_security:go(),
-meck:unload(fabric),
-test_util:stop_couch(Ctx),
-?assertEqual(ok, Result).
+try
+ok = meck:new(fabric, [passthrough]),
+meck:expect(fabric, all_dbs, fun() ->
+{ok, [<<"NoExistDb1">>, <<"NoExistDb2">>]}
+end),
+Result = mem3_sync_security:go(),
+?assertEqual(ok, Result)
+after
+meck:unload(),
+test_util:stop_couch(Ctx)
+end.
diff --git a/src/mem3/test/mem3_util_test.erl b/src/mem3/test/mem3_util_test.erl
index 163580cc2f..214217ec4c 100644
--- a/src/mem3/test/mem3_util_test.erl
+++ b/src/mem3/test/mem3_util_test.erl
@@ -121,47 +121,18 @@ build_shards_test() ->
 %% n_val tests
 
 nval_test_() ->
-{"n_val tests explicit",
- [
-  {setup,
-   fun () ->
-   meck:new([couch_log]),
-   meck:expect(couch_log, error, fun(_, _) -> ok end),
-   ok
-   end,
-   fun (_) -> meck:unload([couch_log]) end,
-   [
-?_assertEqual(2, mem3_util:n_val(2,4)),
-?_assertEqual(1, mem3_util:n_val(-1,4)),
-?_assertEqual(4, mem3_util:n_val(6,4))
+{
+setup,
+fun() ->
+meck:new([config, couch_log]),
+meck:expect(couch_log, error, 2, ok),
+meck:expect(config, get, 3, "5")
+end,
+fun(_) -> meck:unload() end,
+[
+?_assertEqual(2, mem3_util:n_val(2, 4)),
+?_assertEqual(1, mem3_util:n_val(-1, 4)),
+ 

[GitHub] eiri closed issue #1282: Test suite mem3_shards occasionally failing.

2018-04-17 Thread GitBox
eiri closed issue #1282: Test suite mem3_shards occasionally failing.
URL: https://github.com/apache/couchdb/issues/1282
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] chegeiser commented on issue #1049: Google Chrome console error, cannot view attachments

2018-04-17 Thread GitBox
chegeiser commented on issue #1049: Google Chrome console error, cannot view 
attachments
URL: 
https://github.com/apache/couchdb-fauxton/issues/1049#issuecomment-382064649
 
 
   I've made the edits from #999 in my deployment to actions.js and to 
components.js but it I still have the problem of not being able to view the 
attachements (jpg) in Fauxton. I did notice that action.js line 217 deletes a 
few of items leaving the line as  - I assume this should 
actually be  - I've tried both ways and after restarting 
CouchDB neither way enables attachment viewing. Any ideas how to fix this, or 
why the problem remains?
   Thank you,
   Che


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] chegeiser commented on issue #999: Fix View Attachments menu and upload modal in doc editor

2018-04-17 Thread GitBox
chegeiser commented on issue #999: Fix View Attachments menu and upload modal 
in doc editor
URL: https://github.com/apache/couchdb-fauxton/pull/999#issuecomment-382061288
 
 
   I've made the edits in my deployment to actions.js and to components.js but 
it I still have the problem of not being able to view the attachements (jpg) in 
Fauxton. I did notice that action.js line 217 deletes a few of items leaving 
the line as  - I assume this should actually be  - I've tried both ways and after restarting CouchDB neither way 
enables attachment viewing. Any ideas how to fix this, or why the problem 
remains?
   Thank you,
   Che


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jareware commented on issue #1051: Couch return unknown_error / function_clause when create a user with non-string password

2018-04-17 Thread GitBox
jareware commented on issue #1051: Couch return unknown_error / function_clause 
when create a user with non-string password
URL: https://github.com/apache/couchdb/issues/1051#issuecomment-382054880
 
 
   OK, thank you, will do!


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] uogbuji commented on issue #819: Debian Buster package missing

2018-04-17 Thread GitBox
uogbuji commented on issue #819: Debian Buster package missing
URL: https://github.com/apache/couchdb/issues/819#issuecomment-382053890
 
 
   If by "well-defined development process" the following is suggested: 
http://docs.couchdb.org/en/2.1.1/install/unix.html#installation-from-source
   
   This doesn't work because libmozjs185-dev is not in buster.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eiri opened a new pull request #1285: Fix mem3 tests

2018-04-17 Thread GitBox
eiri opened a new pull request #1285: Fix mem3 tests
URL: https://github.com/apache/couchdb/pull/1285
 
 
   ## Overview
   
   After fix of `fake_db` function `mem3_shards` stopped silently failing and 
exposed race condition in  
   `mem3_shards_changes_test_` test. What was going on,  the changes listener 
started in the test's setup was crashing when tried to register on unstarted 
`couch_event` server, so the test was either fast enough to do assertions 
before of that or failed on a dead listener process.
   
   This fix removing dependency on mocking all modules involved and just uses 
standard test_util's start and stop couch. Module's start moved into the test 
body  to avoid masking a potential failure in setup.
   
   Also the tests `mem3_sync_security_test` and `mem3_util_test` been modified 
to avoid setup and teardown side effects.
   
   ## Testing recommendations
   
   Minimal run  `make eunit apps=mem3 
suites=mem3_sync_security_test,mem3_util_test,mem3_shards` should pass, along 
with complete mem3 test suite test.
   
   ## Related Issues or Pull Requests
   
   Closes #1282 
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [x] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eiri commented on issue #1282: Test suite mem3_shards occasionally failing.

2018-04-17 Thread GitBox
eiri commented on issue #1282: Test suite mem3_shards occasionally failing.
URL: https://github.com/apache/couchdb/issues/1282#issuecomment-382037948
 
 
   So what's going on is that changes listener from the tests is trying to 
register with `couch_event` and expectedly crashing `noproc`. Since this is 
happening in setup sometimes test fast enough to run before of that, sometimes 
not. Going to get rid of meck calls and do the whole validation within the test 
itself, so it'll not be hidden by crashing setup context.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali commented on issue #76: Couchdb-docker 2.1.1 indexing crashed 100K records

2018-04-17 Thread GitBox
wohali commented on issue #76: Couchdb-docker 2.1.1 indexing crashed 100K 
records
URL: https://github.com/apache/couchdb-docker/issues/76#issuecomment-382014712
 
 
   This is not a couchdb-docker specific issue. Please only raise 
couchdb-docker specific issues here.
   
   FYI, raise your `os_process_timeout` setting higher.
   
   Apache CouchDB does not officially support the python viewserver used in 
that blogpost.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wohali closed issue #76: Couchdb-docker 2.1.1 indexing crashed 100K records

2018-04-17 Thread GitBox
wohali closed issue #76: Couchdb-docker 2.1.1 indexing crashed 100K records
URL: https://github.com/apache/couchdb-docker/issues/76
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eiri closed issue #1284: Possibility to apply a maximum log size value for couch.log (Logging feature in couch_log erlang)

2018-04-17 Thread GitBox
eiri closed issue #1284: Possibility to apply a maximum log size value for 
couch.log (Logging feature in couch_log erlang)
URL: https://github.com/apache/couchdb/issues/1284
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eiri commented on issue #1284: Possibility to apply a maximum log size value for couch.log (Logging feature in couch_log erlang)

2018-04-17 Thread GitBox
eiri commented on issue #1284: Possibility to apply a maximum log size value 
for couch.log (Logging feature in couch_log erlang)
URL: https://github.com/apache/couchdb/issues/1284#issuecomment-382004345
 
 
   No there are not such functionality in couch_log. This is traditionally done 
with external tools, e.g. 
[logrotate](https://manpages.debian.org/jessie/logrotate/logrotate.8.en.html).


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cwmichi opened a new issue #1284: Possibility to apply a maximum log size value for couch.log (Logging feature in couch_log erlang)

2018-04-17 Thread GitBox
cwmichi opened a new issue #1284: Possibility to apply a maximum log size value 
for couch.log (Logging feature in couch_log erlang)
URL: https://github.com/apache/couchdb/issues/1284
 
 
   Hello,
   
   I just looked into the documentation for CouchDB 2.1.1 to limit the log 
level to maybe (warning, info, error, etc.) but is there also a possibility to 
limit the file size for the growth of the couch.log and not to get bigger than 
1 GB ?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eiri commented on issue #1051: Couch return unknown_error / function_clause when create a user with non-string password

2018-04-17 Thread GitBox
eiri commented on issue #1051: Couch return unknown_error / function_clause 
when create a user with non-string password
URL: https://github.com/apache/couchdb/issues/1051#issuecomment-381972442
 
 
   Exit reason `function_clause` is a pretty generic erlang error, meaning that 
no matching function clause was found when evaluating a function call. It could 
be thrown from any part of CouchDB and error 500 with `unknown_error` is just 
`chttpd`'s error wrapper for all generic failures on a server side. 
   
   It's impossible to tell what went wrong just by this gist, try to raise this 
with Cloudant's support next time you'll get this error and provide them 
account, database name and ref number, so they can trace the error in the 
server side logs.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] sainusahib opened a new issue #76: Couchdb-docker 2.1.1 indexing crashed 100K records

2018-04-17 Thread GitBox
sainusahib opened a new issue #76: Couchdb-docker 2.1.1 indexing crashed 100K 
records
URL: https://github.com/apache/couchdb-docker/issues/76
 
 
   
   Had issue with Couchdb-docker 2.1.1 version indexing . Always keep failed 
with CRASH error . Where as no issue for similar test in Couchdb-docker 1.7.1 
version .
   
   Pls support. 
   
   Have simulate the issue with below benchmark test .
   https://blog.idempotent.ca/2016/12/19/couchdb-indexing-benchmark/
   
   ## Expected Behavior
   
   
   
   [notice] 2018-04-17T07:13:40.759283Z nonode@nohost <0.30714.14> 0c4c72af22 
192.168.56.3:5984 192.168.56.1 admin GET 
/test/_design/scoresByMonthJS/_view/scoresByMonth?limit=21=false=0 
500 ok 5344
   [info] 2018-04-17T07:13:40.772457Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27957.21> died {bad_return_value,{os_process_error,"OS 
process timed out."}}
   [info] 2018-04-17T07:13:40.772615Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27965.21> died {bad_return_value,{os_process_error,"OS 
process timed out."}}
   [error] 2018-04-17T07:13:40.772712Z nonode@nohost <0.27958.21>  
CRASH REPORT Process  (<0.27958.21>) with 1 neighbors exited with reason: bad 
return value {os_process_error,"OS process timed out."} at 
gen_server:init_it/6(line:356) <= proc_lib:init_p_do_apply/3(line:240); 
initial_call: {couch_os_process,init,['Argument__1']}, ancestors: 
[<0.27957.21>], messages: [], links: [<0.27957.21>], dictionary: [], trap_exit: 
false, status: running, heap_size: 987, stack_size: 27, reductions: 259
   [error] 2018-04-17T07:13:40.775871Z nonode@nohost <0.27968.21>  
CRASH REPORT Process  (<0.27968.21>) with 1 neighbors exited with reason: bad 
return value {os_process_error,"OS process timed out."} at 
gen_server:init_it/6(line:356) <= proc_lib:init_p_do_apply/3(line:240); 
initial_call: {couch_os_process,init,['Argument__1']}, ancestors: 
[<0.27965.21>], messages: [], links: [<0.27965.21>], dictionary: [], trap_exit: 
false, status: running, heap_size: 987, stack_size: 27, reductions: 259
   [error] 2018-04-17T07:13:40.791621Z nonode@nohost <0.27564.21>  
CRASH REPORT Process  (<0.27564.21>) with 1 neighbors exited with reason: bad 
return value {os_process_error,"OS process timed out."} at 
gen_server:init_it/6(line:356) <= proc_lib:init_p_do_apply/3(line:240); 
initial_call: {couch_os_process,init,['Argument__1']}, ancestors: 
[<0.27966.21>], messages: [], links: [<0.27966.21>], dictionary: [], trap_exit: 
false, status: running, heap_size: 987, stack_size: 27, reductions: 259
   [info] 2018-04-17T07:13:40.791680Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27966.21> died {bad_return_value,{os_process_error,"OS 
process timed out."}}
   [info] 2018-04-17T07:13:40.791712Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27963.21> died {bad_return_value,{os_process_error,"OS 
process timed out."}}
   [error] 2018-04-17T07:13:40.792060Z nonode@nohost <0.27795.21> 0c4c72af22 
rexi_server: from: nonode@nohost(<0.30714.14>) mfa: fabric_rpc:map_view/5 
throw:{timeout,{gen_server,call,[couch_proc_manager,{get_proc,<<"javascript">>},5000]}}
 
[{couch_mrview_util,get_view_index_state,5,[{file,"src/couch_mrview_util.erl"},{line,101}]},{couch_mrview_util,get_view,4,[{file,"src/couch_mrview_util.erl"},{line,45}]},{couch_mrview,query_view,6,[{file,"src/couch_mrview.erl"},{line,244}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,139}]}]
   [error] 2018-04-17T07:13:40.792545Z nonode@nohost <0.27970.21>  
CRASH REPORT Process  (<0.27970.21>) with 1 neighbors exited with reason: bad 
return value {os_process_error,"OS process timed out."} at 
gen_server:init_it/6(line:356) <= proc_lib:init_p_do_apply/3(line:240); 
initial_call: {couch_os_process,init,['Argument__1']}, ancestors: 
[<0.27963.21>], messages: [], links: [<0.27963.21>], dictionary: [], trap_exit: 
false, status: running, heap_size: 987, stack_size: 27, reductions: 259
   [info] 2018-04-17T07:13:40.800128Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27951.21> died {bad_return_value,{os_process_error,"OS 
process timed out."}}
   [error] 2018-04-17T07:13:40.800380Z nonode@nohost <0.27969.21>  
CRASH REPORT Process  (<0.27969.21>) with 1 neighbors exited with reason: bad 
return value {os_process_error,"OS process timed out."} at 
gen_server:init_it/6(line:356) <= proc_lib:init_p_do_apply/3(line:240); 
initial_call: {couch_os_process,init,['Argument__1']}, ancestors: 
[<0.27951.21>], messages: [], links: [<0.27951.21>], dictionary: [], trap_exit: 
false, status: running, heap_size: 987, stack_size: 27, reductions: 259
   [info] 2018-04-17T07:13:40.812515Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27949.21> died {bad_return_value,{os_process_error,"OS 
process timed out."}}
   [info] 2018-04-17T07:13:40.812585Z nonode@nohost <0.209.0>  
couch_proc_manager <0.27964.21> died {bad_return_value,{os_process_error,"OS 
process timed 

[GitHub] jareware commented on issue #1051: Couch return unknown_error / function_clause when create a user with non-string password

2018-04-17 Thread GitBox
jareware commented on issue #1051: Couch return unknown_error / function_clause 
when create a user with non-string password
URL: https://github.com/apache/couchdb/issues/1051#issuecomment-381873193
 
 
   We're on the (new) IBM-hosted Cloudant, and have randomly gotten a few:
   
   ```
   { error: 'unknown_error', 
 reason: 'function_clause', 
 ref: 687197157, 
 name: 'unknown_error', 
 status: 500, 
 message: 'function_clause' } 
   ```
   
   on our logs. It's from a `_changes` listener, so shouldn't have anything to 
do with password hashing.
   
   Any ideas..?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services