Deadlock issues with one thread?

I've been trying to nail down a deadlock issue for quite a while now and I'm just at a loss. My application basically has one main thread of execution which does get(), put(), and delete() on a database, and another background thread that goes through the database periodically (e.g. every 5 minutes) and prunes the db. The pruning thread works by using a cursor to iterate over the db and evaluates each record and, if it's expired, deletes it, stopping when it reaches the end of the DB or when it's deleted 100,000 records. I had been getting DeadlockExceptions and figured it was a conflict between the main thread and the pruning thread competing for locks on the same objects, so I modified my code so that when the pruning thread wakes up and starts pruning, it makes the main thread wait(), so theoretically the two threads should never be doing db operations at the same time. However, this doesn't seem to have resolved the issue, as I still get DeadlockExceptions. I've raised the lock timeout to 1000 ms and set it to retry up to 20x to no avail. I've even tried it with the pruning threads completely disabled and I still got it, so it seems the deadlock is occurring even within the single thread. Any ideas? I'm not using transactions, if that matters.
Also, on this page - http://www.oracle.com/technology/documentation/berkeley-db/db/gsg_txn/JAVA/lockingsubsystem.html#deadlockresolve - there's reference to "EnvironmentConfig.setLockDetectMode()". I'm using JE 3.2.23 and there doesn't appear to be any such function. Is this out-of-date documentation or am I using and old version?

The first step is to take a look at the information in the DeadlockException -- it will tell you which threads are conflicting. Please post the stack traces and I'll be happy to help interpret them.
Also please take a look at this FAQ:
http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html#23
If you set je.txn.deadlockStackTrace and je.txn.dumpLocks as described, you'll get more information when the deadlock occurs.
Also, on this page -
http://www.oracle.com/technology/documentation/berkeley-db/db/gsg_txn/JAVA/lockingsubsystem.html#deadlockresolve
- there's reference to "EnvironmentConfig.setLockDetectMode()". I'm using JE 3.2.23 and
there doesn't appear to be any such function. Is this out-of-date documentation or am I
using and old version?The link above is for documentation in Berkeley DB the C Edition, not Berkeley DB Java Edition (JE) -- you're reading the doc for the wrong product. The JE doc is here:
http://www.oracle.com/technology/documentation/berkeley-db/je/TransactionGettingStarted/jelock.html
There is no lock detect mode in JE, it always uses a timeout of the oldest locker.
Mark

Similar Messages

  • My 2007 Macbook pro Intel Core 2 Duo   Processor Speed 2.33 GHz has power issues with one or some of my USB powered devices. Last night I could not back up my Lacie external drives with software SuperDuper, hard drive copier. I also had a message that Tim

    My 2007 Macbook pro Intel Core 2 Duo   Processor Speed 2.33 GHz has power issues with one or some of my USB powered devices. Last night I could not back up my Lacie external drives with software SuperDuper, hard drive copier. I also had a message that Time machine failed. I have two powered 12V USB
    routers that are plugged into a 550VA CyberPower surge protector. I often receive these insufficient USB power for devices messages a dozen times even when I do not have devices like camera, Ipad, Ipod, and Tascam digital audio recorder plugged in. Is there a way to troubleshoot these USB routers or should I consider that one of the routers may be defective and replace them?
    David

    My 2007 Macbook pro Intel Core 2 Duo   Processor Speed 2.33 GHz has power issues with one or some of my USB powered devices. Last night I could not back up my Lacie external drives with software SuperDuper, hard drive copier. I also had a message that Time machine failed. I have two powered 12V USB
    routers that are plugged into a 550VA CyberPower surge protector. I often receive these insufficient USB power for devices messages a dozen times even when I do not have devices like camera, Ipad, Ipod, and Tascam digital audio recorder plugged in. Is there a way to troubleshoot these USB routers or should I consider that one of the routers may be defective and replace them?
    David

  • I have an older version of Firefox 3.6.6 I believe I am having an issue with one of the websites I sign into. Is there any way to update to the newest version

    I have an older version of Firefox 3.6.6 I believe I am having an issue with one of the websites I sign into. Is there any way to update to the newest version. Without losing all my bookmarks and saved pass words?

    Hello johngervais, the latest firefox version is 26.0 (today 4 Jan 2014).
    note that [https://support.mozilla.org/en-US/kb/firefox-no-longer-works-some-versions-windows-xp Firefox no longer works with some versions of Windows XP], if you have '''xp with sp2 and above''' you can update to latest version, see : [http://www.mozilla.org/en-US/firefox/26.0/system-requirements/ Firefox 26 System Requirements]
    if you are able to update to latest version then see : [https://support.mozilla.org/en-US/kb/common-questions-after-upgrading-firefox-36 Common questions after upgrading from Firefox 3.6]
    see also : [https://support.mozilla.org/en-US/kb/firefox-just-updated-why-it-asking-me-update-again Firefox just updated - why is it asking me to update again?]
    Don't worry you won't losing bookmarks and passwords after update firefox.
    thank you

  • I need to get the logs of my iPhone 5. I'm a registered as a developer and I have an issue with one of my app which is already in the market

    I need to get the logs of my iPhone 5. I'm a registered as a developer and I have an issue with one of my app which is already in the market

    The Firefox 3.5.x branch has reached end-of-life and is no longer maintained.<br />
    You will no longer receive security updates.<br />
    You can update Firefox via "Help > Check for Updates" or download and install the latest Firefox 3.6.x.<br />
    Firefox 4 and later require at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 3.6.x: http://www.mozilla.com/en-US/firefox/all-older.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Dns issues with one domain (Resolved)

    i'm currently having dns issues with one domain, in that it won't resolve when I use bt's dns servers.
    The domain is owned by a friend in the US who runs his own server for irc, web, and I also have a server that is on his connection, and resolves fine from other machines on different networks, and also resolves fine when I set windows to use the opendns servers, but when it's set to either my routers ip (using bt's dns), or set to automatic (using bt's dns via the homehub), this one domain will not resolve.
    I'm pretty certain it's not a windows issue, as it's a clean install of windows 7 that I did yesterday. I've tried rebooting the homehub, and also flushing my dns on windows, but this has not solved the issue.
    As I say, it resolves fine on other networks, and also when I use the opendns servers, so I know it's definately a dns issue.
    Using bt's dns servers:
    C:\Users\admin>ping chatnsn.com
    Ping request could not find host chatnsn.com. Please check the name and try agai
    n.
    Using opendns:
    C:\Users\admin>ping chatnsn.com
    Pinging chatnsn.com [68.51.24.74] with 32 bytes of data:
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.
    Ping statistics for 68.51.24.74:
        Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
    (The timeouts are normal...he has his router set to not respond to ping requests).
    Has anyone got any ideas on how to sort this out? Preferably without having to phone the helpdesk...lets just say i've done it in the past, and according to the poeple I spoke to in india, I knew nothing about my own systems, and it was a problem at my end...which was not the case, and I proved this several times.
    Edit: This issue appears to have resolved itself, and the domain is now resolving again using the homehub for dns resolution.

    Hi,
    When NSLOOKUP starts, before anything else, it checks the computer's network configuration to determine the IP address of the DNS server that the computer uses.
    Then it does a reverse DNS lookup on that IP address to determine the name of the DNS server.
    If reverse DNS for that IP address is not setup correctly, then NSLOOKUP cannot determine the name associated with the IP address.
    http://support.simpledns.com/kb/a90/nslookup-cant-find-server-name___-default-server-unknown.aspx
    Also refer to:
    How to fix NSLOOKUP Default Server: UnKnown?
    http://www.randika.info/2013/01/how-to-fix-nslookup-default-server.html
    Regards.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Unhappy with final product - bringing my questions/issues to one thread

    I have been trying to get what I consider an acceptable DVD from my new Mac. I have started a couple of threads and posted in a couple of others, but I figured it was better to bring all my questions/problems to one thread. I'm going to try to give all the information that I can think of, in hopes that yall can help me.
    I have iMovie11, iDVD7.1, Toast 8 Titanium, and Final Cut Express4.0.1.
    At this time, the video I'm working with came from a Flip Ultra HD (the 30fps version, not the newer one that does HD at 60fps).
    I have edited an 18 minute project, and created numerous versions of it, which I then burned to DVD with Toast. The final product on each disk all look pretty much the same to me, with the one problem that is making me go nuts --- the video playback does not appear "smooth". It looks like it is playing back at less than 30 frames per second.
    I don't expect perfect video quality from the Flip camera - actually the video is acceptably clean and sharp (for me) - it's the frame rate thing that is killing me. In the past I have burned numerous DVDs from MiniDV through Sony Vegas that play back perfectly.
    As of tonight, I have discovered that I apparently chose the wrong "easy setup" for FCE, it was on DV-NTSC, and I think I have found that it should have been on HDV-Apple Intermediate Codec 720p30 - although I might be wrong about that as well.
    I did not do any kind of conversion to the Flip videos before working with them in FCE - don't know if this would be part of my problem.
    In my trying various setting for the export, I have found "Key Frames Every xxx" with a default at 24 - don't know what this is or if it is related to my problem.
    I don't mind re-editing the entire project if there is something I can do that will make this better, or if this is as good as it is going to get with this source video.
    Also - I've noticed that anytime I add or make any changes to a transition, I have to re-render that section. Is this normal, or is it because I'm using video straight from the Flip (without MPEG Streamclip'ing) it first, or some other reason - maybe related to my wrong easy setup choice?
    Please let me know if there is other information I can provide that might help you help me. I can see that I will love working with Final Cut Express and playing with all that it can do once I figure out how to set the export settings like they should be.

    All the source video is converted, new project started with correct easy setup, corrected clips imported - the video looks awesome in FCE preview.
    I notice that it still requires a re-render where titles are added from Live Type - is that normal or did I have something wrong with the items coming from Live Type?
    I also exported a short video 2 different ways:
    export - quick time movie - self contained.... This one has a very subtle jump just before and after each transition that I don't see in FCE while editing, it's only in the completed version
    and....
    export - using qt conversion
    format - quicktime movie
    options - compression h.264
    quality - high
    key frame rate - 24
    frame reordering - yes
    encoding mode - multi-pass
    dimensions - compressor native 1280x720
    This one does not have the jump before and after transitions, but from what I read earlier in this thread, I should be able to just use the "export - qt movie - self contained" - correct?
    Message was edited by: bhamjeff

  • Has anyone experience iMac memory issues with One Drive (previously Sky Drive) - uses 5GB of my 8GB memory!

    I recently started experiencing memory issues with my iMac due to One Drive using up to 5GB of my iMac memory (total of 8GB). Every time I start up my iMac Activity Monitor shows One Drive uses around 4-5Gb of the internal memory for no reason. Previously Onde Drive seemed to work fine, it's only since about 2 weeks I notice this. It's really annoying as the iMac freezes up regulalrly and I need One Drive to synchronise my files across different devices.
    Has anyone experienced this too and are there any known fixes?

    Yes this is happening to me too, since the last upgrade. Eventually MacOS starts insisting I "Force Quit" all my applications as I have run out of application memory.
    OneDrive doesn't appear in that list because it's not an application... but Activity Monotor clearly shows it's the culprit, taking up 5GB+ of RAM.
    I've raised the issue on Microsoft's forums:
    http://answers.microsoft.com/en-us/onedrive/forum/sdperformance-sdother/onedrive -for-macos-memory-leak/fe04cf60-949f-47b6-b886-10539b5c5cc3?tm=1397636232934

  • Issues with one of the 2 ISP links

    Hi,
    My tmg 2010 always had 2 ISP links and it worked ok with load balance (no issues at all). Recently I got another ISP link and changed with one of the previous working ones.
    Since then, the internet navigation seemed to work very well.. but some applications related to office 365 (lync and outlook) does not connect when the traffic is routed through this new ISP. The apps work with the first link but not with this new one. Without
    TMG, the apps do work on this new link!
    What can cause this?
    thanks.

    Hi, thanks for the reply.
    Yes, I removed the other ISP cable and the internet works well on this new link, except for some applications like lync and outlook (office 365).
    During TMG live log, there is no denied packets. I tried rebooting the firewall machine but still no success.
    things I tried without success with this new link:
    - change the NIC.
    - put a router between the link and the firewall and assign a private IP schema (our other link is routed to a private address. This new one is given directly at the interface).
    - create an excpetion to allow all traffic from a testing machine.
    Our l2tp/ipsec vpn (that always worked on both links) does not connect too on this new link. 
    That does not make sense at all.

  • Issues with one template

    Hello
    I'm having issues with Particle Impacts template - when I render video, it has like green lines like letter X all over the screen , like on the picture below
    http://i56.tinypic.com/bjed52.jpg
    How can I remove them? Thanks in advance

    Thanks a lot.
    I installed Video Copilot, Trapcode Particular and Cycore FX.It must be one of those.
    What you think which one it might be?

  • Issue with one of the Managed server while enabling SSL.__ Issue Resovled

    Weblogic version:wls 8.1sp6
    SSL: internal
    Environment:
    1 AdminServer and 2 Managed servers. Admin and M1 are on same host. M2 is on different host. We have enabled SSL on M1 & M2 only. Configuration of M1 & M2 are identical. After restarting the servers M1 has no issue with SSL but M2 throws javax.net.ssl.SSLKeyException as shown below,
    <Aug 4, 2008 12:29:01 PM BST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Aug 4, 2008 12:29:02 PM BST> <Info> <WebLogicServer> <BEA-000213> <Adding address: 10.96.201.249 to licensed client list>
    <Aug 4, 2008 12:29:09 PM BST> <Notice> <Security> <BEA-090171> <Loading the identity certificate stored under the alias wpy-euq02 from the JKS keystore file /home/lonwpyq/ssl_cert/WPY_PAYROLLSOLUTIONSKeystore.jks.>
    <Aug 4, 2008 12:29:09 PM BST> <Notice> <Security> <BEA-090170> <Loading the private key stored under the alias wpy-euq02 from the JKS keystore file /home/lonwpyq/ssl_cert/WPY_PAYROLLSOLUTIONSKeystore.jks.>
    <Aug 4, 2008 12:29:09 PM BST> <Warning> <Security> <BEA-090773> <The certificate chain received from lonlxwebhost99.lehman.com - 10.71.129.99 contained a V3 certificate which key usage constraints forbid its key use by the key agreement algorithm.>
    <Aug 4, 2008 12:29:09 PM BST> <Warning> <Security> <BEA-090773> <The certificate chain received from lonlxwebhost99.lehman.com - 10.71.129.99 contained a V3 certificate which key usage constraints forbid its key use by the key agreement algorithm.>
    <Aug 4, 2008 12:29:09 PM BST> <Warning> <Security> <BEA-090773> <The certificate chain received from lonlxwebhost99.lehman.com - 10.71.129.99 contained a V3 certificate which key usage constraints forbid its key use by the key agreement algorithm.>
    <Aug 4, 2008 12:29:09 PM BST> <Error> <Cluster> <BEA-000141> <TCP/IP socket failure occurred while fetching statedump over HTTP from -6401422690190304510S:lonlxwebhost99:[16544,16544,16042,16042,16544,16042,-1,0,0]:etg:lonwpyq_16543_1.
    javax.net.ssl.SSLKeyException: [Security:090773]The certificate chain received from lonlxwebhost99.lehman.com - 10.71.129.99 contained a V3 certificate which key usage constraints forbid its key use by the key agreement algorithm.
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown Source)
    at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
    at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)
    at com.certicom.tls.record.handshake.ClientStateReceivedServerHello.handle(Unknown Source)
    at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
    at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
    at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
    at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
    at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
    at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
    at com.certicom.tls.record.WriteHandler.write(Unknown Source)
    at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
    at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
    at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:122)
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:322)
    at weblogic.cluster.HTTPExecuteRequest.connect(HTTPExecuteRequest.java:73)
    at weblogic.cluster.HTTPExecuteRequest.execute(HTTPExecuteRequest.java:121)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)>
    Please let me know where I am going wrong. Thnx in advance
    Message was edited by:
    Shashi_sr

    Solution given by BEA Engineer:
    <Warning> <Security> <BEA-090773> <The certificate chain received from lonlxwebhost99.lehman.com - 10.71.129.99 contained a V3 certificate which key usage constraints forbid its key use by the key agreement algorithm.>
    The reason for this was
    The CA Certificate was missing a required bit (according to RFC 3280).
    keyEncipherment bit is not in the KeyUsage and KeyUsage is marked as critical.
    As per RFC:
    The keyEncipherment bit is asserted when the subject public key is
    used for key transport. For example, when an RSA key is to be
    used for key management, then this bit is set.
    According to RFC3280, when the key will be used to encrypt other keys that are send over the wire ("key transport") the keyEncipherment bit of the KeyUsage extension must be set. If the KeyUsage extension is critical, the SSL certificate validation will check that the key can be used in the key agreement. That is, that the key can be used to encrypt the symmetric public key.
    Your KeyUsage only contains the following bits:
    [4]: ObjectId: 2.5.29.15 Criticality=true KeyUsage [
    DigitalSignature
    Key_CertSign
    Crl_Sign
    Since it is marked Critical, it MUST have the keyEncipherment bit.
    Otherwise, it should not be marked as Critical.
    So the three solutions that should work are
    1) Remove keyUsage
    2) Don't mark keyUsage as critical
    3) If keyUsage is critical, make sure keyEncipherment bit is set.

  • Lync login issue with one domain but started working when domain is changed.

    we have two domains in lync 2013 infra.i have enabled user id with one domain but its not allowing user to login.If we change user id to other domain it start working. it seems user id already existed somewhere in lync or active directory database. can
    anyone tell how to remove complete user database so that the id can be assigned to other new users.

    Hi,
    Did the user account also be deleted or disabled in AD? Disable account is different form remove account. If you disable an account the account is still stored in AD, whenever you need to enable it you can find it. So if you only disable the account who
    leave the company, please remove the account and try again.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Display and sound issues with One Link Pro Dock and X1

    When my computer is connected to the dock and shut down there is a buzzing that comes from the external speakers that the dock is connected too.
    Same thing happens if I leave the dock connector not connected.
    What is causing this feedback and can anything stop it?
    Display wise, my external monitor goes black every 30 minutes or so for 5 seconds and then comes back.
    I am running Windows 8.1 if that matters.

    "I don't know if my problem relates to this...but I cannot seem to keep my ethernet connection.  I have two monitors (+laptop) working....occassionally screen goes black for a second....can live with that...but...why do I keep loosing my internet connection....anyone else have this problem.  My IT guys say the problem is with the docking station but cannot pinpoint reason."
    This is (unfortunately) a known issue. See this very, very long thread:
    http://forums.lenovo.com/t5/Options-Accessories/Re-OneLink-network-port-flapping/td-p/1358947
    A workaround appears possible, but is a bit of a hassle
    http://forums.lenovo.com/t5/ThinkPad-Edge-S-series/One-Onelink-dock-Thinkpad-Yoga-problem-solved/td-...

  • Urgent : TimeOut/DeadLock issue with DB Adapter

    Hi,
    I have a DB adapter that executes a Proc in Sybase.[The proc takes 5-10 minutes based on the load]
    There is another DB adapter after this which fetches the data from DB based on the completion of previous proc.
    This Bpel is called from another Bpel in sync mode(inside flow , i have set the nonblockinginvoke = true)
    I have set the JTA properties, Soa-infra EJB properties , MaxsyncWait , statement timeout .
    Still getting this issue when running concurrent requests, single request works fine.
    My env is a clustered env.
    Please help.
    Thanks !!

    Yes. When I run this query in DB, I get one record . While defining DB Adapter, I have imported 4 tables and also defined the relationship between the tables. In my case, column unique sequence number is primary key of headers table and foreign key of details table.The above select query is generated by the DB Adapter for the parameters I have passed in.
    My data is as follows:
    Headers table:
    file_name uniq_seq_num
    file_1.xml 220
    Details table
    product_id unique seq num edf_prod_type
    111 220 A
    112 220 B
    113 220
    Now, I call DB Adapter with parameters 'file_1.xml' (file_name)and 'A'(prod_type). I expect the DB adapter to retrieve only one record with product_id 111 in the detailscollection. But I see that the adapter retrieves all records from the details table without considering the value of prod_type.
    Edited by: user13276819 on Mar 19, 2012 6:32 AM

  • Deadlocking issue with sshfs and nfs

    Okay, I've used both sshfs and nfs for remotely accessing the home partition on my fileserver, but I have been having a problem where the networking on the server suddenly cuts out.  Any processes that are accessing the folder I mounted nfs/sshfs with become deadlocked.  Any processes that try access my home directory, where the remote folder sits, are also deadlocked.  I cannot get into the machine with ssh.  I have to manually reboot it in order to get any networking at all.
    I have to also force-kill any known processes that are accessing the remote folder, and if I don't know what they are, I have to forcibly unmount it.  This issue has been occuring with this specific fileserver since I got it.  It is running Arch Linux i686, but has had the same problem with the server editions of both Fedora and Ubuntu.
    I don't know where to begin with fixing this problem, nor do I know how to diagnose it.

    Consider "soft" mount option for NFS.

  • HT1766 still having issues with one of my contacts.  we did everything recommended but still can not i message each other.  Any suggestions

    actually this is under wrong topic it should be under imessage troubleshooting

    Hello mwss,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    Have a nice day,
    Mario

Maybe you are looking for