Raised This Month: $51 Target: $400
 12% 

[EXTENSION] Socket (3.0.1)


Post New Thread Reply   
 
Thread Tools Display Modes
jimmehh5
New Member
Join Date: Jul 2013
Old 10-04-2013 , 14:22   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #441

Required extension "Socket" file("socket.ext") not running.

Help. I dont know what to do with GrooveShark.
jimmehh5 is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 11-08-2013 , 23:10   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #442

This extension has been causing Source Engine servers to hang, waiting on a thread. The only plugin I use Socket with as far as I know, is SourceIRC.

01:54 StrikerMan780 Hey Asherkin, you know that dump I had posted on the tracker, right?
01:54 asherkin yes
01:54 StrikerMan780 I got a minidump now of another crash, hopefully as a proper 32-bit one... would you be alright with helping me look at it again?
01:55 asherkin I can, but not tonight, if you email it to me at [email protected] I'll take a look in the morning
01:55 StrikerMan780 Alright
01:59 StrikerMan780 Ok, I sent the e-mail.
01:59 StrikerMan780 Thanks, by the way. Much appreciated.
02:00 StrikerMan780 It's too bad Windows' server binaries don't include debugging symbols
02:00 asherkin you should at least setup Accelerator
02:00 StrikerMan780 I know Valve has shown no interest in adding them, but they should be Pestered like crazy until they finally break
02:00 asherkin it wont make one shred of difference
02:00 StrikerMan780 Will Accelerator work despite the server freezing rather than crash?
02:01 asherkin the people that don't want them provided are the ones that don't communicate
02:02 asherkin I've spent decent portions of the last year discussing it with their optimization/crash investigation guy
02:02 StrikerMan780 Damn
02:02 StrikerMan780 Kind of a stupid move on their part
02:02 StrikerMan780 they include them with Linux Builds as it is
02:02 StrikerMan780 Kind of pointless to not include them with the Windows Builds as well
02:03 StrikerMan780 makes solving crashes/problems with windows dedis a pain in the ass
02:03 asherkin it's mostly a lack of understanding, and an unwillingness / lack of time to learn
02:04 asherkin that dump is also stuck in sockets
02:04 asherkin (what can I say, I'm impatient)
02:05 StrikerMan780 perhaps it's something that should be reported to the creator of the socket extension?
02:05 asherkin he hasn't been around in years
02:05 StrikerMan780 is the source code still around for it?
02:06 asherkin best bet would be to compile it yourself, then give me the PDB (so I can add symbols to Throttle), then I can give you a stack trace with function names
02:06 asherkin yeah; if his site is down it's been posted in the thread
02:06 StrikerMan780 ah, found the source : http://player.to/gitweb/index.cgi?p=sm-ext-socket.git
02:06 StrikerMan780 So, how would I go about compiling extensions?
02:07 asherkin https://phabricator.alliedmods.net/P3
02:08 asherkin that... is something that is unreasonably complex for most 3rd party extensions, and is likely even worse for that one
02:08 asherkin at a more reasonable time of night (although he might still be around, try poking him in #sourcemod), psychonic would be the best person to ask; he may have built that one in the past
02:09 asherkin it's definitely not something I'm going to attempt unravelling at 5am
02:09 StrikerMan780 Ok, so
02:09 StrikerMan780 looking at that paste
02:09 StrikerMan780 It's an infinite loop?
02:09 asherkin no, it's waiting on a critical section (i.e. another thread)
02:09 StrikerMan780 Ah
02:10 asherkin (I don't know why I'm missing windows symbols there, poking that now >.< )
02:12 asherkin https://phabricator.alliedmods.net/P4 that's better
02:13 StrikerMan780 ah
02:14 StrikerMan780 Perhaps psychonic could help in that regard, going by what you said?

Last edited by StrikerMan780; 11-08-2013 at 23:12.
StrikerMan780 is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 12-24-2013 , 10:29   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #443

Code:
// native SocketSend(Handle:socket, String:command[], size); cell_t SocketSend(IPluginContext *pContext, const cell_t *params) {     SocketWrapper* sw = extension.GetSocketWrapperByHandle(static_cast<Handle_t>(params[1]));     if (sw == NULL) return pContext->ThrowNativeError("Invalid handle: %i", params[1]);     char* dataTmp = NULL;
    pContext->LocalToString(params[2], &dataTmp);
    std::string data;     if (params[3] == -1) {         data.assign(dataTmp);     } else {         data.assign(dataTmp, params[3]);     }     switch (sw->socketType) {         case SM_SocketType_Tcp: {             Socket<tcp>* socket = (Socket<tcp>*) sw->socket;             if (!socket->IsOpen()) return pContext->ThrowNativeError("Can't send, socket is not connected");             return socket->Send(data);         }         case SM_SocketType_Udp: {             Socket<udp>* socket = (Socket<udp>*) sw->socket;             if (!socket->IsOpen()) return pContext->ThrowNativeError("Can't send, socket is not connected");
            socket->incomingCallback = pContext->GetFunctionById(params[2]);
            return socket->Send(data);         }         default:             return false;     } } // native SocketSendTo(Handle:socket, const String:data[], size=-1, const String:hostname[], port); cell_t SocketSendTo(IPluginContext *pContext, const cell_t *params) {     SocketWrapper* sw = extension.GetSocketWrapperByHandle(static_cast<Handle_t>(params[1]));     if (sw == NULL) return pContext->ThrowNativeError("Invalid handle: %i", params[1]);     if (sw->socketType == SM_SocketType_Tcp) return pContext->ThrowNativeError("This native doesn't support connection orientated protocols");     char* dataTmp = NULL;
    pContext->LocalToString(params[2], &dataTmp);
    std::string data;     if (params[3] == -1) {         data.assign(dataTmp);     } else {         data.assign(dataTmp, params[3]);     }     char* hostname = NULL;     pContext->LocalToString(params[4], &hostname);     switch (sw->socketType) {         case SM_SocketType_Udp: {             Socket<udp>* socket = (Socket<udp>*) sw->socket;             //if (!socket->IsOpen()) return pContext->ThrowNativeError("Can't send, socket is not connected");
            socket->incomingCallback = pContext->GetFunctionById(params[2]);
            return socket->SendTo(data, hostname, params[5]);         }         default:             return false;     } }

Hey !!
What was going on ?
Does anyone find that code ?
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-06-2014 , 11:40   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #444

Seems like author is inactive for this
Anyone mind fixing this so +ip arguement of srcds_run launch(and possibly srcds.exe) plays nice to allow plugins like sourceirc to work?
WildCard65 is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 03-06-2014 , 11:54   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #445

Quote:
Originally Posted by StrikerMan780 View Post
This extension has been causing Source Engine servers to hang, waiting on a thread. The only plugin I use Socket with as far as I know, is SourceIRC.[...]
Any news on this? Have been having this issue on rare occasions, but consistently for quite a while now.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 04-16-2014 , 20:02   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #446

Quote:
Originally Posted by Dr. Greg House View Post
Any news on this? Have been having this issue on rare occasions, but consistently for quite a while now.
No, unfortunately. I'm still getting the hang. I hope someone can fix this, or create a new drop-in alternative to Socket that won't hang a server if it's waiting on a connection (reminds me of Non-Threaded vs. Threaded SQL). I may put the Socket Extension sources on Bitbucket instead of the old page there where it can be more accessible to modification.

Last edited by StrikerMan780; 04-16-2014 at 20:04.
StrikerMan780 is offline
pmk010
New Member
Join Date: Mar 2014
Old 05-03-2014 , 18:57   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #447

Hello there. Firstly I would like to thank you for a super useful extension.

I am new to developing plugins and have been working on a project using socket, however have had this single error message that I can't fix when trying to compile, and I can't understand why it is happening.

Code:
SourcePawn Compiler 1.5.2
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC

bot8.sp(157) : error 100: function prototypes do not match

1 Error.
That is the error I am getting, and this is line 157 of the code:
Code:
SocketConnect(r_socket, OnSocketConnected, OnSocketReceive, OnSocketDisconnected, botIp, StringToInt(botPort));
And the chunk of code that I think may be relevant to this:
Code:
    new Handle:r_socket = SocketCreate(SOCKET_TCP, OnSocketError);
    SocketConnect(r_socket, OnSocketConnected, OnSocketReceive, OnSocketDisconnected, botIp, StringToInt(botPort));
    SocketSetArg(r_socket, iClient);
    Format(requestStr, sizeof(requestStr), "GET /?communityid=%s HTTP/1.0\r\nHost: %s\r\nConnection: close\r\n\r\n", communityid, botIp);
Now, from my attempts to debug I haven't been able to locate which function prototype(s) do not match. I have spent quite a few hours on this to no avail and would really appreciate some help, and assume this is the best place to ask for help.
pmk010 is offline
Alex30555
Member
Join Date: Sep 2011
Location: Paris
Old 05-31-2014 , 18:55   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #448

Hi

What is this error plz ?

Code:
[SERR] callback not executable (event=1)
And

Code:
[SERR] callback not executable (event=3)
Thanks @all
__________________
Alex30555 is offline
weeb1e
SourceMod Donor
Join Date: Sep 2011
Old 06-15-2014 , 23:27   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #449

This extension is missing socket exception handling which causes very rare segfaults on servers using listening sockets.

I have patched the issue and will be testing it on a single server for a while, to make sure there are no issues before releasing a patch.

Last edited by weeb1e; 06-16-2014 at 04:25.
weeb1e is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 06-18-2014 , 18:06   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #450

I've had issues with the "size" parameter in the last few days. It seems to be ignored when certain special characters are used (gg nicknames), so as a result "more" data is being sent. So among the size I also null-terminate the buffer and it fixed the issue. I should note at this point that since I write raw data to it that there are actually 0-bytes before the message ends. So I have no idea why this actually works.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode