Re: Jenkins on Websphere 8.5 - out of memory (heap)

2016-09-21 Thread Tomáš Mrázek
300kb is not much, but if you look at the implementation of the called 
method 
https://github.com/kohsuke/winp/blob/master/src/main/java/org/jvnet/winp/WinProcess.java
 
,I got heap exception at line 144. The method creates substrings in loop 
string lenght > 0. So theoretically after each iteration it stores to RAM 
another string with one character less.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0c2d5194-6237-4619-b780-648f0abc8a23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins on Websphere 8.5 - out of memory (heap)

2016-09-20 Thread Baptiste Mathus
I must be missing something. 15 characters is not that much in memory.
Let's say around 300 kilo bytes actually in the JVM memory in utf 16. So I
don't get where those 11GB come from.

Or do you mean 15 strings of characters of various sizes?

Cheers

Le 20 sept. 2016 8:51 AM, "Tomáš Mrázek"  a
écrit :

> JDK1.8, max heap was set up to 2048M. Implementation for that 
> WinProcess.parseCmdLineAndEnvVars
> is by creating substrings with one character less and with my baisc
> calculations, with 150k char String and possibly zero GC I would need 11
> gb, That's out of question for such a simple task.There must be something
> wrong between native method ang getting env variables from WAS.
>
> Dne pondělí 19. září 2016 21:03:14 UTC+2 Baptiste Mathus napsal(a):
>>
>> What's the Xmx value for that Websphere? Which JDK version, and so on?
>>
>> 2016-09-19 17:15 GMT+02:00 Tomáš Mrázek :
>>
>>> So I installed 2.7.4 on Websphere 8.5.5.9.
>>>
>>> I'm running job with a maven build. Everything is fine, ear is created,
>>> but after that Jenkins stucks and throws Heap error (while creating
>>> enviroment variables like JENKINS_HOME).
>>>
>>> FATAL: ...java.lang.OutOfMemoryError 
>>> : 
>>> ... Java Heap Error
>>> at java.lang.String.(String.java:388) 
>>> 
>>> at java.lang.String.substring(String.java:1372) 
>>> 
>>> at 
>>> org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:144) 
>>> 
>>> at 
>>> org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:121) 
>>> 
>>> at 
>>> hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:453)
>>>  
>>> 
>>> at 
>>> hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:277) 
>>> 
>>> at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:479) 
>>> 
>>> at hudson.Launcher$LocalLauncher.kill(Launcher.java:838) 
>>> 
>>> at 
>>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:540)
>>>  
>>> 
>>> at hudson.model.Run.execute(Run.java:1741) 
>>> 
>>> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
>>> 
>>> at hudson.model.ResourceController.execute(ResourceController.java:98) 
>>> 
>>> at hudson.model.Executor.run(Executor.java:410) 
>>> 
>>> Finished: FAILURE
>>>
>>>
>>> So I tried to run simple Groovy script in Jenkins console
>>>
>>>
>>> import org.jvnet.winp.Native;
>>> println(Native.parseCmdLineAndEnvVars("jenkins server pid"))
>>>
>>>
>>> and I got string with 150k chars long, where only first thousand are 
>>> regular chars with env variables and the rest is some chinese weirdo chars. 
>>> I tried to run Jenkins with UTF-8 by specifying
>>>
>>> -Dclient.encoding.override=UTF-8 which ofc does not help.
>>>
>>>
>>> I'm quite hopeless and I don't know, how to fix this. Any suggestions?
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/57539fe9-a06a-4bb8-aa89-7c27cd538359%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 

Re: Jenkins on Websphere 8.5 - out of memory (heap)

2016-09-20 Thread Tomáš Mrázek
JDK1.8, max heap was set up to 2048M. Implementation for 
that WinProcess.parseCmdLineAndEnvVars is by creating substrings with one 
character less and with my baisc calculations, with 150k char String and 
possibly zero GC I would need 11 gb, That's out of question for such a 
simple task.There must be something wrong between native method ang getting 
env variables from WAS.

Dne pondělí 19. září 2016 21:03:14 UTC+2 Baptiste Mathus napsal(a):
>
> What's the Xmx value for that Websphere? Which JDK version, and so on?
>
> 2016-09-19 17:15 GMT+02:00 Tomáš Mrázek  >:
>
>> So I installed 2.7.4 on Websphere 8.5.5.9.
>>
>> I'm running job with a maven build. Everything is fine, ear is created, 
>> but after that Jenkins stucks and throws Heap error (while creating 
>> enviroment variables like JENKINS_HOME).
>>
>> FATAL: ...java.lang.OutOfMemoryError 
>> : 
>> ... Java Heap Error
>>  at java.lang.String.(String.java:388) 
>> 
>>  at java.lang.String.substring(String.java:1372) 
>> 
>>  at 
>> org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:144) 
>> 
>>  at 
>> org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:121) 
>> 
>>  at 
>> hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:453)
>>  
>> 
>>  at 
>> hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:277) 
>> 
>>  at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:479) 
>> 
>>  at hudson.Launcher$LocalLauncher.kill(Launcher.java:838) 
>> 
>>  at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:540)
>>  
>> 
>>  at hudson.model.Run.execute(Run.java:1741) 
>> 
>>  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
>> 
>>  at hudson.model.ResourceController.execute(ResourceController.java:98) 
>> 
>>  at hudson.model.Executor.run(Executor.java:410) 
>> 
>> Finished: FAILURE
>>
>>
>> So I tried to run simple Groovy script in Jenkins console 
>>
>>
>> import org.jvnet.winp.Native;
>> println(Native.parseCmdLineAndEnvVars("jenkins server pid"))
>>
>>
>> and I got string with 150k chars long, where only first thousand are regular 
>> chars with env variables and the rest is some chinese weirdo chars. I tried 
>> to run Jenkins with UTF-8 by specifying
>>
>> -Dclient.encoding.override=UTF-8 which ofc does not help. 
>>
>>
>> I'm quite hopeless and I don't know, how to fix this. Any suggestions?
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/57539fe9-a06a-4bb8-aa89-7c27cd538359%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/dec131cd-e46a-4c3b-b0e1-1536e09d91e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins on Websphere 8.5 - out of memory (heap)

2016-09-19 Thread Baptiste Mathus
What's the Xmx value for that Websphere? Which JDK version, and so on?

2016-09-19 17:15 GMT+02:00 Tomáš Mrázek :

> So I installed 2.7.4 on Websphere 8.5.5.9.
>
> I'm running job with a maven build. Everything is fine, ear is created,
> but after that Jenkins stucks and throws Heap error (while creating
> enviroment variables like JENKINS_HOME).
>
> FATAL: ...java.lang.OutOfMemoryError 
> : 
> ... Java Heap Error
>   at java.lang.String.(String.java:388) 
> 
>   at java.lang.String.substring(String.java:1372) 
> 
>   at 
> org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:144) 
> 
>   at 
> org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:121) 
> 
>   at 
> hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:453)
>  
> 
>   at 
> hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:277) 
> 
>   at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:479) 
> 
>   at hudson.Launcher$LocalLauncher.kill(Launcher.java:838) 
> 
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:540) 
> 
>   at hudson.model.Run.execute(Run.java:1741) 
> 
>   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
> 
>   at hudson.model.ResourceController.execute(ResourceController.java:98) 
> 
>   at hudson.model.Executor.run(Executor.java:410) 
> 
> Finished: FAILURE
>
>
> So I tried to run simple Groovy script in Jenkins console
>
>
> import org.jvnet.winp.Native;
> println(Native.parseCmdLineAndEnvVars("jenkins server pid"))
>
>
> and I got string with 150k chars long, where only first thousand are regular 
> chars with env variables and the rest is some chinese weirdo chars. I tried 
> to run Jenkins with UTF-8 by specifying
>
> -Dclient.encoding.override=UTF-8 which ofc does not help.
>
>
> I'm quite hopeless and I don't know, how to fix this. Any suggestions?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/57539fe9-a06a-4bb8-aa89-7c27cd538359%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5V5dhQgfZPiR8jBs6un%3Do4KVT%3D8M%3DnQxfdkdjj6uGp-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins on Websphere 8.5 - out of memory (heap)

2016-09-19 Thread Tomáš Mrázek
So I installed 2.7.4 on Websphere 8.5.5.9.

I'm running job with a maven build. Everything is fine, ear is created, but 
after that Jenkins stucks and throws Heap error (while creating enviroment 
variables like JENKINS_HOME).

FATAL: ...java.lang.OutOfMemoryError 
: ... 
Java Heap Error
at java.lang.String.(String.java:388) 

at java.lang.String.substring(String.java:1372) 

at 
org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:144) 

at 
org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:121) 

at 
hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:453) 

at 
hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:277) 

at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:479) 

at hudson.Launcher$LocalLauncher.kill(Launcher.java:838) 

at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:540) 

at hudson.model.Run.execute(Run.java:1741) 

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 

at hudson.model.ResourceController.execute(ResourceController.java:98) 

at hudson.model.Executor.run(Executor.java:410) 

Finished: FAILURE


So I tried to run simple Groovy script in Jenkins console 


import org.jvnet.winp.Native;
println(Native.parseCmdLineAndEnvVars("jenkins server pid"))


and I got string with 150k chars long, where only first thousand are regular 
chars with env variables and the rest is some chinese weirdo chars. I tried to 
run Jenkins with UTF-8 by specifying

-Dclient.encoding.override=UTF-8 which ofc does not help. 


I'm quite hopeless and I don't know, how to fix this. Any suggestions?


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/57539fe9-a06a-4bb8-aa89-7c27cd538359%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.