Somemore information regarding the smbstatus error. The sigbus error is occuring where I noted below. I now have data values to go along with the location. The SIGBUS generating bit is "entry_scanner_p->e.pid" which looks to be in an unaccessable area of memory. Looking back through the code, I find a couple of bizarities. For example file_scanner_p->num_share_mode_entries comes back as 1651272501, which, if I understand the code, is a bit large. It looks as if the code is accessing memory it's not supposed to be accessing. Well, it looks like a memory error. I'd been meaning to try out the new version of Purify anyway, so I guess I'll go ahead and download it. Feel free to jump in with comments or questions Best regards Arnold Here's the offending routine: /******************************************************************* call the specified function on each entry under management by the share mode system ********************************************************************/ static int shm_share_forall(void (*fn)(share_mode_entry *, char *)) { int i, count=0; int *mode_array; share_mode_record *file_scanner_p; shm_share_mode_entry *entry_scanner_p; mode_array = (int *)shmops->offset2addr(shmops->get_userdef_off()); for( i = 0; i < shmops->hash_size(); i++) { shmops->lock_hash_entry(i); if(mode_array[i] == 0) { shmops->unlock_hash_entry(i); continue; } file_scanner_p = (share_mode_record *)shmops->offset2addr(mode_array[i]); while((file_scanner_p != 0) && (file_scanner_p->num_share_mode_entries != 0)) { shm_share_mode_entry *entry_scanner_p = (shm_share_mode_entry *) shmops->offset2addr(file_scanner_p->share_mode_entries); while(entry_scanner_p != 0) { if (process_exists(entry_scanner_p->e.pid)) { fn(&entry_scanner_p->e, file_scanner_p->file_name); count++; } entry_scanner_p = (shm_share_mode_entry *) shmops->offset2addr( entry_scanner_p->next_share_mode_entry); } /* end while entry_scanner_p */ file_scanner_p = (share_mode_record *) shmops->offset2addr(file_scanner_p->next_offset) ; } /* end while file_scanner_p */ shmops->unlock_hash_entry(i); } /* end for */ return count; } -------- Original Message -------- Subject: smbstatus getting a SIGBUS error Date: Thu, 08 Jun 2000 13:52:13 +0700 From: Arnold Troeger <stssart@bkk.unocal.com> To: samba-bugs@samba.org CC: arnold.troeger@bkk.unocal.com I'm running Samba 2.0.7 and have been having a few problems with it. Just to keep things focused, I'll stick with smbstatus as this one has been the longest lasting problem. The problem: smbstatus functions normally for some small bit of time after the samba daemons are started. At some point after a significant number of users have connected to the Samba server, smbstatus starts crashing with a bus error. In this state, it will report on the connections but fails when looking at the locks. I had a go at running gdb on the program and have located the point of failure in "locking_shm.c" in the "shm_share_forall" routine: line 636 (gdb) s shm_offset2addr (offset=1096040751) at ../locking/shmem_sysv.c:154 154 if (offset == 0 ) (gdb) s 157 if (!shm_header_p) (gdb) s 160 return (void *)((char *)shm_header_p + offset); (gdb) s 161 } (gdb) s shm_share_forall (fn=0x136b4 <print_share_mode>) at ../locking/locking_shm.c:634 634 while(entry_scanner_p != 0) { (gdb) s 636 if (process_exists(entry_scanner_p->e.pid)) { (gdb) s Program received signal SIGBUS, Bus error. 0x17b88 in shm_share_forall (fn=0x136b4 <print_share_mode>) at ../locking/locking_shm.c:636 636 if (process_exists(entry_scanner_p->e.pid)) { (gdb) My Samba server is an E4000 with 6 CPUs running Solaris 2.6 and set up with 1.3 TeraBytes of disk. Thanks in advance for your assistance. Best regards, Arnold