Bug 4136 - winbind PANIC on trust environment when ADS connection failed
Summary: winbind PANIC on trust environment when ADS connection failed
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.22
Hardware: PA-RISC Windows XP
: P3 regression
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-29 13:24 UTC by Ying Li
Modified: 2006-10-01 01:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ying Li 2006-09-29 13:24:43 UTC
This problem did not often happen. It only occured on ADS connection failed sometimes for 3.0.22, if samba is configured as ADS member, and joined to a parent-child trust domain tree. I searched bugzilla, not found similar issue. So I fill up this. Probably samba-3.0.23c has the same issue.

Due to unknown reason on Windows ADS site, ADS couldn't be connected after join successsfully. Restarting winbind would get a PANIC error:

[2006/09/27 11:03:07, 1] nsswitch/winbindd_cm.c:cm_prepare_connection(256)
  cli_negprot failed
[2006/09/27 11:03:07, 10] passdb/secrets.c:secrets_named_mutex_release(921)
  secrets_named_mutex: released mutex for HPCIF30V1
[2006/09/27 11:03:07, 10] libsmb/conncache.c:add_failed_connection_entry(109)
  add_failed_connection_entry: domain HPCIF30DC1 (HPCIF30V1) already tried and failed
[2006/09/27 11:03:07, 5] nsswitch/winbindd_cm.c:set_dc_type_and_flags(913)
  set_dc_type_and_flags: Could not open a connection to HPCIF30DC1: (NT_STATUS_UNSUCCESSFUL)
[2006/09/27 11:03:07, 10] nsswitch/winbindd_cache.c:cache_store_response(1494)
  Storing response for pid 23955, len 1300
[2006/09/27 11:03:07, 4] nsswitch/winbindd_dual.c:fork_domain_child(512)
  child daemon request 17
[2006/09/27 11:03:07, 10] nsswitch/winbindd_dual.c:child_process_request(387)
  process_request: request fn LIST_TRUSTDOM
[2006/09/27 11:03:07, 3] nsswitch/winbindd_misc.c:winbindd_dual_list_trusted_domains(119)
  [23950]: list trusted domains
[2006/09/27 11:03:07, 5] nsswitch/winbindd_cache.c:get_cache(145)
  get_cache: Setting MS-RPC methods for domain HPCIF30DC1
[2006/09/27 11:03:07, 10] nsswitch/winbindd_cache.c:trusted_domains(1402)
  trusted_domains: [Cached] - doing backend query for info for domain HPCIF30DC1
[2006/09/27 11:03:07, 3] nsswitch/winbindd_rpc.c:trusted_domains(837)
  rpc: trusted_domains
[2006/09/27 11:03:07, 3] nsswitch/winbindd_cm.c:connection_ok(854)
  Connection to HPCIF30V1 for domain HPCIF30DC1 was never initialised!
[2006/09/27 11:03:07, 0] lib/fault.c:fault_report(36)
  ===============================================================
[2006/09/27 11:03:07, 0] lib/fault.c:fault_report(37)
  INTERNAL ERROR: Signal 10 in pid 23955 (3.0.22 based HP CIFS Server A.02.03)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2006/09/27 11:03:07, 0] lib/fault.c:fault_report(39)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2006/09/27 11:03:07, 0] lib/fault.c:fault_report(40)
  ===============================================================
[2006/09/27 11:03:07, 0] lib/util.c:smb_panic2(1554)
  PANIC: internal error

Program terminated with signal 6, Aborted.
#0  0x7b0050d8 in kill () from /usr/lib/libc.2
(gdb) bt                                              Quit
(gdb) 7b0050d8 in kill () from /usr/lib/libc.2
#1  0x7af9c6c4 in raise () from /usr/lib/libc.2
#2  0x7afdf49c in abort_C () from /usr/lib/libc.2
#3  0x7afdf4f4 in abort () from /usr/lib/libc.2
#4  0xf7ac0 in smb_panic2 (why=0x275380 "internal error",
    decrement_pid_count=1) at lib/util.c:1620
#5  0xf7738 in smb_panic (why=0x275380 "internal error") at 
lib/util.c:1506
#6  0xd0038 in fault_report (sig=10) at lib/fault.c:42
#7  0xd00ec in sig_fault (sig=10) at lib/fault.c:65
#8  <signal handler called>
#9  0x7af6474c in memset () from /usr/lib/libc.2 #10 0x12a980 in 
cli_tdis (cli=0x400894b8) at libsmb/cliconnect.c:1002
#11 0x125d0c in cli_close_connection (cli=0x400894b8) at 
libsmb/clientgen.c:424
#12 0x125e3c in cli_shutdown (cli=0x400894b8) at libsmb/clientgen.c:453
#13 0x5c054 in invalidate_cm_connection (conn=0x40084fe8)
    at nsswitch/winbindd_cm.c:823
#14 0x5c3c0 in init_dc_connection (domain=0x40084c68)
    at nsswitch/winbindd_cm.c:876
#15 0x5d4e4 in cm_connect_lsa (domain=0x40084c68, mem_ctx=0x40066118,
    cli=0x7f7f2220, lsa_policy=0x7f7f2224) at 
nsswitch/winbindd_cm.c:1189
#16 0x61c18 in trusted_domains (domain=0x40084c68, mem_ctx=0x40066118,
    num_domains=0x7f7f213c, names=0x7f7f2140, alt_names=0x7f7f2144,
    dom_sids=0x7f7f2148) at nsswitch/winbindd_rpc.c:844 ---Type 
<return> to continue, or q <return> to quit---

It seems cli_close_connection() trys to work on an non-initialized client. I feel that in invalidate_cm_connection() only check conn->cli condition might not be enough to shutdown a specific client, because cli_shuwdown() doesn't clean cli pointer. We probably need to add cli->initialised check in cli_close_connection. This works to me.

thanks.
Comment 1 Volker Lendecke 2006-10-01 01:48:12 UTC
Hi!

I *think* I fixed this with 3.0.23c. I know that you have your problems with that one, but the fix was solely in the routine cm_prepare_connection. It should be possible to use the 3.0.23c routine except the saf_store() call.

Marking this as fixed, please re-open if you can reproduce the bug with 3.0.23c cm_prepare_connection().

Volker