Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Core dump (gdb)at /shutdown #46

Open
Pietia10 opened this issue Mar 12, 2015 · 12 comments
Open

Core dump (gdb)at /shutdown #46

Pietia10 opened this issue Mar 12, 2015 · 12 comments

Comments

@Pietia10
Copy link
Member

When you type /shutdown and gdb is on this happens:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 malloc_consolidate (av=av@entry=0x7f9b64000020) at malloc.c:4151

4151 malloc.c: No such file or directory.
(gdb) bt
#0 malloc_consolidate (av=av@entry=0x7f9b64000020) at malloc.c:4151
#1 0x00007f9b6ed21691 in _int_free (av=0x7f9b64000020, p=,

have_lock=0) at malloc.c:4057

#2 0x00007f9b6ecdfbc9 in __run_exit_handlers (status=0,

listp=0x7f9b6f04b5a8 <__exit_funcs>,
run_list_atexit=run_list_atexit@entry=true) at exit.c:82

#3 0x00007f9b6ecdfc15 in __GI_exit (status=) at exit.c:104
#4 0x00007f9b6ecc9b4c in __libc_start_main (

main=0x416bc0 <main(int, char**)>, argc=4, argv=0x7fff109c3418,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fff109c3408) at libc-start.c:321

#5 0x000000000041a900 in _start ()

@iryont
Copy link
Contributor

iryont commented Mar 20, 2015

The log does not provide enough information due to being incomplete. Also, I never had this issue myself.

You should ask each thread of the server where it currently is (thread N -> where) and perhaps you will be able to find some more useful information.

@Pietia10
Copy link
Member Author

This bug is in latest trunk for sure.
That didn't helped same trace.

@iryont
Copy link
Contributor

iryont commented Mar 20, 2015

Alright then, please comment following two lines:

https://github.com/opentibia/server/blob/legacy/src/game.cpp#L167
https://github.com/opentibia/server/blob/legacy/src/game.cpp#L168

Basically these two:

g_scheduler.stop();
g_dispatcher.stop();

They shouldn't be in there. The dispatcher won't execute final shutdown call due to closing state.

@Pietia10
Copy link
Member Author

(gdb) bt full
#0 0x00007f48013bd78b in std::ostream::flush() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#1 0x00007f480139607c in std::ios_base::Init::~Init() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#2 0x00007f4800a9ef4f in cxa_finalize (d=0x7f480277d200)
at cxa_finalize.c:56
check = 149
cxafn =
cxaarg =
f = 0x7f4800e0bdd0 <initial+368>
funcs = 0x7f4800e0bc60
#3 0x00007f4802574823 in ?? ()
from /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.55.0
No symbol table info available.
#4 0x00007fff9e29f050 in ?? ()
No symbol table info available.
#5 0x00007f480311400a in _dl_fini () at dl-fini.c:252
array = 0x7f480277c230
i = 0
nmaps =
nloaded =
---Type to continue, or q to quit---
i =
l = 0x7f480331b520
ns = 139947225509711
maps = 0x7f480277cd68
maps_size = 139947234910332
do_audit = 32584
__PRETTY_FUNCTION
= "_dl_fini"
Backtrace stopped: frame did not save the PC

@diegorodriguesvieira
Copy link

@Pietia10 did you fix this bug?

@Pietia10
Copy link
Member Author

I'm afraid not.

@diegorodriguesvieira
Copy link

@Pietia10 can you help me with an issue?
Ezzz-dev/OTHire#133

This crash rarely happens and I do not know how to solve it

Cheers =)

@Pietia10
Copy link
Member Author

Pietia10 commented Mar 12, 2017

Try to copy CreatureEvent::executeOnKill function also copy this ae3493a from latest legacy.

@diegorodriguesvieira
Copy link

Thank you a lot @Pietia10 I will test...

@diegorodriguesvieira
Copy link

@Pietia10
Sorry for bothering you so much, but you're my last hope...

Can you help-me with this crash?
Ezzz-dev/OTHire#141

I do not understand very well, but can it be something related to this (checksum)?
https://github.com/opentibia/server/blob/legacy/src/connection.cpp#L349

OTHire does not have this...
https://github.com/TwistedScorpio/OTHire/blob/master/source/connection.cpp#L327

@diegorodriguesvieira
Copy link

@iryont can you help me please?

@sutari69
Copy link

prankat

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants