Pages:
Author

Topic: Isis ATP [Automated Trading Platform] - Discussion - page 17. (Read 45225 times)

sr. member
Activity: 350
Merit: 250
Can we disable the trend engine and leave only the arbitrage one working?
Or passing it --simulation-mode=true will put the arbitrage engine also in simulation mode?

Recommendation/request:

Instead of having parameters that are set at command line for the trading, arbitrage, and simulation settings, could we handle them in the registry so we only have 1 place to manage settings? It might also be nice to be able to turn different modes on/off during a longer run by updating the registry without relaunching the program.

Thoughts?
legendary
Activity: 965
Merit: 1000
I had similar bugs in my code, so maybe I can help a bit...

You get the first error, when you create an iterator, then iterate over a list (or hash map in your case) and then modify the list, while you loop over it.

Potential solution is too avoid an iterator and just check for the end of the list after each loop iteration.
legendary
Activity: 1358
Merit: 1002
I've been getting this:
Code:
Isis started successfully.
Exception in thread "Thread-19" java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894)
at java.util.HashMap$KeyIterator.next(HashMap.java:928)
at org.open.payment.alliance.isis.atp.ArbitrageEngine.getHighestBid(ArbitrageEngine.java:174)
at org.open.payment.alliance.isis.atp.ArbitrageEngine.run(ArbitrageEngine.java:50)
at java.lang.Thread.run(Thread.java:722)

and

Code:
2012-11-10 17:50:38,043 : Weight is 0.14666666666666667
Exception in thread "Thread-49" java.lang.NullPointerException
at org.open.payment.alliance.isis.atp.TradingAgent.evalBid(TradingAgent.java:227)
at org.open.payment.alliance.isis.atp.TradingAgent.run(TradingAgent.java:115)
at java.lang.Thread.run(Thread.java:722)

Code:
2012-11-10 17:49:36,990 : Weight is 0.14473684210526316
Exception in thread "Thread-44" java.lang.NullPointerException
at org.open.payment.alliance.isis.atp.TradingAgent.evalBid(TradingAgent.java:227)
at org.open.payment.alliance.isis.atp.TradingAgent.run(TradingAgent.java:115)
at java.lang.Thread.run(Thread.java:722)

I think these 2 last ones happen when it's supposed to trade.

And I also get the following
Code:
2012-11-10 17:53:45,695 : Arbitrage Engine has detected an after fee profit opportunity of 56,48830811% on currency pair CAD/GBP
2012-11-10 17:53:45,695 : ***Conversion Factors***
2012-11-10 17:53:45,696 : Highest Bid: (GBP, 1.5729537882080256)
2012-11-10 17:53:45,696 : Lowest Ask: (CAD, 0.997070707070707)
2012-11-10 17:53:46,413 : Market Buy Order return value: null
2012-11-10 17:53:46,414 : Buy failed. Arbitrage could not trade CAD 10.66823 with GBP 0.00000000

Any idea why the trade fails? Because I have balance on CAD, GBP and BTC.
legendary
Activity: 1358
Merit: 1002
Can we disable the trend engine and leave only the arbitrage one working?
Or passing it --simulation-mode=true will put the arbitrage engine also in simulation mode?
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
A few more commits:

commit 734f36f7324faebf2bd1e7950bf5a256fb83a802

    Changed logback config to log brief messages to screen and verbose messages to a rolling log file


Log messages sent to screen are now more brief so most stay on single line. More detailed messages are sent to the aido.log log file. This file rolls over when it reaches 32MB and keeps a history of eight gzipped log files.



commit 2a1431b9716aee722baeab7e1a8ba9e84908593a

    Fixed NullPointerException in Trading Agent


Self explanatory.


commit f51f5223fbcc65dca6ebd70a29b86fb060132f58

    Changed trading agent to use BigMoney for currency amounts instead of BigDecimal


Ditto!

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
A few more commits, please test:

commit 1b3477509ea5aa8365a0f90d2dba649b82ab1f4a

    Deprecating --debug-live in favour of --simulation-mode


I think --simulation-mode is more descriptive and intuitive than --debug-live. For now --debug-live=true is same as --simulation-mode=false and vice versa, but eventually debug-live will be removed.



commit 27717c11e3a51f38fcac070bc9223f9306b58232

    Fixed false positives on failed market order test in trading agent


This hopefully fixes this issue:
Code:
INFO: Attempting to sell 0.136541308148148140568582942222519704955630004405975341796875 of 0.92165383 BTC available
Nov 09, 2012 3:30:08 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Market Order return value: f432d137-feda-4bc0-8c6e-721e8ff3dcf9
Nov 09, 2012 3:30:08 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
SEVERE: Failed to sell 0.136541308148148140568582942222519704955630004405975341796875 at current market price.
Please investigate


commit 62f40b79892f52ef349af47c1c31430413d5d7d6

    Bound slf4j to the logback logging framework and tidied up log messages.


The logback framework is extremely flexible and opens up the possibility to easily add log file rotation, remote logging, e-mail of logs etc. by simple editing the logback.xml file.
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
Very strange.

The logic used in the trading agent is to first attempt a sell order. If the return value is null the sell order failed so no need to attempt the buy side of the arbitrage.

But, I can clearly see from the output that the return value is not null so the sell order was successful. Yet, the trading agent thought it was not successful so did not attempt the buy order.

I will investigate this shortly when I have time.


UPDATE:

OK, I found it.

In TradingAgent.java:

Code:
if(marketOrderReturnValue != null){
    success = false;
}

!= should be ==.

I will investigate update this shortly when I have time.

For the time being please disable arbitrage by using the --use-arbitrage=false switch. Ah, an actual use for this new feature. Smiley

Normal non-arbitrage trades will still be executed even though the log will tell you different. This may also mess up the P/L calculations a bit until I fix it.
legendary
Activity: 1358
Merit: 1002
I'm getting a lot of these
Code:
INFO: Attempting to sell 0.136541308148148140568582942222519704955630004405975341796875 of 0.92165383 BTC available
Nov 09, 2012 3:30:08 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Market Order return value: f432d137-feda-4bc0-8c6e-721e8ff3dcf9
Nov 09, 2012 3:30:08 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
SEVERE: Failed to sell 0.136541308148148140568582942222519704955630004405975341796875 at current market price.
Please investigate

The thing is, it did sell that value. I suspect it's only trading one way. As it doesn't recognize the sale happened it never executes the other side of the trade, thus, there s no arbitrage profit.
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
Only because I'm too dense to handle the dependencies without Maven. Had I been thinking, I would have dropped your commits into a fresh clone of the main repo and built as I usually do.

I think the pom.xml file I created takes care of the dependencies for Maven. Not sure though, I'm not a Maven/Eclipse warrior like you. Smiley The file just has Xchange as a dependency for IsisATP. XChange has it's own set of dependencies which Maven should be able to figure out for itself.
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
https://github.com/aido/IsisATP.git new commit messages self explanatory:

To perform proper currency conversion:

     commit 7800f9fda70acd7e620c89f1614fa4d5b1c283c4

          Changed arbitrage engine currency calculations from BigMoney.dividedBy and BigMoney.multipliedBy to BigMoney.convertedTo





Aido's build did not deadlock on me, but did fail when my connection dropped. Here's the cause:

Code:
Caught unexpected exception, shutting down now!.
Details are listed below.
com.xeiam.xchange.HttpException: Problem GETing (IO)

Aido, I'd appreciate if you could build a version with the IoException suppressed in TickerManager. For some reason, my connection likes to flake a few times a day, and it's hell to have the arb version sit on the side lines for an hour rebuilding the market profile.

     commit 97e94bfcb4f7c1fe4fb14e6e799257039aad887d

          Changed exception handling in ticker manager and added com.xeiam.xchange.HttpException exception handler




I fired up my Xubuntu install and made a solid go at building, but I had to admit failure. I can change the files, but your build script is rather suited to your machine. I'm positive I'm missing something simple, but I've given up for the evening.

      commit 78ef6e30680eb51aa8a563252d75277b7032579f

          Updated build script to be a bit more generic


When build script is first run it will take several minutes to download and build all required dependencies. On subsequent builds the script automatically checks for updates to depenency libraries and takes no more than 30 seconds to build a new aido.jar with the latest code.

The script now checks for all the binaries it needs and lets the user know if they're not installed. It now also dowloads the logback jar files if it cannot find them locally.

But, if you're more comfortable with Eclipse, Maven or whatever IDE/plugin combo you use, stick to that. The script was really just written to make my life a bit easier when repeatedly running test builds.

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
OK, I'll have a look at the IoException shortly. The real world is getting in the way at the moment.

I tried to make the build script as generic as possible; creating directories if they don't exist etc. Maybe some of the script's dependencies aren't installed, like git, git-svn, jar and javac? Also, the two logback jar files logback-core-1.0.7.jar and logback-classic-1.0.7.jar need to be in the jars directory. I might do something clever with wget where if it can't find the files in the jar directory it downloads them from the logback repository.

OK, reading back on that, maybe it isn't that generic after all.

I created the build script when I was trying to fix the thread deadlock issue. I wasn't sure what was causing it so I decided to download the latest vesion of all dependency libraries and their dependencies then build everything from scratch.

Do the Eclipse config files I created not work?

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
New commit available.

I updated the arbitrage calculations so it doesn't sell all BTC as described in previous post.

I was doing something silly; using from and to currency amounts in buy and sell market orders instead of BTC amount.......how embarrasing  Roll Eyes
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
I would like to concentrate on the arbitrage engine first because there is a guaranteed profit from successful trades with this.

I was thinking of first changing the trade amounts the arbitrage engine calculates. Currently, it dumps the entire BTC wallet into the to currency wallet. When testing I had an initial shock of "hey, where the hell did all my $ and BTC go?".......until I looked at my € wallet.

This also has a negative effect on the other trade engine as it leaves no BTC to trade with until the maket moves in favour a selling the currency in the to currency wallet.

I thought it would be an easy fix but the calculation I tested yesterday didn't work. It still dumped my entire BTC wallet.

Say, for example, there is an arbitrage opportunity between $'s and €'s. On paper the following looks good to me, but in practice it doesn't work:

Trade 1. If there is an arbitrage opportunity sell entire $ balance for BTC
Trade 2. If the trade 1 was successful then buy ($ balance divided by $ ask price) mutipied by € bid price.
($ balance divided by $ ask price) being the amout of BTC bought in trade 1 and only this amount of BTC should be sold in trade 2.


That seems simple enough and is what I thought the following code in ArbitrageEngine.java was going to do:

Code:
BigMoney balance = AccountManager.getInstance().getBalance(fromCur);
BigMoney qty = balance.multipliedBy(AccountManager.getInstance().getLastTick(toCur).getBid().getAmount()).dividedBy(AccountManager.getInstance().getLastTick(fromCur).getAsk().getAmount(),RoundingMode.HALF_EVEN);
.
.
MarketOrder buyOrder  = new MarketOrder(OrderType.BID,balance.getAmount(),"BTC",fromCur.toString());
.
.
MarketOrder sellOrder = new MarketOrder(OrderType.ASK,qty.getAmount(),"BTC",toCur.toString());

but apparently not.

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
New commit available at https://github.com/aido/IsisATP.git

Commit message "Added --use-arbitrage=true/false commandline parameter (default true)" is self-explanatory.

I'm still not happy with the arbitrage functionality but at least now it can be easily disabled. It may also come in useful if the thread deadlock issue rears it's ugly head again.

While giving the new --use-arbitrage parameter a quick test I noticed an intermittent java.io.EOFException error when reading one of the dat files on startup. It may have been caused by me using Ctrl-C to stop the application on previous run i.e. a write to file operation did not complete properly. So, keep an eye out for this error.


Right, now I'm going to look at the arbitrage algorithm......still not sure what to do here though.
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
Aido's build did not deadlock on me, but did fail when my connection dropped.

hhmmmmmm, interesting. I hadn't pushed the fix for the deadlock issue to github while I was testing it. Maybe a rogue 'fixed' jar sneaked into an earlier commit. Anyway, I have now pushed the latest and greatest version to github so feel free to test and comment.

https://github.com/aido/IsisATP.git


Errr, I can't seem to import this project into Eclipse. Could you give a rough outline of what it would take?

I don't use Eclipse. Did I mention that I'm not a developer? Smiley I tend to do things the hard way and use a plain old text editor and command line to build. It seems I like to make life more difficult for myself. However, it does give me a bit more flexibility and I know what's going on under the hood so to speak. That is why I created the build_IsisATP.sh Bash file.

If I were to install Eclipse I fear it may give me delusions of coding competence.

Eclipse config files (a .settings directory and .project and pom.xml files) may have gotten lost when I cloned Isis and reorganised or deleted some files.

I have now added manually edited .project and pom.xml files and will push have pushed them to github as soon as I finish typing this post. The main difference in the pom.xml file from the Isis original is the dependency change from XChange 1.1.0 to 1.2.0.

Hopefully these files will work when importing to Eclipse.


About the latest version. While testing it I noticed that the arbitrage functionality sold all the from currency for BTC then sold ALL the BTC for the to currency. Resulting in 0 from currency balance, 0 BTC balance and everything in to currency. I don't like this. I tried to tweak the algorithm, but with little success. What I think would be better is to just sell the from currency and buy the equivalent amount in to currency. (I hope my explanation makes sense!). I tried this but the result was still the same; ALL BTC dumped into to currency.

So, suggestions on how to fix the arbitrage algorithm are most welcome. You can see what I was trying to do by looking at the following code in ArbitrageEngine.java in the latest commit:

Code:
BigMoney balance = AccountManager.getInstance().getBalance(fromCur);

// Following calculation sells fromCur balance and dumps ALL BTC into toCur resulting in 0 fromCur and 0 BTC
// BigMoney qty = balance.multipliedBy(AccountManager.getInstance().getLastTick(fromCur).getAsk().getAmount());

// Following calculation sells fromCur balance and buys equivalent amount of toCur resulting in 0 fromCur and leaving pre-existing BTC balance
BigMoney qty = balance.multipliedBy(AccountManager.getInstance().getLastTick(toCur).getBid().getAmount()).dividedBy(AccountManager.getInstance().getLastTick(fromCur).getAsk().getAmount(),RoundingMode.HALF_EVEN);


I also plan to add a command line argument to enable/disable arbitrage. Something like --arbitrage=true or --arbitrage=false

After that then maybe cleaning up the log output to prettify everything.

Now, before people start testing the lastest version I pushed to github, I feel the need to re-iterate I am not a java developer and I accept no responsibilty if any of the changes I made to IsisATP causes you to lose your entire balance. Test with small amounts and USE AT YOUR OWN RISK!!!
sr. member
Activity: 350
Merit: 250
I have not given up on fixing the thread deadlock issue in the Isis arbitrage engine.

So, with the help of jtrace I was able to pinpoint where in the code the thread deadlock was happening.

Looking at the commits now. I've done zero looking into the arbitrage code, so I may take a while to get up to speed.

Fork looks good! I like it. Consider the noarb version on hiatus.

I was wondering about arbitrage, I saw this in the faq though:

Q. Do you keep independent ask/bid tables for different currencies?

A. No, ask/bid tables for different currencies are not independent. All currencies are relative to whichever currency has the highest volume, which is based on said currencies current market price in bitcoin. Every trade is in one pool and in fact, not are not separate currency markets. This allows users the added benefit of trading in "the greater market" -in currencies they understand- while not limiting them to smaller currency markets.

So are they lying and it actually functions like independent tables somehow? Or are we actually just trading against the daily European Central Bank rates for the currencies?

If the latter, I'm not sure there is that much advantage in mixing the two trading types.
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
I have not given up on fixing the thread deadlock issue in the Isis arbitrage engine.

So, with the help of jtrace I was able to pinpoint where in the code the thread deadlock was happening.

I have made some changes to the last version of IsisATP commited to github by Isis. The change seems to have fixed the thread deadlock issue (or at least reduced it's frequency). I have left ATP running overnight in test mode and there hasn't been a single thread deadlock yet.

I will now test it with some live trades. Once I'm happy that it is performing OK I will let it into the wild so others may then give it a more thorough test.

Stay tuned for a new commit with the fix included.

As I am not a developer let alone a java developer, I am not sure if this fix will have a negative effect on some other part of code.

For those interested, heres where the thread deadlock was occuring. Look at "Thread-3" and "Thread-9" of the bottom of the following stack trace file:
Code:
2012-11-05 00:54:22
Full thread dump OpenJDK 64-Bit Server VM (22.0-b10 mixed mode):

"Keep-Alive-Timer" daemon prio=10 tid=0x00007f2820570800 nid=0x549f waiting on condition [0x00007f2824195000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at sun.net.www.http.KeepAliveCache.run(KeepAliveCache.java:172)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Attach Listener" daemon prio=10 tid=0x00000000022ba000 nid=0x4c2f waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"Thread-9" prio=10 tid=0x00007f2820568000 nid=0x4bdd waiting for monitor entry [0x00007f281c9b0000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.open.payment.alliance.isis.atp.TickerManager.getLastTick(TickerManager.java:162)
        - waiting to lock <0x00000000d6830958> (a java.util.ArrayList)
        - locked <0x00000000d6830920> (a org.open.payment.alliance.isis.atp.TickerManager)
        at org.open.payment.alliance.isis.atp.AccountManager.getLastTick(AccountManager.java:155)
        at org.open.payment.alliance.isis.atp.ArbitrageEngine.getLowestAsk(ArbitrageEngine.java:182)
        - locked <0x00000000d69e91b8> (a org.open.payment.alliance.isis.atp.ArbitrageEngine)
        at org.open.payment.alliance.isis.atp.ArbitrageEngine.run(ArbitrageEngine.java:52)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Thread-8" prio=10 tid=0x00007f2820565800 nid=0x4bd7 waiting on condition [0x00007f281cab1000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.open.payment.alliance.isis.atp.TrendObserver.run(TrendObserver.java:186)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Thread-7" prio=10 tid=0x00007f2820563800 nid=0x4bd6 waiting on condition [0x00007f281cbb2000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.open.payment.alliance.isis.atp.TickerManager.run(TickerManager.java:115)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Thread-6" prio=10 tid=0x00007f2820561800 nid=0x4bd5 waiting on condition [0x00007f281ccb3000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.open.payment.alliance.isis.atp.TrendObserver.run(TrendObserver.java:186)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Thread-5" prio=10 tid=0x00007f2820560800 nid=0x4bd4 waiting on condition [0x00007f281cdb4000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.open.payment.alliance.isis.atp.TickerManager.run(TickerManager.java:115)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Thread-4" prio=10 tid=0x00007f28203bf800 nid=0x4bd3 waiting for monitor entry [0x00007f281ceb5000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.open.payment.alliance.isis.atp.TickerManager.getMarketData(TickerManager.java:138)
        - waiting to lock <0x00000000d6830958> (a java.util.ArrayList)
        at org.open.payment.alliance.isis.atp.TrendObserver.run(TrendObserver.java:71)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Thread-3" prio=10 tid=0x00007f28203bf000 nid=0x4bd2 waiting for monitor entry [0x00007f281cfb6000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.open.payment.alliance.isis.atp.ArbitrageEngine.addTick(ArbitrageEngine.java:206)
        - waiting to lock <0x00000000d69e91b8> (a org.open.payment.alliance.isis.atp.ArbitrageEngine)
        at org.open.payment.alliance.isis.atp.TickerManager.run(TickerManager.java:109)
        - locked <0x00000000d6830958> (a java.util.ArrayList)
        at java.lang.Thread.run(Thread.java:722)

   Locked ownable synchronizers:
        - None

"Timer-0" daemon prio=10 tid=0x0000000002065800 nid=0x4bce in Object.wait() [0x00007f2824296000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000d6913f70> (a java.util.TaskQueue)
        at java.util.TimerThread.mainLoop(Timer.java:552)
        - locked <0x00000000d6913f70> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:505)

   Locked ownable synchronizers:
        - None

"Service Thread" daemon prio=10 tid=0x0000000001fc9800 nid=0x4bcc runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"C2 CompilerThread1" daemon prio=10 tid=0x0000000001fc7000 nid=0x4bcb waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"C2 CompilerThread0" daemon prio=10 tid=0x0000000001fc4000 nid=0x4bca waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"Signal Dispatcher" daemon prio=10 tid=0x0000000001fc1800 nid=0x4bc9 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"Finalizer" daemon prio=10 tid=0x0000000001f6a800 nid=0x4bc8 in Object.wait() [0x00007f2824a13000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000d69a19e8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
        - locked <0x00000000d69a19e8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

   Locked ownable synchronizers:
        - None

"Reference Handler" daemon prio=10 tid=0x0000000001f63000 nid=0x4bc7 in Object.wait() [0x00007f2824b14000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000d69a1760> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:503)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
        - locked <0x00000000d69a1760> (a java.lang.ref.Reference$Lock)

   Locked ownable synchronizers:
        - None

"main" prio=10 tid=0x0000000001e9c800 nid=0x4bc1 runnable [0x00007f2829ad4000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.Thread.isAlive(Native Method)
        at org.open.payment.alliance.isis.atp.CurrencyManager.isRunning(CurrencyManager.java:47)
        at org.open.payment.alliance.isis.atp.AccountManager.isRunning(AccountManager.java:145)
        at org.open.payment.alliance.isis.atp.Application.start(Application.java:77)
        at org.open.payment.alliance.isis.atp.Application.main(Application.java:49)

   Locked ownable synchronizers:
        - None

"VM Thread" prio=10 tid=0x0000000001f5a800 nid=0x4bc6 runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x0000000001ea7000 nid=0x4bc2 runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x0000000001ea9000 nid=0x4bc3 runnable

"GC task thread#2 (ParallelGC)" prio=10 tid=0x0000000001eab000 nid=0x4bc4 runnable

"GC task thread#3 (ParallelGC)" prio=10 tid=0x0000000001ead000 nid=0x4bc5 runnable

"VM Periodic Task Thread" prio=10 tid=0x0000000001fdc000 nid=0x4bcd waiting on condition

JNI global references: 203


Found one Java-level deadlock:
=============================
"Thread-9":
  waiting to lock monitor 0x0000000001f687b8 (object 0x00000000d6830958, a java.util.ArrayList),
  which is held by "Thread-3"
"Thread-3":
  waiting to lock monitor 0x0000000002216ff0 (object 0x00000000d69e91b8, a org.open.payment.alliance.isis.atp.ArbitrageEngine),
  which is held by "Thread-9"

Java stack information for the threads listed above:
===================================================
"Thread-9":
        at org.open.payment.alliance.isis.atp.TickerManager.getLastTick(TickerManager.java:162)
        - waiting to lock <0x00000000d6830958> (a java.util.ArrayList)
        - locked <0x00000000d6830920> (a org.open.payment.alliance.isis.atp.TickerManager)
        at org.open.payment.alliance.isis.atp.AccountManager.getLastTick(AccountManager.java:155)
        at org.open.payment.alliance.isis.atp.ArbitrageEngine.getLowestAsk(ArbitrageEngine.java:182)
        - locked <0x00000000d69e91b8> (a org.open.payment.alliance.isis.atp.ArbitrageEngine)
        at org.open.payment.alliance.isis.atp.ArbitrageEngine.run(ArbitrageEngine.java:52)
        at java.lang.Thread.run(Thread.java:722)
"Thread-3":
        at org.open.payment.alliance.isis.atp.ArbitrageEngine.addTick(ArbitrageEngine.java:206)
        - waiting to lock <0x00000000d69e91b8> (a org.open.payment.alliance.isis.atp.ArbitrageEngine)
        at org.open.payment.alliance.isis.atp.TickerManager.run(TickerManager.java:109)
        - locked <0x00000000d6830958> (a java.util.ArrayList)
        at java.lang.Thread.run(Thread.java:722)

Found 1 deadlock.

So you may see exactly what line is causing the problem, the above trace was run using the code version currently at https://github.com/aido/IsisATP (commit e19ca9279d86421b1b6b76bdc1f5c4494ad713a0)

sr. member
Activity: 350
Merit: 250

That's basically where I started. The code is fairly easy to read on Github if you'd prefer not to set up an IDE.

I'm one of those guys who has picked up the bare essentials on about a dozen languages as part of building, upgrading, maintaining the systems on which the code actually runs. Of course none of those is Java since I spend more time with Microsoft side of the world Sad

So if you see any bizzare feedback (like my Rainbow Table suggestion on the Vanity Miner thread), I'm not a crazy person, I'm just speaking Developeraza as a 3rd or 4th language Wink

Thanks,

Scrybe

sr. member
Activity: 350
Merit: 250

and maybe clarify things by adding a currency code to the log


I like that. I'll probably have a little bit of time to tinker this weekend, I'll post a new build if I commit anything. Thanks for the input!


Any chance you or someone else could roll up a new binary, the current one is over 2 months old.

EDIT: Found it under the noarb branch, doh.

I'd love to help, but I only know how to install the Java tools, so it would take a WHILE.

Thanks,

Scrybe
zaj
member
Activity: 103
Merit: 10
i'm willing to test another version soon if it turns out people make some profit. already lost 2 btc to testing the original versions :p
Yep, I'm down as well. I think it's very safe to say there are improvements to be made in the calculations made for trade decisions. I've been doing a lot of napkin math, but the biggest reason I've lost is my connection fades ~1 time per day, and I've now missed movement in the market 3 times in a row. No one is really posting P/L, but what I'm more interested in is what your configured settings are, compared to profit or loss.

Also, if anyone has suggestions on catching Xchange when it fails and restarting, I'd love to hear.

Edit: Zaj, when you say original versions, do you mean prior to the bug fix? Have you run my build?

yeah i ment the builds that isis posted, i tried every build with 10 bitcoins.  over the course of all different versions i lost 2 bitcoins.
Pages:
Jump to: