[jira] [Commented] (SLING-5067) sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root paths in repository

2015-10-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14941149#comment-14941149
 ] 

Robert Munteanu commented on SLING-5067:


Right now I can only provide the result of 

{noformat}$ ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 127107
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 1200
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
{noformat}

I guess {{ulimit -u}} is what interests you here. As a way of debugging, maybe 
you can monitor the number of threads started in the surefire process? That 
would indicate if there is indeed a problem.

> sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root 
> paths in repository
> --
>
> Key: SLING-5067
> URL: https://issues.apache.org/jira/browse/SLING-5067
> Project: Sling
>  Issue Type: New Feature
>  Components: Testing
>Affects Versions: Testing Sling Mock 1.5.0
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>  Labels: mocks
> Fix For: Testing Sling Mock Jackrabbit 1.0.0, Testing Sling Mock 
> Oak 1.0.0, Testing Sling Mock 1.6.0
>
>
> when using resource resolver types JCR_JACKRABBIT and JCR_OAK unique root 
> paths have to be used because the repository is not cleaned up after each 
> run, and esp. if unit tests run in parallel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5067) sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root paths in repository

2015-10-01 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14940459#comment-14940459
 ] 

Robert Munteanu commented on SLING-5067:


[~sseif...@pro-vision.de] - the mock tests have recently started to fail for 
me, e.g. with

{noformat}Exception in thread "oak-scheduled-executor-3" 
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at 
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
at 
java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1018)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745){noformat}

I don't expect to fail for someone else, my laptop intentionally has a low 
process limit to catch these kinds of things :-)

git bisect indicates that this is the bad commit

{noformat}3ead30640692c1d387703e1f5c966c01f47d911b is the first bad commit
commit 3ead30640692c1d387703e1f5c966c01f47d911b
Author: Stefan Seifert 
Date:   Sun Sep 27 09:46:11 2015 +

SLING-5067 sling-mock: "uniqueRoot()" to simplify creation and cleanup of 
unique root paths in repository

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1705520 
13f79535-47bb-0310-9956-ffa450edef68

:04 04 c685db6473c73ba8a09682e691c69ec7a82d4fd8 
53f1cf2e6a2c51b6b387cad3deb24008d8b1f9f1 M  testing{noformat}

Can you take a look and see whether there are some leaks?

I would expect that an unclosed Oak repository causes this issue, as it 
internally starts some threads which are only cleaned up at shutdown. If the 
repository is not shutdown then those threads will stay alive, exhausting all 
available processes for my user -> OutOfMemoryError

> sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root 
> paths in repository
> --
>
> Key: SLING-5067
> URL: https://issues.apache.org/jira/browse/SLING-5067
> Project: Sling
>  Issue Type: New Feature
>  Components: Testing
>Affects Versions: Testing Sling Mock 1.5.0
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>  Labels: mocks
> Fix For: Testing Sling Mock Jackrabbit 1.0.0, Testing Sling Mock 
> Oak 1.0.0, Testing Sling Mock 1.6.0
>
>
> when using resource resolver types JCR_JACKRABBIT and JCR_OAK unique root 
> paths have to be used because the repository is not cleaned up after each 
> run, and esp. if unit tests run in parallel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5067) sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root paths in repository

2015-10-01 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14940516#comment-14940516
 ] 

Stefan Seifert commented on SLING-5067:
---

ah, ok? as suspected does not fail on "my machine".
what special process limit have you configured on your machine that produces 
this problem?
i wonder why esp. this commit should be the source of new troubles.
the tests of which project exactly fail on your machine? sling-mock or 
sling-mock-oak?

currently we do nothing more than closing the resource resolvers after a unit 
test is done. the underlying oak repo is currently not closed explicitly (how 
is this possible? i've not found a method for this on a first quick look.)

> sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root 
> paths in repository
> --
>
> Key: SLING-5067
> URL: https://issues.apache.org/jira/browse/SLING-5067
> Project: Sling
>  Issue Type: New Feature
>  Components: Testing
>Affects Versions: Testing Sling Mock 1.5.0
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>  Labels: mocks
> Fix For: Testing Sling Mock Jackrabbit 1.0.0, Testing Sling Mock 
> Oak 1.0.0, Testing Sling Mock 1.6.0
>
>
> when using resource resolver types JCR_JACKRABBIT and JCR_OAK unique root 
> paths have to be used because the repository is not cleaned up after each 
> run, and esp. if unit tests run in parallel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5067) sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root paths in repository

2015-09-28 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14933937#comment-14933937
 ] 

Stefan Seifert commented on SLING-5067:
---

Completed: At revision: 1705765  

unit tests are updated.

please note that this feature is not necessary for JCR_OAK, because with oak 
repository the repository is cleaned on every test run as well and even 
supports parallel execution of unit tests.

> sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root 
> paths in repository
> --
>
> Key: SLING-5067
> URL: https://issues.apache.org/jira/browse/SLING-5067
> Project: Sling
>  Issue Type: New Feature
>  Components: Testing
>Affects Versions: Testing Sling Mock 1.5.0
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>  Labels: mocks
> Fix For: Testing Sling Mock 1.6.0
>
>
> when using resource resolver types JCR_JACKRABBIT and JCR_OAK unique root 
> paths have to be used because the repository is not cleaned up after each 
> run, and esp. if unit tests run in parallel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5067) sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root paths in repository

2015-09-27 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14909672#comment-14909672
 ] 

Stefan Seifert commented on SLING-5067:
---

first implementation at revision: 1705520  

open tasks:
* rewrite current unit tests to use this feature
* add documentation

> sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root 
> paths in repository
> --
>
> Key: SLING-5067
> URL: https://issues.apache.org/jira/browse/SLING-5067
> Project: Sling
>  Issue Type: New Feature
>  Components: Testing
>Affects Versions: Testing Sling Mock 1.5.0
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>  Labels: mocks
> Fix For: Testing Sling Mock 1.6.0
>
>
> when using resource resolver types JCR_JACKRABBIT and JCR_OAK unique root 
> paths have to be used because the repository is not cleaned up after each 
> run, and esp. if unit tests run in parallel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)