Sphereserver / Source

http://spherecommunity.net
Apache License 2.0
108 stars 58 forks source link

Fallo en Linux #267

Open Farafelu opened 1 year ago

Farafelu commented 1 year ago

Hay algún problema en la versión para Linux.

Tengo un shard estable corriendo en 56d bajo Windows, pero cuando lo hago funcionar bajo la misma build version pero en Linux, aleatoriamente se cierra montando este mensaje.

malloc(): invalid size (unsorted)

Si intento volver a iniciarlo no inicia, se cuelga al leer sphereworld. Revisanfo el sphereworld de un cierre que no arranca, con el save inmediato anterior que si arranca, la diferencia es este item creado en la layer 28 de un Vendedor

i_deed_tent_blue

Es decir, el fallo malloc() se generó al crear el diálogo de venta del vendedor. Lo extraño es que ese artículo no está en la lista de vendidos.

Quiero conseguir funcionar de manera estable (como ahora) bajo Linux, pero este problema me lo impide.?¿Que podría hacer?

Gracias.

coruja747 commented 1 year ago

Honestly this malloc() error can be related to many things, so it will be hard to debug this problem with only these few info. But as the error message suggests, maybe it should be some item/char property (VALUE, MORE, AMOUNT, COLOR, LAYER, etc) with a too big value, or negative value where it can't be negative. So you can try search for something like this on your worldsave files

You can also switch between 32/64bit sphere builds to check if the problem persist

Farafelu commented 1 year ago

Thanks for answering!

Well check my sphereworld.scp and the error was caused by this:

[WORLDITEM i_deed_tent_blue] SERIAL=040042f1d DISPID=i_deed AMOUNT=5 MORE1=m_blue_tent CONT=0400275b6
P=132,174,5
CONTGRID=5

CONT it's layer 28 of a home seller.

Interestingly, that item (i_deed_tent_blue) is not in that seller's list of sold items.

[TEMPLATE VENDOR_S_DEED_TEMPLATE] CATEGORY=Vendor Templates SUBSECTION=Sell Templates DESCRIPTION=Deed Vendor SELL=i_deed_House_stone_small,{2 6} //SELL=i_deed_tent_blue,{2 6}

Sphere version is 32 bits.

Farafelu commented 1 year ago

Today it has happened again.

this time with the 64bit version (I changed to test)

Console error:

FATAL:(sphereworld.scp,884248)Server Unstable: Aborted malloc(): invalid size (unsorted) Segmentation fault (core dumped)

sphereworld line 884248:

[WORLDITEM i_deed_tent_green] SERIAL=04002ffe0 DISPID=i_deed AMOUNT=3 MORE1=i_multi_tent_green CONT=0400275b6 P=68,112,3 CONTGRID=6

This items is CONT: CONT=0400275b6

[WORLDITEM i_vendorbox] SERIAL=0400275b6 ATTR=014 LAYER=28 CONT=0276b8

Interestingly, that item (i_deed_tent_green) is not in that seller's list of sold items.

I'm running out of ideas.... Why is that causing this error?

coruja747 commented 1 year ago

What's exactly the content of line 884248? It's CONT=0400275b6 ?

Also try check if your server have enough free RAM, because linux sometimes throw these weird errors when it run out of ram

Farafelu commented 1 year ago

Hi.

The line 884248 is

[WORLDITEM i_deed_tent_green]

Currently it has 2 cores with 2gb ram each core, total 4gb ram.