#674 Segfault on FreeBSD when I would win only.

v1.0 (example)

Only if I would win an auction, esniper crashes/segfaults.

Updated from 2.29 to 2.31 (from source) after noticing this bug: http://ehc.ac/p/esniper/bugs/667/

Now esniper 2.31 segfaults when and only WHEN I would win an auction. If I underlie, everthing is fine. Even if I bit via commandline "esniper -s now ..." it seems fine.

Because of that rare case it is hard to tell anything more specific. First time it happend to me was with 2.29 (without core dump). The second time was with 2.31 (core dump). Of cause I still have the coredump but because of my lag of knowledge about how to handle these files I cannot read it and for the same reason I cannot black out private stuff as well to post or upload it.

Simple gdb command I worked out: gdb esniper esniper-pixelfehler.core brings up the following

# 0  makeBidError (pageInfo=0x0, aip=0x802c5f300) at auction.c:555
555             const char *pagename = pageInfo->pageName;
[New Thread 802c07400 (LWP 110850/esniper)]

Some Infos which will help hopefully:
* FreeBSD 9.1-RELEASE-p17 amd64
* esniper 2.31.0 (build from source)
* Umlaute in auction title (but never was a problem before)
* No bidders than me on the auction
* eBay.de (seems they changed their interface-framework some weeks ago since then I have no scrollbar in Opera 9 anymore. But seems ebay.com updated there framework some days ago as well -- no scrollbar as well.)
* Executed via: esniper -UP my-auction-file

For more info or requests to let me have to do some (gdb) commands on the coredump, just tell me. I will do my best to support working out and bugfixing that issue as long as you tell me what I have to do with the coredump besides loading it up. ;)


  • Bodo

    Bodo - 2014-07-28

    The #0 line shows that function makeBidError() was called with a NULL pointer as pageInfo, that's why accessing pageInfo->pageName will crash the program.

    I found two places where function makeBidError() is called. I have a guess which one was executed in your case, but to be sure, please use the command "backtrace" in GDB (after using the same gdb command) to show the calling functions.

    Using the NULL pointer without check is a bug. Esniper should print an error message or a bug report instead of a program crash.

    The real problem in your case: pageInfo==NULL is the error return from function getPageInfo() which means this function could not find any information to identify the page returned by eBay. This is very strange and it could mean that something went totally wrong during the bid process.

    Do you have the log output from running esniper? It might show what happened just before the crash.

    I guess when I fix the real bug and you run esniper in similar situations you will get a bug report instead of a crash.

    Did you specify any *host options in your auction file or .esniper file to use other servers than the default ones?

  • Wasp

    Wasp - 2014-07-31

    Thank you for your reply. Hopefully, here is everything you have asked for. If I missed something or you need further information don't hesitate to ask.

    (gdb) backtrace
    #0  makeBidError (pageInfo=0x0, aip=0x802c5f300) at auction.c:555
    #1  0x000000000040346e in parsePreBid (mp=0x8063f5b20, aip=0x802c5f300) at auction.c:381
    #2  0x00000000004038b0 in preBid (aip=0x802c5f300) at auction.c:310
    #3  0x0000000000403d48 in snipeAuction (aip=0x802c5f300) at auction.c:795
    #4  0x0000000000405f3e in main (argc=Variable "argc" is not available.) at esniper.c:886

    No, I haven't set any host option. In fact I not even have a default line for that. Guess it is still the config by an older esniper version (I supsect it to be the config by v2.28). Besides quantity and seconds thats all I have set in the config:

    batch = false
    bid = true
    debug = false
    reduce = true

    Because of that I have no esniperlog too, sry. :(

    Last edit: Wasp 2014-07-31
  • Bodo

    Bodo - 2014-07-31

    The backtrace matches my guess.

    Maybe my wording was not clear enough. If you don't specify any host option, esniper will use the default (ebay.com) hosts. If you specify a server like ebay.de, this may result in bug reports if esniper cannot parse the localized page.
    That means something else seems to be wrong in your case.

    All I can do now is to check for pageInfo==NULL and generate a bug report in this case.

  • Bodo

    Bodo - 2014-07-31

    I added some checks for pageInfo==NULL in auction.c to avoid dereferencing a NULL pointer. I did not test the modification, I only made sure it can be compiled.

    Can you, please, test the latest version from CVS? If your problem is reproducible I expect to get a bug report including an esniper.*.html file.

  • Wasp

    Wasp - 2014-08-02

    Downloaded, compiled and installed the CVS version successfully. Yet just run the old auction file with the out-dated auctions: so far so good, fine.

    Of course I will let you know if it fails on my next notional win. But it's a rare case so it could take some time. Hopefully it just doesn't' happen again, because I would prefer to win if would win. ;)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks