Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sometimes fbtracemgr segfaults when ending with ctrl+c [CORE3487] #3846

Closed
firebird-automations opened this issue May 20, 2011 · 10 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Paulius Pazera (ppazera)

make one connection with isql, do nothing in it, then start fbtracemgs and ctrl+c it until you get segmentation fault:

aspdb1:/tmp #⁠ /opt/fb25/bin/fbtracemgr -se localhost/3055:service_mgr -user sysdba -password masterkey -config /opt/fb25/fbtrace.conf -start
Trace session ID 2 started
^Caspdb1:/tmp #⁠ /opt/fb25/bin/fbtracemgr -se localhost/3055:service_mgr -user sysdba -password masterkey -config /opt/fb25/fbtrace.conf -start
Trace session ID 3 started
^Caspdb1:/tmp #⁠ /opt/fb25/bin/fbtracemgr -se localhost/3055:service_mgr -user sysdba -password masterkey -config /opt/fb25/fbtrace.conf -start
^CSegmentation fault (core dumped)

call stack was:

[New Thread 2008]
Core was generated by `/opt/fb25/bin/fbtracemgr -se localhost/3055:service_mgr -user sysdba -password'.
Program terminated with signal 11, Segmentation fault.
#⁠0 gds__log (text=0x7f08a24c1d18 "INET/inet_error: %s errno = %d") at ../src/include/../common/classes/alloc.h:408
408 ((MemoryBlock*) ((char*) block - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_pool->deallocate(block);
(gdb) bt
#⁠0 gds__log (text=0x7f08a24c1d18 "INET/inet_error: %s errno = %d") at ../src/include/../common/classes/alloc.h:408
#⁠1 0x00007f08a235b0c8 in inet_error (port=0x7f08a2991d00, function=0x7f08a298d8b8 <Address 0x7f08a298d8b8 out of bounds>, operation=335544726,
status=6433568) at ../src/remote/inet.cpp:2727
#⁠2 0x00007f08a235c096 in packet_receive (port=0x7f08a2991d00, buffer=0x7f08a298dc18 <Address 0x7f08a298dc18 out of bounds>,
buffer_length=<value optimized out>, length=0x7fffafe80e26) at ../src/remote/inet.cpp:3150
#⁠3 0x00007f08a235c535 in inet_getbytes (xdrs=0x7f08a2991df0, buff=0x7fffafe80e74 "", count=<value optimized out>) at ../src/remote/inet.cpp:2851
#⁠4 0x00007f08a235ac0c in inet_getlong (xdrs=0x7f08a128ca00, lp=0x7fffafe80ea4) at ../src/remote/inet.cpp:2667
#⁠5 0x00007f08a236500a in xdr_enum (xdrs=0x7f08a128ca00, ip=0x7f08a2996338) at ../src/remote/xdr.cpp:340
#⁠6 0x00007f08a2361eaa in xdr_protocol (xdrs=0x7f08a128ca00, p=0x7f08a298d8b8) at ../src/remote/protocol.cpp:271
#⁠7 0x00007f08a235acab in receive (main_port=0x7f08a2991d00, packet=0x7f08a2996338) at ../src/remote/inet.cpp:2076
#⁠8 0x00007f08a234f44c in receive_packet_noqueue (port=0x7f08a2991d00, packet=0x7f08a2996338, user_status=<value optimized out>)
at ../src/remote/interface.cpp:6207
#⁠9 0x00007f08a234f966 in receive_response (rdb=0x7f08a2996300, packet=0x7f08a2996338) at ../src/remote/interface.cpp:6094
#⁠10 0x00007f08a2350670 in info (user_status=0x7fffafe85400, rdb=0x7f08a2996300, operation=<value optimized out>, object=<value optimized out>,
incarnation=<value optimized out>, item_length=<value optimized out>, items=0x7fffafe854a0 "@\004", recv_item_length=2, recv_items=0x4177c9 "?\001",
buffer_length=16383, buffer=0x7fffafe81400 "") at ../src/remote/interface.cpp:5718
#⁠11 0x00007f08a2358445 in REM_service_query (user_status=0x7fffafe85400, svc_handle=<value optimized out>, item_length=8, items=0x7fffafe854a0 "@\004",
recv_item_length=<value optimized out>, recv_items=0x4177c9 "?\001", buffer_length=<value optimized out>, buffer=0x7fffafe81400 "")
at ../src/remote/interface.cpp:4024
#⁠12 0x00007f08a20da091 in isc_service_query (user_status=<value optimized out>, handle=0x7fffafe86108, send_item_length=11040,
send_items=0x7fffafe854a0 "@\004", recv_item_length=2, recv_items=0x4177c9 "?\001", buffer_length=<value optimized out>, buffer=0x7fffafe81400 "")
at ../src/jrd/why.cpp:4726
#⁠13 0x0000000000403ede in Firebird::TraceSvcUtil::runService (this=<value optimized out>, spbSize=<value optimized out>, spb=<value optimized out>)
at ../src/utilities/fbtracemgr/traceMgrMain.cpp:245
#⁠14 0x0000000000404bdd in Firebird::TraceSvcUtil::startSession (this=0x7fffafe86100, session=@0x7fffafe85cc0)
at ../src/utilities/fbtracemgr/traceMgrMain.cpp:181
#⁠15 0x000000000040fc0d in Firebird::fbtrace (uSvc=0x7f08a29882e0, traceSvc=0x7fffafe86100) at ../src/jrd/trace/TraceCmdLine.cpp:459
#⁠16 0x0000000000403cce in main (argc=<value optimized out>, argv=<value optimized out>) at ../src/utilities/fbtracemgr/traceMgrMain.cpp:346
(gdb) quit

Commits: 38e5124

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

Link: This issue depends on CORE3494 [ CORE3494 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Paulius, I could not reproduce segfault.
Can you provide stack traces for all threads, not only for one in which segfault happened?

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

Link: This issue depends on CORE3494 [ CORE3494 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Paulius Pazera (ppazera)

segfaulted on first try this time:

aspdb1:/glds/wincable/raid0-3x256gbSSD #⁠ /opt/fb25/bin/fbtracemgr -se localhost/3055:service_mgr -user sysdba -password masterkey -config /opt/fb25/fbtrace.conf -start
Trace session ID 2 started
^CSegmentation fault (core dumped)

call stack looks similar:

[New Thread 9683]
Core was generated by `/opt/fb25/bin/fbtracemgr -se localhost/3055:service_mgr -user sysdba -password'.
Program terminated with signal 11, Segmentation fault.
#⁠0 gds__log (text=0x7ffbfb88fd18 "INET/inet_error: %s errno = %d")
at ../src/include/../common/classes/alloc.h:408
408 ((MemoryBlock*) ((char*) block - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_pool->deallocate(block);
(gdb) thread apply all bt

Thread 2 (Thread 9683):
#⁠0 strcmp () at ../sysdeps/x86_64/strcmp.S:108
#⁠1 0x00007ffbfbb55e2c in check_match (sym=0xfefefefefefefeff) at do-lookup.h:125
#⁠2 0x00007ffbfbb562e4 in do_lookup_x (new_hash=1842243024, old_hash=0x7ffbf9a59aa8,
ref=<value optimized out>, result=0x1000, scope=<value optimized out>, i=8, flags=5, skip=0x0)
at do-lookup.h:197
#⁠3 0x00007ffbfbb5652e in _dl_lookup_symbol_x (undef_name=0x7ffbfaa96158 "__cxa_finalize",
undef_map=0x7ffbfbd34000, ref=0x7ffbf9a59b10, symbol_scope=0x7ffbfbd34358,
version=0x7ffbfbd32f78, type_class=1, flags=5, skip_map=0x0) at dl-lookup.c:340
#⁠4 0x00007ffbfbb5a3b9 in _dl_fixup (l=0xffffffffffffffff, reloc_offset=<value optimized out>)
at dl-runtime.c:108
#⁠5 0x00007ffbfbb602a2 in _dl_runtime_resolve () at ../sysdeps/x86_64/dl-trampoline.S:43
#⁠6 0x00007ffbfaa96ea6 in __do_global_dtors_aux () from /lib64/libm.so.6
#⁠7 0x0000000000000000 in ?? ()

Thread 1 (Thread 9682):
#⁠0 gds__log (text=0x7ffbfb88fd18 "INET/inet_error: %s errno = %d")
at ../src/include/../common/classes/alloc.h:408
#⁠1 0x00007ffbfb7290c8 in inet_error (port=0x7ffbfbd5fd00,
function=0x7ffbfbd5b8b8 <Address 0x7ffbfbd5b8b8 out of bounds>, operation=335544726,
status=6433568) at ../src/remote/inet.cpp:2727
#⁠2 0x00007ffbfb72a096 in packet_receive (port=0x7ffbfbd5fd00,
buffer=0x7ffbfbd5bc18 <Address 0x7ffbfbd5bc18 out of bounds>,
buffer_length=<value optimized out>, length=0x7fff3e50b746) at ../src/remote/inet.cpp:3150
#⁠3 0x00007ffbfb72a535 in inet_getbytes (xdrs=0x7ffbfbd5fdf0, buff=0x7fff3e50b794 "ÿ\177",
count=<value optimized out>) at ../src/remote/inet.cpp:2851
#⁠4 0x00007ffbfb728c0c in inet_getlong (xdrs=0x7ffbfa65aa00, lp=0x7fff3e50b7c4)
at ../src/remote/inet.cpp:2667
#⁠5 0x00007ffbfb73300a in xdr_enum (xdrs=0x7ffbfa65aa00, ip=0x7ffbfbd64338)
at ../src/remote/xdr.cpp:340
#⁠6 0x00007ffbfb72feaa in xdr_protocol (xdrs=0x7ffbfa65aa00, p=0x7ffbfbd5b8b8)
at ../src/remote/protocol.cpp:271
#⁠7 0x00007ffbfb728cab in receive (main_port=0x7ffbfbd5fd00, packet=0x7ffbfbd64338)
at ../src/remote/inet.cpp:2076
#⁠8 0x00007ffbfb71d44c in receive_packet_noqueue (port=0x7ffbfbd5fd00, packet=0x7ffbfbd64338,
user_status=<value optimized out>) at ../src/remote/interface.cpp:6207
#⁠9 0x00007ffbfb71d966 in receive_response (rdb=0x7ffbfbd64300, packet=0x7ffbfbd64338)
at ../src/remote/interface.cpp:6094
#⁠10 0x00007ffbfb71e670 in info (user_status=0x7fff3e50fd20, rdb=0x7ffbfbd64300,
operation=<value optimized out>, object=<value optimized out>, incarnation=<value optimized out>,
item_length=<value optimized out>, items=0x7fff3e50fdc0 "@\004", recv_item_length=2,
recv_items=0x4177c9 "?\001", buffer_length=16383, buffer=0x7fff3e50bd20 "?")
at ../src/remote/interface.cpp:5718
#⁠11 0x00007ffbfb726445 in REM_service_query (user_status=0x7fff3e50fd20,
---Type <return> to continue, or q <return> to quit---
svc_handle=<value optimized out>, item_length=8, items=0x7fff3e50fdc0 "@\004",
recv_item_length=<value optimized out>, recv_items=0x4177c9 "?\001",
buffer_length=<value optimized out>, buffer=0x7fff3e50bd20 "?")
at ../src/remote/interface.cpp:4024
#⁠12 0x00007ffbfb4a8091 in isc_service_query (user_status=<value optimized out>,
handle=0x7fff3e510a28, send_item_length=11040, send_items=0x7fff3e50fdc0 "@\004",
recv_item_length=2, recv_items=0x4177c9 "?\001", buffer_length=<value optimized out>,
buffer=0x7fff3e50bd20 "?") at ../src/jrd/why.cpp:4726
#⁠13 0x0000000000403ede in Firebird::TraceSvcUtil::runService (this=<value optimized out>,
spbSize=<value optimized out>, spb=<value optimized out>)
at ../src/utilities/fbtracemgr/traceMgrMain.cpp:245
#⁠14 0x0000000000404bdd in Firebird::TraceSvcUtil::startSession (this=0x7fff3e510a20,
session=@0x7fff3e5105e0) at ../src/utilities/fbtracemgr/traceMgrMain.cpp:181
#⁠15 0x000000000040fc0d in Firebird::fbtrace (uSvc=0x7ffbfbd562e0, traceSvc=0x7fff3e510a20)
at ../src/jrd/trace/TraceCmdLine.cpp:459
#⁠16 0x0000000000403cce in main (argc=<value optimized out>, argv=<value optimized out>)
at ../src/utilities/fbtracemgr/traceMgrMain.cpp:346
Current language: auto; currently asm
Current language: auto; currently c++
(gdb)

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Same might happen with fbsvcmgr.
Does not need frontporting - in FB3 there are no reasons for this segfault.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

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

No branches or pull requests

2 participants