[jira] [Commented] (KARAF-6068) Karaf hangs by bundle resolving (felix resolver)

2020-09-09 Thread Lukasz Lech (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17192875#comment-17192875
 ] 

Lukasz Lech commented on KARAF-6068:


I'm struggling with the same bug after versioning of a small part of my 
application (where I provide 2 versions of a few bundles, totally about 10 
packages). 

The karaf fails in infinite loop, consuming more and more memory (after running 
overnight, it has reached 6GB). Unfortunately, the org.apache.felix.framework 
in maven repository has incomplete sources (missing 
org.apache.felix.resolver.ResolverImpl, which seems to be central to the issue) 
which makes it for me very hard to debug. Probably I'll spend time finding 
workaroud for the problem. 

It's quite disappointing that the first time we have the use case that can be 
solved only with OSGi it doesn't work.

> Karaf hangs by bundle resolving (felix resolver)
> 
>
> Key: KARAF-6068
> URL: https://issues.apache.org/jira/browse/KARAF-6068
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.0.7, 4.1.5
> Environment: JDK 8
> Windows, Linux
>Reporter: Andrei Shakirin
>Assignee: Jean-Baptiste Onofré
>Priority: Critical
> Attachments: karaf-hangs-stacktrace.txt, tesb.log, threads-cpu.png
>
>
> I faced following situation in project uses Karaf as deployment container for 
> microservices:
> 1) bundle A is installed with feature A and exports java packages xxx.yyy in 
> version 10.2.0
> 2) additionally, bundle B was created and installed with feature B. Bundle B 
> exporting the same java packages (xxx.yyy)  as bundle A, but with another 
> version 1.1.0
> Problem: as soon as other modules importing java packages (xxx.yyy) with 
> version [1.1, 2.0) - Karaf completely hangs on startup. There are no logs 
> describing the problem. The last log statement is about JMX registration.
> Karaf JVM takes about 90% CPU - looks like infinite loop.
> The thread dump shows that threads occupied CPU are the following:
> {code}
> "pool-38-thread-8" #245 prio=5 os_prio=0 tid=0x1cd94000 nid=0x3094 
> runnable [0x29f0e000]
>java.lang.Thread.State: RUNNABLE
> at 
> org.apache.felix.resolver.util.ArrayMap.getOrCompute(ArrayMap.java:74)
> at 
> org.apache.felix.resolver.ResolverImpl.addUsedBlame(ResolverImpl.java:1284)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:1110)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:1105)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:1105)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:1105)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:1105)
> at 
> org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:1105)
> at 
> org.apache.felix.resolver.ResolverImpl.computeUses(ResolverImpl.java:872)
> at 
> org.apache.felix.resolver.ResolverImpl.access$500(ResolverImpl.java:59)
> at 
> org.apache.felix.resolver.ResolverImpl$6.run(ResolverImpl.java:1231)
> at 
> org.apache.felix.resolver.ResolverImpl$EnhancedExecutor$1.run(ResolverImpl.java:2442)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {code}
> Full logs and thread dumps are attached.
> The problem makes diagnostic of package exports/imports issues completely 
> impossible. 
> I will try to reproduce it on simple example, but perhaps you can start 
> analyse based om thread dumps.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (KARAF-6848) Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does not work

2020-09-09 Thread Jira


 [ 
https://issues.apache.org/jira/browse/KARAF-6848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré updated KARAF-6848:

Description: 
When creating a component with the following SCR metadata 
{code:java}
 @Component(immediate = true,
 service = PersonalProfileResource.class,
 property =
{ "osgi.http.whiteboard.resource.pattern=/profile/*", 
"osgi.http.whiteboard.resource.pattern=/profile/contact/*", 
"osgi.http.whiteboard.resource.prefix=/profile" }
){code}
 
 Only binds the first pattern to the prefix the second pattern is ignored. Even 
though the scr:info command shows that the all of the SCR metadata is correctly 
parsed the HTTP:list command only shows one pattern being applied.

  was:
When creating a component with the following SCR metadata 
```
@Component(immediate = true,
service = PersonalProfileResource.class,
property = {
"osgi.http.whiteboard.resource.pattern=/profile/*",
"osgi.http.whiteboard.resource.pattern=/profile/contact/*",
"osgi.http.whiteboard.resource.prefix=/profile"
})
```
 
Only binds the first pattern to the prefix the second pattern is ignored. Even 
though the scr:info command shows that the all of the SCR metadata is correctly 
parsed the HTTP:list command only shows one pattern being applied.


> Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does 
> not work
> -
>
> Key: KARAF-6848
> URL: https://issues.apache.org/jira/browse/KARAF-6848
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0
> Environment: Linux - Docker
> Java 11 (openjdk)
>Reporter: Patrique Legault
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
>
> When creating a component with the following SCR metadata 
> {code:java}
>  @Component(immediate = true,
>  service = PersonalProfileResource.class,
>  property =
> { "osgi.http.whiteboard.resource.pattern=/profile/*", 
> "osgi.http.whiteboard.resource.pattern=/profile/contact/*", 
> "osgi.http.whiteboard.resource.prefix=/profile" }
> ){code}
>  
>  Only binds the first pattern to the prefix the second pattern is ignored. 
> Even though the scr:info command shows that the all of the SCR metadata is 
> correctly parsed the HTTP:list command only shows one pattern being applied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (KARAF-6848) Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does not work

2020-09-09 Thread Jira


 [ 
https://issues.apache.org/jira/browse/KARAF-6848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré updated KARAF-6848:

Labels: pax-web  (was: )

> Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does 
> not work
> -
>
> Key: KARAF-6848
> URL: https://issues.apache.org/jira/browse/KARAF-6848
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0
> Environment: Linux - Docker
> Java 11 (openjdk)
>Reporter: Patrique Legault
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
>  Labels: pax-web
>
> When creating a component with the following SCR metadata 
> {code:java}
>  @Component(immediate = true,
>  service = PersonalProfileResource.class,
>  property =
> { "osgi.http.whiteboard.resource.pattern=/profile/*", 
> "osgi.http.whiteboard.resource.pattern=/profile/contact/*", 
> "osgi.http.whiteboard.resource.prefix=/profile" }
> ){code}
>  
>  Only binds the first pattern to the prefix the second pattern is ignored. 
> Even though the scr:info command shows that the all of the SCR metadata is 
> correctly parsed the HTTP:list command only shows one pattern being applied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (KARAF-6848) Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does not work

2020-09-09 Thread Jira


 [ 
https://issues.apache.org/jira/browse/KARAF-6848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré reassigned KARAF-6848:
---

Assignee: Jean-Baptiste Onofré

> Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does 
> not work
> -
>
> Key: KARAF-6848
> URL: https://issues.apache.org/jira/browse/KARAF-6848
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.3.0
> Environment: Linux - Docker
> Java 11 (openjdk)
>Reporter: Patrique Legault
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
>
> When creating a component with the following SCR metadata 
> ```
> @Component(immediate = true,
> service = PersonalProfileResource.class,
> property = {
> "osgi.http.whiteboard.resource.pattern=/profile/*",
> "osgi.http.whiteboard.resource.pattern=/profile/contact/*",
> "osgi.http.whiteboard.resource.prefix=/profile"
> })
> ```
>  
> Only binds the first pattern to the prefix the second pattern is ignored. 
> Even though the scr:info command shows that the all of the SCR metadata is 
> correctly parsed the HTTP:list command only shows one pattern being applied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (KARAF-6848) Multiple osgi.http.whiteboard.resource.pattern used with HttpWhiteboard does not work

2020-09-09 Thread Patrique Legault (Jira)
Patrique Legault created KARAF-6848:
---

 Summary: Multiple osgi.http.whiteboard.resource.pattern used with 
HttpWhiteboard does not work
 Key: KARAF-6848
 URL: https://issues.apache.org/jira/browse/KARAF-6848
 Project: Karaf
  Issue Type: Bug
  Components: karaf
Affects Versions: 4.3.0
 Environment: Linux - Docker

Java 11 (openjdk)
Reporter: Patrique Legault


When creating a component with the following SCR metadata 
```
@Component(immediate = true,
service = PersonalProfileResource.class,
property = {
"osgi.http.whiteboard.resource.pattern=/profile/*",
"osgi.http.whiteboard.resource.pattern=/profile/contact/*",
"osgi.http.whiteboard.resource.prefix=/profile"
})
```
 
Only binds the first pattern to the prefix the second pattern is ignored. Even 
though the scr:info command shows that the all of the SCR metadata is correctly 
parsed the HTTP:list command only shows one pattern being applied.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)