Crash on samba-server(4.4) .. Some Queries

amit kumar amitkuma at redhat.com
Wed Apr 19 05:40:33 UTC 2017


Hello,

Came across a crash on samba-server(4.4) RHEL-7.3.

(gdb) bt
#0  0x00007f8e1e4821d7 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f8e1e4838c8 in __GI_abort () at abort.c:90
#2  0x00007f8e1fde2c4b in dump_core () at ../source3/lib/dumpcore.c:322
#3  0x00007f8e1fdd6007 in smb_panic_s3 (why=<optimized out>) at
../source3/lib/util.c:814
#4  0x00007f8e222c959f in smb_panic (why=why at entry=0x7f8e21fe0f18
"smbXsrv_session_logoff_all failed") at ../lib/util/fault.c:166
#5  0x00007f8e21eb0b6c in exit_server_common (how=SERVER_EXIT_ABNORMAL,
how at entry=SERVER_EXIT_NORMAL, reason=0x7f8e21fe0f18
"smbXsrv_session_logoff_all failed")                <==================
    at ../source3/smbd/server_exit.c:240
#6  0x00007f8e21eb0e6e in smbd_exit_server_cleanly
(explanation=<optimized out>) at ../source3/smbd/server_exit.c:263   
            <============================
#7  0x00007f8e1f78bba2 in exit_server_cleanly
(reason=reason at entry=0x7f8e20d40a31 "NT_STATUS_CONNECTION_RESET") at
../source3/lib/smbd_shim.c:131
#8  0x00007f8e21e8ae06 in smbd_server_connection_terminate_ex
(xconn=0x7f8e246f5000, reason=0x7f8e20d40a31
"NT_STATUS_CONNECTION_RESET", location=<optimized out>)
    at ../source3/smbd/smb2_server.c:1081
#9  0x00007f8e21e8f54e in smbd_smb2_connection_handler (ev=<optimized
out>, fde=<optimized out>, flags=<optimized out>,
private_data=<optimized out>)
    at ../source3/smbd/smb2_server.c:3901
#10 0x00007f8e1fdeb45c in run_events_poll (ev=0x7f8e24691b30,
pollrtn=<optimized out>, pfds=0x7f8e246f6ed0, num_pfds=4) at
../source3/lib/events.c:257
#11 0x00007f8e1fdeb6b0 in s3_event_loop_once (ev=0x7f8e24691b30,
location=<optimized out>) at ../source3/lib/events.c:326
#12 0x00007f8e1e81240d in _tevent_loop_once (ev=ev at entry=0x7f8e24691b30,
location=location at entry=0x7f8e21fc6b40 "../source3/smbd/process.c:4117")
at ../tevent.c:533
#13 0x00007f8e1e8125ab in tevent_common_loop_wait (ev=0x7f8e24691b30,
location=0x7f8e21fc6b40 "../source3/smbd/process.c:4117") at ../tevent.c:637
#14 0x00007f8e21e7c6d1 in smbd_process
(ev_ctx=ev_ctx at entry=0x7f8e24691b30,
msg_ctx=msg_ctx at entry=0x7f8e24691c20, sock_fd=sock_fd at entry=39,
    interactive=interactive at entry=false) at ../source3/smbd/process.c:4117
#15 0x00007f8e22965304 in smbd_accept_connection (ev=0x7f8e24691b30,
fde=<optimized out>, flags=<optimized out>, private_data=<optimized out>)
    at ../source3/smbd/server.c:762
#16 0x00007f8e1fdeb45c in run_events_poll (ev=0x7f8e24691b30,
pollrtn=<optimized out>, pfds=0x7f8e246f6ed0, num_pfds=6) at
../source3/lib/events.c:257
#17 0x00007f8e1fdeb6b0 in s3_event_loop_once (ev=0x7f8e24691b30,
location=<optimized out>) at ../source3/lib/events.c:326
#18 0x00007f8e1e81240d in _tevent_loop_once (ev=ev at entry=0x7f8e24691b30,
location=location at entry=0x7f8e22968776 "../source3/smbd/server.c:1127")
at ../tevent.c:533
#19 0x00007f8e1e8125ab in tevent_common_loop_wait (ev=0x7f8e24691b30,
location=0x7f8e22968776 "../source3/smbd/server.c:1127") at ../tevent.c:637
#20 0x00007f8e22960ad4 in smbd_parent_loop (parent=<optimized out>,
ev_ctx=0x7f8e24691b30) at ../source3/smbd/server.c:1127
#21 main (argc=<optimized out>, argv=<optimized out>) at
../source3/smbd/server.c:1780

Code says:
5  0x00007f8e21eb0b6c in exit_server_common (how=SERVER_EXIT_ABNORMAL,
how at entry=SERVER_EXIT_NORMAL, reason=0x7f8e21fe0f18
"smbXsrv_session_logoff_all failed")
void smbd_exit_server_cleanly(const char *const explanation)
{
        exit_server_common(SERVER_EXIT_NORMAL, explanation);    <==== on
clean exit how should be NORMAL but frame-5 says ABNORMAL
}

*Queries*:
1. Looks to be a memory corruption? Is it?
2. Is there any bug filed for it?
3. for what purpose static struct smbd_shim shim; is used?    Mentioned
in file header...../* Shim functions required due to the horrible
dependency mess in Samba. */



-- 
Thanks
Amit Kumar
!!If you stumble, get back up. 
What happened yesterday, no longer matters.
Today is another day to move closer to your GOAL!!



More information about the samba-technical mailing list