Problems copying large file. RESOLVED (PR#14143)
Jeremy Allison
jallison at cthulhu.engr.sgi.com
Thu Feb 25 17:59:37 GMT 1999
kirk.patton at amd.com wrote:
>
> This is a note that may help someone else in the future. So I am posting my
> experience.
>
> CONFIGURATION>Auspex file server, Ultra2<Sol 2.5.1> Samba 2.0.2 server, Client Win NT 4.0 SP3
>
> PROBLEM>When copying a large file, the client machine gives the error "Permission
> Denied" and the copy fails after having already written part of the file.
>
> It turned out that the log level was set way to high and I guess it caused the
> smbd process to choke.
Thanks for your kindness Kirk, but it's actually a smbd
bug in 2.0.2 with log file rotation - it will be fixed
in 2.0.3 (due soon). You should be able to set the log
level to 10 and things should still complete without
problems (if a little slowly).
Here's the patch that went into the 2.0 tree that will
be in 2.0.3.
Sorry for the problem you had,
Regards,
Jeremy Allison,
Samba Team.
--------------------cut here----------------------------
Index: debug.c
===================================================================
RCS file: /data/cvs/samba/source/lib/debug.c,v
retrieving revision 1.15.2.3
retrieving revision 1.15.2.5
diff -u -r1.15.2.3 -r1.15.2.5
--- debug.c 1999/01/06 02:18:57 1.15.2.3
+++ debug.c 1999/02/16 19:20:55 1.15.2.5
@@ -126,16 +126,15 @@
*/
void sig_usr2( int sig )
{
- BlockSignals( True, SIGUSR2 );
-
DEBUGLEVEL--;
if( DEBUGLEVEL < 0 )
DEBUGLEVEL = 0;
DEBUG( 0, ( "Got SIGUSR2; set debug level to %d.\n", DEBUGLEVEL ) );
- BlockSignals( False, SIGUSR2 );
+#if !defined(HAVE_SIGACTION)
CatchSignal( SIGUSR2, SIGNAL_CAST sig_usr2 );
+#endif
} /* sig_usr2 */
#endif /* SIGUSR2 */
@@ -147,7 +146,6 @@
*/
void sig_usr1( int sig )
{
- BlockSignals( True, SIGUSR1 );
DEBUGLEVEL++;
@@ -156,8 +154,9 @@
DEBUG( 0, ( "Got SIGUSR1; set debug level to %d.\n", DEBUGLEVEL ) );
- BlockSignals( False, SIGUSR1 );
+#if !defined(HAVE_SIGACTION)
CatchSignal( SIGUSR1, SIGNAL_CAST sig_usr1 );
+#endif
} /* sig_usr1 */
#endif /* SIGUSR1 */
@@ -249,11 +248,11 @@
* **************************************************************************
**
*/
static void check_log_size( void )
- {
+{
int maxlog;
SMB_STRUCT_STAT st;
- if( debug_count++ < 100 || getuid() != 0 )
+ if( debug_count++ < 100 || geteuid() != 0 )
return;
maxlog = lp_max_log_size() * 1024;
@@ -276,8 +275,23 @@
reopen_logs();
}
}
+ /*
+ * Here's where we need to panic if dbf == NULL..
+ */
+ if(dbf == NULL) {
+ dbf = sys_fopen( "/dev/console", "w" );
+ if(dbf) {
+ DEBUG(0,("check_log_size: open of debug file %s failed - using
console.\n",
+ debugf ));
+ } else {
+ /*
+ * We cannot continue without a debug file handle.
+ */
+ abort();
+ }
+ }
debug_count = 0;
- } /* check_log_size */
+} /* check_log_size */
/* **************************************************************************
**
* Write an debug message on the debugfile.
--------------------end patch---------------------------
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
More information about the samba
mailing list