[JBoss Cache: Core Edition] - addNewSubtree method is not thread safe
by nimrod.gat
I'm using JBoss cache 2.0.0.GA with multiple threads caching process.
Sometimes, at the beginning of the process, the unique constraint of the table is violated even though each thread uses a unique id (log attached).
Ive noticed that the first node added to the tree is the one creating the root node using addNewSubtree method which called from _put method, but the lock acquired in _put is from StripedLock which is FQN based lock what causing two different nodes to create the root node at the same time.
StripedLock doesn't enough when creating the root node.
a workaround is to create "dummy" node before multiple thread cache process.
2008-08-11 02:26:53,698 WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@1befb76d
| java.lang.IllegalStateException: Failed to insert node: ORA-00001: unique constraint (PFIZERMM2_4_HILLEL.JBOSSCACHE_APPLICATION_PK) violated
|
| at org.jboss.cache.loader.AdjListJDBCCacheLoader.insertNode(AdjListJDBCCacheLoader.java:490)
| at org.jboss.cache.loader.JDBCCacheLoader.addNewSubtree(JDBCCacheLoader.java:220)
| at org.jboss.cache.loader.JDBCCacheLoader._put(JDBCCacheLoader.java:188)
| at org.jboss.cache.loader.JDBCCacheLoader.put(JDBCCacheLoader.java:79)
| at org.jboss.cache.loader.AbstractCacheLoader.put(AbstractCacheLoader.java:233)
| at org.jboss.cache.loader.AdjListJDBCCacheLoader.prepare(AdjListJDBCCacheLoader.java:189)
| at org.jboss.cache.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:330)
| at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:144)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:160)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:37)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:203)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:833)
| at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1154)
| at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:84)
| at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
| at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
| at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession$XATransactionDemarcationStrategy.end(JmsServerSession.java:494)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:248)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.sql.SQLException: ORA-00001: unique constraint (PFIZERMM2_4_HILLEL.JBOSSCACHE_APPLICATION_PK) violated
|
| at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
| at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
| at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
| at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
| at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:182)
| at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:630)
| at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1081)
| at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905)
| at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2977)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
| at org.jboss.cache.loader.AdjListJDBCCacheLoader.insertNode(AdjListJDBCCacheLoader.java:477)
| ... 32 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173132#4173132
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173132
17 years, 7 months
[Beginners Corner] - NullPointerException when instantiating a POJO
by bernieb9998
We are using both JBoss 4.2.2. and 4.2.3 in development of an application that employs the use of lucene.
Occasionally, when instantiating the IndexWriter, which is a lucene POJO for add/updating documents in their index, we get this NullPointerException:
| java.lang.NullPointerException
| at org.jboss.mx.loading.LoadMgr3.endLoadTask(LoadMgr3.java:508)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:541)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at com.indorsetech.beans.LuceneBean$WopThread.getIndexWriter(LuceneBean.java:407)
|
The line in which the instantiation occurs is this:
| indexWriter = new IndexWriter(indexPath, new StandardAnalyzer(), false);
|
All the line is doing is creating a new IndexWriter with the index path set in indexPath. The stack trace seems to suggest that this is an issue with Jboss's classloader. Has anyone else seen this when trying to use external libraries which are placed in the JBoss' library path?
This only occurs about 10 to 20% of the time when the JBoss server is started. When it occurs, the server needs to be restart in order to resolve the issue. Additionally, when this occurs, the server hangs on shutdown and needs to be killed explicitly (SIGTERM) before it can be restarted again.
We've never experienced this issue in JBoss version 4.0.5. It seems to have started to occur when we upgraded to version 4.2.2/4.2.3.
Any help in troubleshooting this issue would be greatly appreciated, thank you in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173131#4173131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173131
17 years, 7 months
[Clustering/JBoss] - Re: Problems with JBoss clustering
by agohar
Hi,
Just to figure out the problem, i've tried to put fresh copies of jboss-4.2.2 on 3 test servers on the same network with same cluster configurations but find the same issue that when third one joins the cluster it is very slow, but i've got some WARN messages in logs of the other two servers. Here is what i tried:
- Started Server A (bind_addr = 10.100.54.14)
- Started Server B (bind_addr = 10.100.54.135).. Joins the cluster and Everything looks fine
- Started Server C(bind_addr = 10.100.54.12) .. It does join the cluster but is very slow
Here are the logs on C, it stucks for long time here (posting relevant portion only):
| -------------------------------------------------------
| GMS: address is 10.100.54.12:34566
| -------------------------------------------------------
| 16:22:35,096 WARN [GMS] join(10.100.54.12:34566) sent to 10.100.54.14:40469 timed out, retrying
| 16:22:39,129 INFO [TreeCache] viewAccepted(): [10.100.54.14:40469|2] [10.100.54.14:40469, 10.100.54.135:45846, 10.100.54.12:34566]
| 16:22:42,160 ERROR [FD_SOCK] received null cache; retrying
| 16:22:45,668 ERROR [FD_SOCK] received null cache; retrying
| 16:22:49,176 ERROR [FD_SOCK] received null cache; retrying
| 16:22:49,686 INFO [TreeCache] TreeCache local address is 10.100.54.12:34566
| 16:22:49,699 INFO [TreeCache] received the state (size=1024 bytes)
| 16:22:49,740 INFO [TreeCache] state was retrieved successfully (in 54 milliseconds)
| 16:22:49,740 INFO [TreeCache] parseConfig(): PojoCacheConfig is empty
| 16:22:49,949 INFO [STDOUT] no object for null
| 16:22:49,958 INFO [STDOUT] no object for null
| 16:22:50,011 INFO [STDOUT] no object for null
| 16:22:50,053 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
| 16:22:50,075 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
| 16:22:53,624 INFO [NativeServerConfig] JBoss Web Services - Native
| 16:22:53,624 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
| 16:22:54,978 INFO [SnmpAgentService] SNMP agent going active
| 16:22:55,627 INFO [DefaultPartition] Initializing
| 16:22:55,714 INFO [STDOUT]
| -------------------------------------------------------
| GMS: address is 10.100.54.12:34571
| -------------------------------------------------------
| 16:23:02,800 ERROR [FD_SOCK] received null cache; retrying
| 16:23:06,308 ERROR [FD_SOCK] received null cache; retrying
| 16:23:09,816 ERROR [FD_SOCK] received null cache; retrying
| 16:23:10,323 INFO [DefaultPartition] Number of cluster members: 3
| 16:23:10,323 INFO [DefaultPartition] Other members: 2
| 16:23:10,323 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
| 16:23:10,374 INFO [DefaultPartition] state was retrieved successfully (in 50 milliseconds)
| 16:24:10,483 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/0.0.0.0
| 16:24:10,497 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /0.0.0.0:1102, group=230.0.0.4, HA-JNDI address=10.100.54.12:1100
|
I can see these warnings on Server A's Logs:
| 16:22:32,150 INFO [TreeCache] viewAccepted(): [10.100.54.14:40469|2] [10.100.54.14:40469, 10.100.54.135:45846, 10.100.54.12:34566]
| 16:22:37,157 WARN [GMS] failed to collect all ACKs (2) for view [10.100.54.14:40469|2] [10.100.54.14:40469, 10.100.54.135:45846, 10.100.54.12:34566] after 5000ms, missing ACKs from [10.100.54.135:45846] (received=[10.100.54.14:40469]), local_addr=10.100.54.14:40469
| 16:22:39,106 WARN [GMS] 10.100.54.12:34566 already present; returning existing view [10.100.54.14:40469|2] [10.100.54.14:40469, 10.100.54.135:45846, 10.100.54.12:34566]
| 16:22:49,694 INFO [TreeCache] locking the subtree at / to transfer state
| 16:22:49,694 INFO [StateTransferGenerator_140] returning the state for tree rooted in /(1024 bytes)
| 16:22:57,784 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 2, delta: 1) : [10.100.54.14:1099, 10.100.54.135:1099, 10.100.54.12:1099]
| 16:22:57,784 INFO [DefaultPartition] I am (10.100.54.14:1099) received membershipChanged event:
| 16:22:57,784 INFO [DefaultPartition] Dead members: 0 ([])
| 16:22:57,784 INFO [DefaultPartition] New Members : 1 ([10.100.54.12:1099])
| 16:22:57,784 INFO [DefaultPartition] All Members : 3 ([10.100.54.14:1099, 10.100.54.135:1099, 10.100.54.12:1099])
| 16:22:59,790 WARN [GMS] failed to collect all ACKs (2) for view [10.100.54.14:40472|2] [10.100.54.14:40472, 10.100.54.135:45849, 10.100.54.12:34571] after 2000ms, missing ACKs from [10.100.54.135:45849] (received=[10.100.54.14:40472]), local_addr=10.100.54.14:40472
| 16:26:13,214 INFO [TreeCache] viewAccepted(): [10.100.54.14:40474|1] [10.100.54.14:40474, 10.100.54.12:34573]
| 16:26:26,091 INFO [TreeCache] viewAccepted(): [10.100.54.14:40476|1] [10.100.54.14:40476, 10.100.54.12:34575]
|
and warnings on Server B:
| 16:22:40,007 WARN [NAKACK] 10.100.54.135:45846] discarded message from non-member 10.100.54.12:34566, my view is [10.100.54.14:40469|1] [10.100.54.14:40469, 10.100.54.135:45846]
| 16:23:05,714 WARN [NAKACK] 10.100.54.135:45849] discarded message from non-member 10.100.54.12:34571, my view is [10.100.54.14:40472|1] [10.100.54.14:40472, 10.100.54.135:45849]
| 16:23:10,452 WARN [NAKACK] 10.100.54.135:45849] discarded message from non-member 10.100.54.12:34571, my view is [10.100.54.14:40472|1] [10.100.54.14:40472, 10.100.54.135:45849]
| 16:24:10,502 WARN [NAKACK] 10.100.54.135:45849] discarded message from non-member 10.100.54.12:34571, my view is [10.100.54.14:40472|1] [10.100.54.14:40472, 10.100.54.135:45849]
| 16:24:45,147 WARN [NAKACK] 10.100.54.135:45846] discarded message from non-member 10.100.54.12:34566, my view is [10.100.54.14:40469|1] [10.100.54.14:40469, 10.100.54.135:45846]
| 16:25:09,831 WARN [NAKACK] 10.100.54.135:45849] discarded message from non-member 10.100.54.12:34571, my view is [10.100.54.14:40472|1] [10.100.54.14:40472, 10.100.54.135:45849]
| 16:25:10,504 WARN [NAKACK] 10.100.54.135:45849] discarded message from non-member 10.100.54.12:34571, my view is [10.100.54.14:40472|1] [10.100.54.14:40472, 10.100.54.135:45849]
|
Please note that another cluster is already running on the same network with 5 servers in it and it works fine. and i am looking to run both of these clusters in parallel.
Any clue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173128#4173128
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173128
17 years, 7 months
[Installation, Configuration & DEPLOYMENT] - jboss crash & hs_err_pid.log was created in the bin director
by rmokrane
hi
jboss crash and I found hs_err_pid.log file in the bin directory can some one hint me why this happen below if the first few line of the generated file.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x0000002a95b234a3, pid=21256, tid=1079339360
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_11-b03 mixed mode)
# Problematic frame:
# V [libjvm.so+0x5aa4a3]
#
--------------- T H R E A D ---------------
Current thread (0x0000000040149000): GCTaskThread [id=21260]
siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000000a003c
Registers:
RAX=0x0000002c198fe51b, RBX=0x00000000000a003e, RCX=0x00000000000a003c, RDX=0x0000000000000001
RSP=0x0000000040555de0, RBP=0x0000000040555e50, RSI=0x0000002c254aa100, RDI=0x0000000000027200
R8 =0x0000002c254ab110, R9 =0x0000002a95ddd720, R10=0x0000000040139bb0, R11=0x0000002a95ddd701
R12=0x0000000000000000, R13=0x0000002c254aa100, R14=0x0000002a9cbd770c, R15=0x0000002c2ddc9e20
RIP=0x0000002a95b234a3, EFL=0x0000000000010206, CSGSFS=0x0000000000000076, ERR=0x0000000000000004
TRAPNO=0x000000000000000e
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173123#4173123
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173123
17 years, 7 months
[JBossWS] - Issues with WS-Eventing and JBoss-4.2.3
by riveradon
Hey all,
I am having issues running under JBoss-4.2.3 with regards to WS-Eventing. The same code and configuration worked between JBoss-4.2.1 and JBoss-4.2.2. Now I am hitting a snag trying to execute the same code either standalone or within the JBoss environment. Listed below is the stack trace.
| javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
| at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:404)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:314)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
| at $Proxy13.registerService(Unknown Source)
| at com.issinc.atd.situationadvisory.eventing.Test.registerService(Test.java:102)
| at com.issinc.atd.situationadvisory.eventing.Test.main(Test.java:120)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
| Caused by: java.io.IOException: Could not transmit message
| at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:255)
| at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
| ... 10 more
| Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Connection refused: connect.
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
| ... 13 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.Socket.connect(Socket.java:520)
| at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
| at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
| at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
| at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
| at sun.net.www.http.HttpClient.New(HttpClient.java:304)
| at sun.net.www.http.HttpClient.New(HttpClient.java:321)
| at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
| at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
| at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
| at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:277)
| ... 18 more
|
Any ideas on what the cause for the above exception would be greatly appreciated.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173121#4173121
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173121
17 years, 7 months