[Samba] Issue on DEBUG statement

Shivappa Sangapur Shivappa.Sangapur at TOSHIBA-TSIP.COM
Wed Mar 19 07:07:30 MDT 2014


I was running samba-4.1.4 successfully on my fedora till the below issue occurs.
I had put some simple DEBUG statements in "lib/util/debug.c" (reopen_logs_internal() and some other funcs) file to understand the logging mechanism.
And the same is compiled fine without any issues. And I started my samba service(both nmbd and smbd), I got "(core dumped) segmentation fault" error with PID of the daemons(both smbd and nmbd). The logged errors are below.
No issues with script(it starts, stop and restart service).
Shutting down SMB services: smbd: no process killed
Killed nmbd(20323) with signal 15
Killing samba force -9
smbd: no process killed
nmbd: no process killed

Strting samba......We are reopen_logs_internal fun()
[2014/03/19 06:27:59,  0] ../lib/util/debug.c:552(reopen_logs_internal)
  We are reopen_logs_internal fun()
./runsamba.sh: line 22: 20375 Segmentation fault      (core dumped) /sbin/smbd -s /etc/samba/smb.conf -D
We are reopen_logs_internal fun()
[2014/03/19 06:28:04,  0] ../lib/util/debug.c:552(reopen_logs_internal)
  We are reopen_logs_internal fun()
This is what I got on my console.
And why this DEBUG statement "We are reopen_logs_internal fun() " is printing on the console ?

If I replace the same "DEBUG" statements with "printf", there are no errors and it works fine.

Why these errors only on DEBUG case ?

And log.nmbd is growing like anything not rotating after the maxlog-size limit.

And one more question.
Does "log.%m" (log.smbd and log.nmbd) created in my logdirectory before the daemons parsed the conf file ?
How these files are creating.?

The same DEBUG issue I'm facing on samba-3.6.12 also.
Please suggest me on this issue.

Thanks & Regards,

The information contained in this e-mail message and in any
attachments/annexure/appendices is confidential to the 
recipient and may contain privileged information. 
If you are not the intended recipient, please notify the
sender and delete the message along with any 
attachments/annexure/appendices. You should not disclose,
copy or otherwise use the information contained in the
message or any annexure. Any views expressed in this e-mail 
are those of the individual sender except where the sender 
specifically states them to be the views of 
Toshiba Software India Pvt. Ltd. (TSIP),Bangalore.

Although this transmission and any attachments are believed to be
free of any virus or other defect that might affect any computer 
system into which it is received and opened, it is the responsibility
of the recipient to ensure that it is virus free and no responsibility 
is accepted by Toshiba Embedded Software India Pvt. Ltd, for any loss or
damage arising in any way from its use.

More information about the samba mailing list