View Single Post
deadlyruler
Member
Join Date: Dec 2008
Old 11-04-2014 , 20:08   Re: [EXTENSION] cURL & Hash
Reply With Quote #109

Hello,

I have a small issue. I am using curl_hash_file to check the md5 hash of files in a directory. After about 462 (+/- 1, but pretty consistent at 462) calls to curl_hash_file, the callback not come back after that.

After that when I attempt to reload the plugin to run curl_hash_file again, only 1 call will come back, and the second will hang. If reloading the plugin again, even the first call will not come back.

The calls to curl_hash_file are made 1 by 1, after the callback returns, the next curl_hash_file is run.

Unfortunately reloading the curl extension is not possible due to this error upon reloading:
[SM] Extension curl.ext.so failed to reload: Could not create CURL Slist type (err: 10)

I'm running the server on Ubuntu 14.04

Any help would be appreciated

Edit: It seems after running 300+ curl_hash_file calls and then letting the server run for a few minutes, the server will crash with
Quote:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
./srcds_run: line 324: 17051 Aborted (core dumped) $HL_CMD
I'm going to assume it is not my plugin causing this because it simply runs curl_hash_file function on a loop.

This occurred on one of my servers that is running on CentOS 64bit VPS. When this plugin was tested on servers that were being run from a dedicated server, they didn't seem to crash.

I will be staying away from it for now since it seems to be causing adverse effects.

Last edited by deadlyruler; 11-04-2014 at 21:06.
deadlyruler is offline