Raised This Month: $32 Target: $400
 8% 

[CORE?] Heap Low


  
 
 
Thread Tools Display Modes
Author Message
doubleM
Member
Join Date: Aug 2005
Old 09-30-2006 , 16:34   [CORE?] Heap Low
#1

Smells like a compiler issue to me, yet im not really sure. Not really a way to trace it either, even with debig it doesnt give me a line.

L 09/29/2006 - 203:47: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 09/29/2006 - 203:47: [AMXX] Run time error 8: heap low
L 09/29/2006 - 203:47: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 09/29/2006 - 203:47: [AMXX] Run time error 8: heap low
L 09/29/2006 - 203:47: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 09/29/2006 - 203:47: [AMXX] Run time error 8: heap low
L 09/29/2006 - 203:47: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 09/29/2006 - 203:47: [AMXX] Run time error 8: heap low
L 09/29/2006 - 203:47: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 09/29/2006 - 203:47: [AMXX] Run time error 8: heap low

This error continues MB after MB.

sub_storage is one of my most memory intensive plugins, so it may have to do with that... yet I have run this same plugin perfectly on 1.75.

Also: I would post it if you really need it... but its very, very long, and i really dont want it to be public...
doubleM is offline
BAILOPAN
Join Date: Jan 2004
Old 09-30-2006 , 17:21   Re: [CORE?] Heap Low
#2

Check the link below and see if your plugin contains instances of the compiler bug explained therein:
http://www.compuphase.com/bitboard/i...cix_1156756598

If it does, you should recompile your plugin with the 1.76 compiler. The reason this error message did not display on 1.75 was because of a bug in the JIT.
__________________
egg
BAILOPAN is offline
doubleM
Member
Join Date: Aug 2005
Old 09-30-2006 , 17:29   Re: [CORE?] Heap Low
#3

wow, thats a long post... but i dont think i need to read it.

all my plugins are compliled with 1.76a compiler. I always recompile everything when a new version comes out.
doubleM is offline
BAILOPAN
Join Date: Jan 2004
Old 09-30-2006 , 17:32   Re: [CORE?] Heap Low
#4

You said you don't want your plugin to be public but I think I need a copy of it to see where the compiler is going wrong. If you e-mail it to me and instructions on how to reproduce the problem I will look into it (and won't distribute it). Source code + precompiled binaries, and if it uses any SQL, schema and sample data if it can be provided.

I will try and look at it as soon as I can.

[email protected]
__________________
egg
BAILOPAN is offline
doubleM
Member
Join Date: Aug 2005
Old 09-30-2006 , 17:39   Re: [CORE?] Heap Low
#5

good luck, youll need it

rip when you pass out after data overload to the brain

(Email sent)

whoops, i completely forgot about the binaries. ill send them in another email i guess?

edit: and about the sql, yes it uses it, and yes, there is alot. However, because this is more of a system, and less of a plugin, the layout of the sql is completely different depending on the plugins that are using it. I dont really think this is the type of plugin you can really sit down and figure out. It cant even be readily tested, which makes it hell to figure out. In order to test it, it requires another plugin of mine (sub_stocks), as well as plugins to interface with it to make it work. Hopefully you have some magic that you can work on it? I dunno.

Last edited by doubleM; 09-30-2006 at 17:46.
doubleM is offline
doubleM
Member
Join Date: Aug 2005
Old 10-03-2006 , 21:31   Re: [CORE?] Heap Low
#6

I guess this can be closed. I emailed you all I can figure out, looks like the problem fixed itself, for now
doubleM is offline
BAILOPAN
Join Date: Jan 2004
Old 10-03-2006 , 21:38   Re: [CORE?] Heap Low
#7

For future reference: passing arrays of 4096 through SQL_ThreadQuery() and set_task() were causing these problems.
__________________
egg
BAILOPAN is offline
doubleM
Member
Join Date: Aug 2005
Old 10-04-2006 , 17:17   Re: [CORE?] Heap Low
#8

Ignore the post above this one ^. The problem is back.

BAIL, it occurs in the main processing loop of the sub_storage plugin i sent you, but I have also noticed it often happening in the get_playervalue_impl function:

Code:
L 10/04/2006 - 00:00:10: [AMXX] Displaying debug trace (plugin "sub_hud.amxx")
L 10/04/2006 - 00:00:10: [AMXX] Run time error 10: native error (native "get_playervalue")
L 10/04/2006 - 00:00:10: [AMXX]    [0] sub_hud.sma::update_hud (line 308)
L 10/04/2006 - 00:00:10: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 10/04/2006 - 00:00:10: [AMXX] Run time error 8: heap low 
L 10/04/2006 - 00:00:10: Unhandled dynamic native error
L 10/04/2006 - 00:00:10: [AMXX] Displaying debug trace (plugin "sub_hud.amxx")
L 10/04/2006 - 00:00:10: [AMXX] Run time error 10: native error (native "get_playervalue")
L 10/04/2006 - 00:00:10: [AMXX]    [0] sub_hud.sma::update_hud (line 308)
L 10/04/2006 - 00:00:10: [AMXX] Displaying debug trace (plugin "sub_storage.amxx")
L 10/04/2006 - 00:00:10: [AMXX] Run time error 8: heap low
The ENTIRE code of that function is:

Code:
public set_playervalue_impl(id, numparams) {
	if(numparams != 3)
		return log_error(10, "Bad native parameters")

	new id = get_param(1)
	new key[64]
	get_string(2, key, 63)
	new value[MAX_DATALENGTH]
	get_string(3, value, MAX_DATALENGTH-1)

	if((id != 0 && !playerloaded[id]) || (id == 0 && !maploaded)) {
		set_string(3, "", get_param(4))
		return 0
	}

	if(id != 0) {
		for(new i = 0; i < PLAYERFIELDS_NUM; i++) {
			if(equal(playerfields[i], key)) {
				if(!equal(playerdata[id][i], value)) {
					copy(playerdata[id][i], MAX_DATALENGTH-1, value)
					playerdata_changed[id][i] = 1
				}
				return 1
			}
		}
	} else {
		for(new i = 0; i < MAPFIELDS_NUM; i++) {
			if(equal(mapfields[i], key)) {
				if(!equal(mapdata[i], value)) {
					copy(mapdata[i], MAX_DATALENGTH-1, value)
					mapdata_changed[i] = 1
				}
				return 1
			}
		}
	}

	log_message("Unknown storage key on set! Key: %s ID: %d", key, id)
	return 0
}
Nothing too crazy is going on in there... im not really sure what the problem could be.
doubleM is offline
doubleM
Member
Join Date: Aug 2005
Old 10-04-2006 , 17:23   Re: [CORE?] Heap Low
#9

Oh, one more thing (this is not a double post, its a seporate topic)

I am running two servers using this exact sub_storage plugin on both.

One server uses the system more aggressively than the other, throwing an unrestricted (i dunno, up to 10/second?) number of queries directly into the sqlx queue. This server is the one with the heap error. The other one does NOT have the error EVER.

Although this isnt really how it does it, imagine that the server is doing something like this:

Code:
SQL_ThreadQuery(tuple, "handler", "query1")
SQL_ThreadQuery(tuple, "handler", "query2")
SQL_ThreadQuery(tuple, "handler", "query3")
SQL_ThreadQuery(tuple, "handler", "query4")
SQL_ThreadQuery(tuple, "handler", "query5")
SQL_ThreadQuery(tuple, "handler", "query6")
SQL_ThreadQuery(tuple, "handler", "query7")
SQL_ThreadQuery(tuple, "handler", "query8")
SQL_ThreadQuery(tuple, "handler", "query9")
SQL_ThreadQuery(tuple, "handler", "query10")
SQL_ThreadQuery(tuple, "handler", "query11")
SQL_ThreadQuery(tuple, "handler", "query12")
Imagine it just throwing a load of queries into the queue at once. That is basically what is happening... I know it isnt good to do that, but it shouldnt cause a low heap error should it?
doubleM is offline
BAILOPAN
Join Date: Jan 2004
Old 10-22-2006 , 01:32   Re: [CORE?] Heap Low
#10

No, this should not cause a problem unless there is some bug in the compiler.
__________________
egg
BAILOPAN is offline
 



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 16:51.


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