Menu

#673 esniper didn't wake up to bid at all on second item

v1.0 (example)
closed-out-of-date
nobody
None
5
2019-05-05
2014-07-22
No

I launched esniper to bid on 2 items on eBay, thus:

    /opt/esniper/bin/esniper -q2 281389677635 3 281389688128 2

I have a .esniper file containing my username, password, seconds value of 7.

This worked fine for the first item - after a couple of interim sleeps, it woke up and won it:

    Auction 281389677635: Magic The Gathering - 4 x Somberwald Sage - Avacyn Restored - Excellent con.
    Time remaining: 2 mins 9 secs (129 seconds)
    End time: 22/07/2014 18:50:33
    # of bids: 0
    Currently: --  (your maximum bid: 3)
    High bidder: -- (NOT ###)
    Latency: 0 seconds

    Tue Jul 22 18:48:26 2014: Sleeping for 2 minutes 0 seconds

    Auction 281389677635: Bidding...
    Auction 281389677635: Waiting 8 seconds for auction to complete...

    Auction 281389677635: Post-bid info:
    Auction 281389677635: Magic The Gathering - 4 x Somberwald Sage - Avacyn Restored - Excellent con.
    Time remaining: -- (0 seconds)
    Currently: 0.99  (your maximum bid: 3)
    # of bids: 1
    High bidder: ###!!!

    won 1 item(s)

    Need to win 1 item(s), 1 auction(s) remain

But then it went to sleep on the second item and never woke up:
Auction 281389688128: Magic The Gathering - 1 x Rootbound Crag - M13 - Excellent con.
Time remaining: 20 mins 53 secs (1253 seconds)
End time: 22/07/2014 19:11:28
# of bids: 0
Currently: -- (your maximum bid: 2)
High bidder: -- (NOT ###)
Latency: 1 seconds
Tue Jul 22 18:50:36 2014: Sleeping for 10 minutes 44 seconds

At 19:13 I tabbed back to it and noticed it hasn't woken up, and the auction has ended!

As I write this now, it just woke up and failed (19:23 - some ten minutes after auction end):

    Auction 281389688128: Magic The Gathering - 1 x Rootbound Crag - M13 - Excellent con.
    Time remaining: -- (0 seconds)
    # of bids: 0
    Currently: --  (your maximum bid: 2)
    High bidder: -- (NOT ###)
    Latency: 1 seconds

    esniper encountered a bug.  Please go to:
        http://sourceforge.net/tracker/?func=add&group_id=45285&atid=442436
    paste this into "Detailed Description":
        Automated esniper bug report.
        esniper version 2.31.0
        libcurl/7.37.1 OpenSSL/1.0.1h zlib/1.2.8
        Error encountered in function preBid in auction.c line 384
        auction = 281389688128, price = 2, remain = 0
        latency = 1, result = -1, error = 11
        buf = 0x23d50c0, size = 85383, read = 0x23d50c0
        time = 1406053120, offset = 0
        pagename = "Magic The Gathering 1 x Rootbound Crag M13 Excellent Con | eBay", pageid = "(null)", srcid = "(null)"
        specified options or config values:
          1 x username(u) = ***
          1 x password() = ***
          1 x seconds(s) = 7
          1 x quantity(q) = 1
        cannot find bid token (found=0)
    then upload and attach esniper.5870.1.bug.html and click submit.
    Cannot get bid key
    Auction 281389688128: Bid uiid not found

The bug report may not be helpful, given it could just be saying that the auction appears to not exist, which wouldn't be a suprise given it was late waking up. I've attached it anyway.

1 Attachments

Discussion

  • Bodo

    Bodo - 2014-07-23

    I think it is impossible to find out now why esniper didn't wake up in your case. Esniper uses the sleep() library function to sleep for the specified time. There is nothing in esniper's code that would explain a longer sleep than announced.
    I can imagine that the sleep might not return as expected when the computer goes to sleep mode or if the system time does unexpected jumps, e.g. when using ntpdate.

    When it woke up too late eBay returned something similar to the article description page instead of the expected pre-bid page. Since esniper did not recognize this page it reported a bug. It is somewhat difficult to detect the human-readable message "Bidding has ended on this item." in this page.

    Maybe esniper should skip bidding when the remaining time is 0. In this case it would not get the unexpected page. (But we cannot avoid the problem in every case.)

     
  • Faminebadger

    Faminebadger - 2014-07-24

    I would think it more likely a bug in the calculation of the parameter to sleep(), rather than inside the library - the whole system would break catastrophically if sleep didn't work, since many programs use it, 10 minutes is a long way out, and I've never seen anything else miss a deadline.

    Note, there is no ntp update set and the computer doesn't go into sleep mode - so the time was not jumping around in any way.

     
  • Faminebadger

    Faminebadger - 2014-07-24

    There's definitely something funny in your time calculations.

    I just did a test and asked it to bid on 4 auctions, like this:
    /opt/esniper/bin/esniper -q4 261532968463 1.5 261533008975 1 261533028447 1.5 261533063767 1

    And instead of sleeping until the first one was due:
    Time remaining: 53 mins 10 secs (3190 seconds)

    It decided to sleep until just before the final one:
    Time remaining: 2 hours 30 mins 15 secs (9015 seconds)
    Sleeping for 1 hours 30 minutes

    That doesn't make much sense.

    If I issue it as 4 separate comments it works.

     

    Last edit: Faminebadger 2014-07-24
  • Bodo

    Bodo - 2014-07-24

    I didn't say I expect a bug in the sleep() function. In auction.c, esniper calculates the time to sleep as sleepTime, prints the value of sleepTime and calls sleep(sleepTime). I dont see any bug there, that's why I expect it to sleep for the duration as announced before.

    I did not write the code, so I may be wrong with my analysis. After sleeping esniper repeats the loop with retrieving the end time or remaining duration of the auction and calculating the remaining time until bidding.

    When it's short before bidding, esniper does additional operations like logging in or getting the bid token. If this would take long, esniper will seem to sleep longer than announced.


    I never specify auctions and maximum bids on the command line, I always use a file with article number and maximum bid pairs. I don't think there is a bug in the calculation of the sleep time, but there might be a bug (or missing documentation) related to sorting the auctions when using the command line arguments.

     

    Last edit: Bodo 2014-07-25
  • Bodo

    Bodo - 2014-07-25

    I need some more information to analyze the problem where esniper calculated the sleep time for an auction that was not the first one to end.

    Did you already bid on any of the auctions?
    If yes and if you were the high bidder, then esniper will place these auctions first. This is to avoid accidentally winning more articles than you want. In this case esniper works as designed. The sorting mechanism is a bit too simple because the sorting doesn't depend on the quantity and it doesn't re-check the conditions just before the first auction ends.

    Otherwise, please, try to reproduce the problem and attach the complete log output.

     
  • Michael S.

    Michael S. - 2019-05-05
    • status: open --> closed-out-of-date
     
  • Michael S.

    Michael S. - 2019-05-05

    Probably wrong time calculations for sleep() because of changes in html source.

     

Log in to post a comment.