Hi,

I'm still seeing the SecurityException with 1.1 RC1 as the "java" task in ANT script still has the "fork=true" attribute commented out.

Thanks,
Raymond

----- Original Message ----- From: "Luciano Resende" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Wednesday, January 09, 2008 11:11 AM
Subject: Re: impl-bpel shutdown issue


After some investigation, it looks like the threads that are hanging
are from ODE, when we deploy the BPEL process, and it's only happening
on a non-maven environment. For now, i'll add an ugly workaround for
our 1.1 release on the sample application, to do a System.exit(0) and
work with the ODE guys to provide a solution for the thread issue.

Thoughts


On Jan 8, 2008 4:17 PM, Luciano Resende <[EMAIL PROTECTED]> wrote:
Looks like we have the thread pool and derby with some hanging
threads, based on this thread dump

Full thread dump Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode):

"DestroyJavaVM" prio=6 tid=0x0003ca68 nid=0x1554 waiting on condition
[0x00000000..0x0007fae8]

"pool-3-thread-1" prio=6 tid=0x0b4249d0 nid=0x1958 waiting on
condition [0x0cccf000..0x0cccfce8]
        at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireNanos(AbstractQueuedSynchronizer.java:772) at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1087) at java.util.concurrent.SynchronousQueue$Node.waitForPut(SynchronousQueue.java:291) at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:443) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:475) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
        at java.lang.Thread.run(Thread.java:595)

"pool-2-thread-1" prio=6 tid=0x0b4a1e18 nid=0x1b00 waiting on
condition [0x0bc8f000..0x0bc8fd68]
        at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
        at java.lang.Thread.run(Thread.java:595)

"Thread-2" daemon prio=6 tid=0x0b062d90 nid=0x1430 waiting on
condition [0x0bc0f000..0x0bc0fa68]
        at java.lang.Thread.sleep(Native Method)
at org.apache.geronimo.transaction.manager.TransactionTimer$CurrentTime.run(TransactionTimer.java:38)

"derby.rawStoreDaemon" daemon prio=6 tid=0x0b7c4a18 nid=0x15c0 in
Object.wait() [0x0bbcf000..0x0bbcfae8]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x03194110> (a
org.apache.derby.impl.services.daemon.BasicDaemon)
        at org.apache.derby.impl.services.daemon.BasicDaemon.rest(Unknown
Source)
        - locked <0x03194110> (a
org.apache.derby.impl.services.daemon.BasicDaemon)
at org.apache.derby.impl.services.daemon.BasicDaemon.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

"derby.antiGC" daemon prio=2 tid=0x0b7ad008 nid=0x194c in
Object.wait() [0x0bb0f000..0x0bb0fb68]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x031163e0> (a
org.apache.derby.impl.services.monitor.AntiGC)
        at java.lang.Object.wait(Object.java:474)
at org.apache.derby.impl.services.monitor.AntiGC.run(Unknown Source) - locked <0x031163e0> (a org.apache.derby.impl.services.monitor.AntiGC)
        at java.lang.Thread.run(Thread.java:595)

"Timer-0" daemon prio=6 tid=0x0ad25168 nid=0x1fc4 in Object.wait()
[0x0bacf000..0x0bacfbe8]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x031127b0> (a java.util.TaskQueue)
        at java.util.TimerThread.mainLoop(Timer.java:509)
        - locked <0x031127b0> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=6 tid=0x00aa6730 nid=0x1f40 runnable
[0x00000000..0x00000000]

"CompilerThread0" daemon prio=10 tid=0x00aa5460 nid=0x14dc waiting on
condition [0x00000000..0x0ac0fa48]

"Signal Dispatcher" daemon prio=10 tid=0x00aa4860 nid=0x1b8c waiting
on condition [0x00000000..0x00000000]

"Finalizer" daemon prio=8 tid=0x00a90080 nid=0x1c5c in Object.wait()
[0x0ab8f000..0x0ab8fa68]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x02fc36e0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0x02fc36e0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x00a8ec30 nid=0x11bc in
Object.wait() [0x0ab4f000..0x0ab4fae8]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x02fc3760> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:474)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0x02fc3760> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=10 tid=0x00038428 nid=0x1d4c runnable

"VM Periodic Task Thread" prio=10 tid=0x00a99b48 nid=0x18bc waiting on condition




On Jan 8, 2008 4:15 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:
> I did some debugging. It turned out that ANT <java> tasks will be run > with > Java2 security enabled if the fork attribute is set to false (by > default).
>
> The key issue here is that the sample doesn't exit at the end. Even we > grant
> the java2 security permissions, it can only take to the point that the
> sample hangs. If the folk=true, then the ANT task will hang as the
> subprocess never exits.
>
> We need to find out why the sample hang.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Luciano Resende" <[EMAIL PROTECTED]>
> To: <tuscany-dev@ws.apache.org>
>
> Sent: Tuesday, January 08, 2008 3:50 PM
> Subject: Re: impl-bpel shutdown issue
>
>
> >I can't seem to find a good solution for this issue; that happens only
> > when running from an ant script. Looks like, when we try to shutdown
> > the thread pool executor in the destroy method of
> > ThreadPoolWorkManager, there is a security check and the
> > RuntimePermission to modifyThread is not set, thus the stack trace we
> > are seeing.
> >
> > For some reason, trying to set the java.security.AllPermission in the
> > ant java task started causing classpath issues [1]
> >
> > The only way I was able to make things work better was to  change the
> > code in ThreadPoolWorkManager destroy method like below, but I guess
> > this might give us other side effects...
> >
> >    @Destroy
> >    public void destroy() {
> >        AccessController.doPrivileged(new PrivilegedAction() {
> >            public Object run() {
> >                try {
> >                    executor.shutdown();
> >                } catch(Exception ex) {
> >                    //ignore
> >                }
> >                return null;
> >            }
> >        });
> >    }
> >
> >
> > Any ideas would be appreciated...
> >
> > [1] http://marc.info/?l=ant-user&m=119982919309601&w=2
> >
> > On Jan 7, 2008 1:24 PM, Simon Laws <[EMAIL PROTECTED]> wrote:
> >>
> >> On Jan 7, 2008 8:33 PM, Luciano Resende <[EMAIL PROTECTED]> > >> wrote:
> >>
> >> > I can look into this, and provide ant script support for the bpel
> >> > sample.
> >> >
> >> > On Jan 7, 2008 12:19 PM, Simon Laws <[EMAIL PROTECTED]> > >> > wrote:
> >> > >
> >> > > On Jan 7, 2008 7:19 PM, Raymond Feng <[EMAIL PROTECTED]> > >> > > wrote:
> >> > >
> >> > > > Hi, Simon.
> >> > > >
> >> > > > It seems that you replied to the wrong thread :-).
> >> > > >
> >> > > > By reading the stack trace, the exception is from Java2 > >> > > > security.
> >> > > > Do
> >> > you
> >> > > > have the J2 security turned on?
> >> > > >
> >> > > > Thanks,
> >> > > > Raymond
> >> > > >
> >> > > > ----- Original Message -----
> >> > > > From: "Simon Laws" <[EMAIL PROTECTED]>
> >> > > > To: <tuscany-dev@ws.apache.org>
> >> > > > Sent: Monday, January 07, 2008 10:05 AM
> >> > > > Subject: Re: A question on webservice binding
> >> > > >
> >> > > >
> >> > > > >> I have helloworld-bpel running now in the distribution but > >> > > > >> still
> >> > two
> >> > > > > issues with it
> >> > > > >
> >> > > > > 1/ It won't run from the jar maven makes you have to ant > >> > > > > compile
> >> > before
> >> > > > > you
> >> > > > > run it
> >> > > > > 2/ It throws an exception on shutdown....
> >> > > > >
> >> > > > >     [java] Status: RESPONSE
> >> > > > >     [java] Response: <?xml version="1.0" encoding="UTF-8"?>
> >> > > > >     [java] <message><TestPart><hello xmlns="
> >> > > > > http://tuscany.apache.org/implement
> >> > > > > ation/bpel/example/helloworld.wsdl">Hello
> >> > > > > World</hello></TestPart></message>
> >> > > > >     [java] Hello World
> >> > > > >     [java] Stopping BPELHelloWorldComponent
> >> > > > > [java] INFO - GeronimoLog.info(79) | BPEL Server > >> > > > > Stopped.
> >> > > > >     [java] Stopped !!!
> >> > > > > [java] java.security.AccessControlException: Access > >> > > > > denied (
> >> > > > > java.lang.Runti
> >> > > > > mePermission modifyThread)
> >> > > > > [java] at > >> > > > > java.security.AccessController.checkPermission
> >> > > > > (AccessControll
> >> > > > > er.java:104)
> >> > > > >     [java]     at
> >> > > > > java.util.concurrent.ThreadPoolExecutor.shutdown
> >> > > > > (ThreadPoolEx
> >> > > > > ecutor.java:908)
> >> > > > >     [java]     at
> >> > > > > org.apache.tuscany.sca.core.work.ThreadPoolWorkManager.destro
> >> > > > > y(ThreadPoolWorkManager.java:216)
> >> > > > >     [java]     at
> >> > > > > org.apache.tuscany.sca.core.work.Jsr237WorkScheduler.destroy(
> >> > > > > Jsr237WorkScheduler.java:97)
> >> > > > >     [java]     at
> >> > > > > org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.
> >> > > > > stop(ReallySmallRuntime.java:187)
> >> > > > >     [java]     at
> >> > > > > org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.cl
> >> > > > > ose(DefaultSCADomain.java:264)
> >> > > > > [java] at > >> > > > > helloworld.BPELClient.main(BPELClient.java:39) > >> > > > > [java] at > >> > > > > sun.reflect.NativeMethodAccessorImpl.invoke0
> >> > (Native
> >> > > > > Method)
> >> > > > >
> >> > > > > Am going to be offline for a while but if there is anyone
> >> > > > > familiar
> >> > with
> >> > > > > the
> >> > > > > helloworld-bpel sample that could shed some light on this > >> > > > > that
> >> > > > > would
> >> > be
> >> > > > > splendid.
> >> > > > >
> >> > > > > Regards
> >> > > > >
> >> > > > > Simon
> >> > > > >
> >> > > >
> >> > > >
> >> > > > ---------------------------------------------------------------------
> >> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > > > For additional commands, e-mail: > >> > > > [EMAIL PROTECTED]
> >> > > >
> >> > > > Ooops. So I did. Sorry about that folks.
> >> > >
> >> > > I went back to the README and note that we aren't supporting ant
> >> > > files
> >> > for
> >> > > this sample so maybe I should be trying to get it to work > >> > > anyhow.
> >> > >
> >> > > Simon
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Luciano Resende
> >> > Apache Tuscany Committer
> >> > http://people.apache.org/~lresende
> >> > <http://people.apache.org/%7Elresende>
> >> > http://lresende.blogspot.com/
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> > Great, thanks Luciano.
> >>
> >> Simon
> >>
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/




--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to