• LUA calls
    7 replies, posted
I'm not sure how to ask this properly: I've found a way to make a pair of expression 2 script, both identical, to hang up any server, despite any anti-E2-abuse measure it has. This question isn't related to said E2 bug and script, but I would like to know how are LUA calls handled, in an effort to learn why this particular script can hang any server. I will NOT post said E2 script because of the repercussions of giving every forum-reader a instant server crash tool but I'll hint how it works: Basically two E2's interact with the same "element" at the same moment and lock up the server. My guess is that the server waits for each E2 to finish the read/write operation, and both E2s end up in a deadlock trying to read/write the same element at the same time. Since the E2s never finish read/writing because of the deadlock, the server hangs up waiting for the LUA scripts to report back. The best way I can think of asking is: How are E2 (or any other) LUA calls handled?
Wiremod is quite complex, you should probably ask that on the wiremod forums, but you shouldn't because they would kick you out for that server crashing shit.
Because lua isn't threaded, file write/read operations never have collision problems.
If you know a bit about Lua, it shouldn't be too difficult to have a look through the E2 entity code, if not there's a load of articles out there. I also suggest you report it directly to the developers (Wire Team) so they can attempt to resolve the issue. As Wizard pointed out, the forums won't take it too well.
PM the script that crashes it to one of the Wiremod Devs on their forums, that way you wont get banned.
I am obviously not going to post said code anywhere, its a weapon of mass destruction waiting to be minged all around.... Someone said LUA isnt threaded, doesn't that mean that if for some reason the read/write fails to complete, it would get the whole server stuck? However if its not threaded that means that one E2 cant block the other E2 simultaneously, which means the problem comes from something else, and there should be a way to reproduce the error with only 1 E2. I haven't found how to do it yet, but I've tried :b
Read/Write with e2's send user-messages to download and upload data to the client if that helps at all.
[QUOTE=meoiswa;31798089]I am obviously not going to post said code anywhere, its a weapon of mass destruction waiting to be minged all around.... Someone said LUA isnt threaded, doesn't that mean that if for some reason the read/write fails to complete, it would get the whole server stuck? However if its not threaded that means that one E2 cant block the other E2 simultaneously, which means the problem comes from something else, and there should be a way to reproduce the error with only 1 E2. I haven't found how to do it yet, but I've tried :b[/QUOTE] I assume you are causing an infite loop somehow. Just add divran or whatever on steam and send him the code and stop waving your dick about your super duper crash e2.
Sorry, you need to Log In to post a reply to this thread.