prob crash 3.5.1 segflt log_level

Heiko L. h.lehmann at fh-lausitz.de
Wed Mar 31 06:16:06 MDT 2010


Hallo,


I compiled 3.5.1.
but smbd crashed, if log_level > 0
In according to [1] should be fixed at 3.5.1.

Is it...?

Is my problem (s. detail) fixed at 3.5.2?

regards heiko


[1] http://samba.sernet.de/
   -> Bug 7251
-----------------------------------------------------------------------
details:
-------


- centos
- installed 2 versions
  /usr/sbin/smbd version 3.3.12
  /usr/local/samba/sbin/smbd  version 3.5.1

- test14 gdb

  # echo $opt
  --prefix=/usr/local/samba --enable-debug --enable-developer

(gdb) run
Starting program: /usr/local/samba/sbin/smbd

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0011e991 in smb_posix_unlink (conn=0x120, req=0xbf858898,
    pdata=0x4eec60
"1�^\211�\203��PTR�\"",
total_data=1224640,
    smb_fname=0xbf858900) at smbd/trans2.c:7234
7234                    close_file(req, fsp, NORMAL_CLOSE);
(gdb) bt
#0  0x0011e991 in smb_posix_unlink (conn=0x120, req=0xbf858898,
    pdata=0x4eec60
"1�^\211�\203��PTR�\"",
total_data=1224640,
    smb_fname=0xbf858900) at smbd/trans2.c:7234
#1  0x00123fbb in set_sparse_flag (sbuf=0xbf858900) at smbd/dosmode.c:39
#2  0x001112b8 in smbd_do_qfsinfo (conn=0xbf8595b1, mem_ctx=0x0,
    info_level=0, flags2=0, max_data_bytes=3213202937, ppdata=0xbf859605,
    ret_data_len=0xbf859615) at smbd/trans2.c:3098
#3  0x00110817 in smbd_do_qfsinfo (conn=Cannot access memory at address 0xc
) at smbd/trans2.c:3000
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)

- test 15

  # /usr/local/samba/sbin/smbd

  - logfile1

   [2010/03/31 07:41:55.908719,  3] param/loadparm.c:9157(lp_load_ex)
  lp_load_ex: refreshing parameters
  Initialising global parameters
  rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
  [2010/03/31 07:41:55.909906,  3] ../lib/util/params.c:550(pm_process)
   params.c:pm_process() - Processing configuration file "/usr/local/samba
/lib/smb.conf"
  [2010/03/31 07:41:55.910362,  3] param/loadparm.c:7841(do_section)
   Processing section "[global]"
    ...
      doing parameter log file = /var/log/samba/log.%m
      doing parameter log level = 10
    [2010/03/31 07:41:55.911191,  5] lib/debug.c:405(debug_dump_status)
      INFO: Current debug levels:
        all: True/10
        tdb: False/0
    ...
    [2010/03/31 07:41:55.979485, 10] lib/util_sock.c:888(open_socket_in)
      bind succeeded on port 139
    [2010/03/31 07:41:55.979513,  5]
lib/util_sock.c:304(print_socket_options)
      Socket options:
            SO_KEEPALIVE = 1
    ...
    [2010/03/31 07:41:55.979818,  2] lib/util_sock.c:875(open_socket_in)
      bind failed on port 445 socket_addr = 0.0.0.0.
      Error = Address already in use
    [2010/03/31 07:41:55.979875,  0] smbd/server.c:466(smbd_open_one_socket)
      smbd_open_once_socket: open_socket_in: Address already in use
    [2010/03/31 07:41:55.979922,  2] lib/util_sock.c:875(open_socket_in)
      bind failed on port 139 socket_addr = 0.0.0.0.
      Error = Address already in use
    [2010/03/31 07:41:55.979954,  0] smbd/server.c:466(smbd_open_one_socket)
      smbd_open_once_socket: open_socket_in: Address already in use
    [2010/03/31 07:41:55.979976,  5] smbd/connection.c:142(claim_connection)
      claiming []
    ...
    [2010/03/31 07:41:56.085731, 10] lib/dbwrap_tdb.c:42(db_tdb_record_destr)
      Unlocking key 10500000FFFFFFFF0000
    [2010/03/31 07:41:56.085833,  3] smbd/server.c:868(exit_server_common)
      Server exit (normal exit)
    [2010/03/31 07:42:49,  0] smbd/server.c:main(1280)


     -> "Address already in use" ???
  -logfile2 (/usr/local/samba/var/log.smbd)


    [2010/03/31 07:41:55,  0] smbd/server.c:1085(main)
      smbd version 3.5.1 started.
      [2010/03/31 07:41:55.891322,  5] lib/debug.c:405(debug_dump_status)
      INFO: Current debug levels:
        all: True/10
        tdb: False/0

      ....
      [2010/03/31 07:41:55.905641, 10] param/loadparm.c:8402(set_server_role)
      set_server_role: role = ROLE_DOMAIN_PDC
    [2010/03/31 07:41:55.907647,  2]
lib/tallocmsg.c:106(register_msg_pool_usage)
      Registered MSG_REQ_POOL_USAGE
    [2010/03/31 07:41:55.907996,  2]
lib/dmallocmsg.c:77(register_dmalloc_msgs)
      Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
    [2010/03/31 07:55:34,  0] smbd/server.c:1085(main)
        smbd version 3.5.1 started.



----------------------------------------------------------
- test3.2 strace

tout=/tmp/strace.out

strace -f /usr/local/samba/sbin/smbd > $tout 2>&1

# more  $tout | egrep gettimeofday | wc -l
13526

   -> to many....!!!

   - add linenr $tout

  # cat  $tout.n | egrep -v "localtime|gettimeofday|gete.id32|unmap|
close|fstat64|fcntl64" | more
  32370 [pid 21862] brk(0x9145000)              = 0x9145000
  33191 [pid 21862] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  33192 [pid 21862] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  33193 Process 21862 detached
  33194 <... select resumed> )                  = 1 (in [23], left {9997,
177000})
  33199 write(8, "[2010/03/31 08:15:13.311291,  3]"..., 65) = 65
  ...
  33261 write(8, "[2010/03/31 08:15:13.315424, 10]"..., 74) = 74
  33263 write(8, "  Unlocking key 67550000FFFFFFFF"..., 37) = 37
  33269 rt_sigaction(SIGUSR1, {SIG_DFL, [], 0}, NULL, 8) = 0
  33274 rt_sigaction(SIGHUP, {SIG_DFL, [], 0}, NULL, 8) = 0
  33275 rt_sigaction(SIGTERM, {SIG_DFL, [], 0}, NULL, 8) = 0
  33279 write(8, "[2010/03/31 08:15:13.316496,  3]"..., 71) = 71
  33281 write(8, "  Server exit (normal exit)n", 28) = 28
  33282 unlink("/usr/local/samba/var/locks/smbd.pid") = 0
  33293 exit_group(0)                           = ?
  33294 Process 21863 detached

   ->  SIGSEGV in 21862

  # cat  $tout.n | egrep "21862" | tail
 33184 [pid 21862] stat64("/etc/localtime", {st_mode=S_IFREG|0644, 
st_size=2309, ...}) = 0
 33185 [pid 21862] gettimeofday({1270016113, 276420}, NULL) = 0
 33186 [pid 21862] stat64("/etc/localtime", {st_mode=S_IFREG|0644,
st_size=2309, ...}) = 0
 33187 [pid 21862] gettimeofday({1270016113, 276507}, NULL) = 0
 33188 [pid 21862] stat64("/etc/localtime", {st_mode=S_IFREG|0644,
st_size=2309, ...}) = 0
 33189 [pid 21862] gettimeofday({1270016113, 276611}, NULL) = 0
 33190 [pid 21862] stat64("/etc/localtime", {st_mode=S_IFREG|0644,
st_size=2309, ...}) = 0
 33191 [pid 21862] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
 33192 [pid 21862] --- SIGSEGV (Segmentation fault) @ 0 (0) ---

   - vielleicht doch loop gettimeofday

   -> Umlaut ??

-----------------------------------------------------------------------------------
  # date
  Mi 31. Mär 10:06:32 CEST 2010
  # echo $LANG
  de_DE.UTF-8

  - test  17 locale

  # export LANG=C
  # date
  Wed Mar 31 10:07:47 CEST 2010

  -> SIGSEGV

-----------------------------------------------------------------------------------

  - test 18 log

 # diff smb.conf.old smb.conf
 < log level = 10
 > ;log level = 10


 ->  smbd running, no SIGSEGV

    Bug scheinbar doch nicht in 3.5.1 behoben

    - evtl. zu  Bug 7251







More information about the samba-technical mailing list