Hello,
This does not happen evey time, but the easiest way to replicate it is to ask for the watchlist. You should be able to replicate it in 3-4 tries.
(gdb) run
Starting program: /usr/ports/pobj/esniper-2.35.0/esniper-2-35-0/esniper -m
Program received signal SIGSEGV, Segmentation fault.
strlen () at /usr/src/lib/libc/arch/amd64/string/strlen.S:125
125 /usr/src/lib/libc/arch/amd64/string/strlen.S: No such file or directory.
in /usr/src/lib/libc/arch/amd64/string/strlen.S
Current language: auto; currently asm
(gdb) bt
#0 strlen () at /usr/src/lib/libc/arch/amd64/string/strlen.S:125
#1 0x000004a2edf3e9e5 in Curl_pretransfer (data=0x4a270901008) at transfer.c:1406
#2 0x000004a2edf4eb9a in multi_runsingle (multi=0x4a2b2eb7808, now={tv_sec = 96041, tv_usec = 578763},
data=0x4a270901008) at multi.c:1441
#3 0x000004a2edf4e3ca in curl_multi_perform (multi=0x4a2b2eb7808, running_handles=0x7f7ffffdc48c) at multi.c:2214
#4 0x000004a2edf41d25 in easy_transfer (multi=0x4a2b2eb7808) at easy.c:686
#5 0x000004a2edf4074e in easy_perform (data=0x4a270901008, events=false) at easy.c:780
#6 0x000004a2edf40563 in curl_easy_perform (data=0x4a270901008) at easy.c:799
#7 0x000004a0606dae68 in httpRequest (
url=0x4a343e38880 "https://my.ebay.com/ws/eBayISAPI.dll?MyeBay&CurrentPage=MyeBayWatching", logUrl=0x0,
data=0x4a0606c9a49 "", logData=0x0, rt=GET) at http.c:177
#8 0x000004a0606dab7a in httpGet (
url=0x4a343e38880 "https://my.ebay.com/ws/eBayISAPI.dll?MyeBay&CurrentPage=MyeBayWatching", logUrl=0x0)
at http.c:79
#9 0x000004a0606cfdec in printMyItems () at auction.c:1217
#10 0x000004a0606d4df2 in main (argc=0, argv=0x7f7ffffdc858) at esniper.c:850
It seems this patch solves those crashes, but the issue must be deeper
The reason must be a wrong implementation of libcurl easy in BSD.
If a http GET request is used, there is no need to set options dealing with POST.
libcurl is the same as on linux, there is no specific one for BSD. I made this change because the segfault was in a httpGet request but using some post options in libcurl. Why is POST called in GET, I have no idea, I would need to understand the whole code of esniper to find that. Hence why I opened the bug report, there is something wrong somewhere, but I have not enough experience in libcurl or esniper to find it.
Besides, "esniper -m" always ends without any result, even if there are some tings in my watch list. So there is clearly some issue deeper somewhere here.
The libcurl-easy API is used according to documentation (https://curl.haxx.se/libcurl/c/libcurl-easy.html). Maybe you should submit a bug at https://github.com/curl/curl/issues.
Bug submitted in curl: https://github.com/curl/curl/issues/3548
It seems the answer from curl people is mixed.
The reason for the seg. fault in BSD seems to be a stale pointer (https://github.com/curl/curl/issues/3548). We need to add the 2 lines submitted by Renaud Allard above. For me it makes no sense to set a pointer, which is only be used by the POST-method, but we depend on curllib and their maintainers.
Seems to be fixed in curl:a6d134e
Commit [89bd41] fixes the bug as long as no new version of libcurl is available in the used distro.
But the 2 lines of additional code will not have much influence on the speed of esniper.
Related
Commit: [89bd41]