Re: [EXIM] Running Exim on Solaris 2.6 x86

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Mike Zanker
CC: exim-users
Tárgy: Re: [EXIM] Running Exim on Solaris 2.6 x86
On Wed, 17 Dec 1997, Mike Zanker wrote:

> I've compiled exim under Solaris 2.6 x86 without errors. However,
> when I try and deliver a message I get a segmentation fault and
> core dump when the retry database is accessed:
>
> I have confirmed this using the test_dbfn utility - a database can be opened
> and written to, but dumps core if I issue a "scan" command.
>
> Does anyone have any ideas? I've had no problems with Solaris 2.6
> Sparc edition.


There were some previous reports of database funnies with x86 Solaris.
Are you using ndbm? It might be worth installing Berkeley DB and trying
with that.

The following patch was sent to me as a "fix" for this problem. It is
for some earlier version of Exim than 1.81, but you might like to adapt
it and try it.

Unfortunately, it seems to be entirely specific to ndbm on Solaris x86.
I did experiments on SPARC Solaris, and the dbm_dirbno field mentioned
in the comment remains at -1 on that system, even after successful
reading/writing of entries in the file. Furthermore, dbm_dirbno is a
totally undocumented field, and testing with one process reading from a
new file that has been opened and not read does not give any problems on
SPARC Solaris. Consequently, I do not want to use this patch as it
stands in the source of Exim. I suspect this may be a bug in ndbm in
Solaris x86. Is there any way you can check on this? Is there a
Solaris-x86 bug list anywhere?


- --- dbfn.c.00 Thu Aug 21 07:48:59 1997                             
+++ dbfn.c      Wed Sep  3 15:47:20 1997                              
@@ -219,6 +219,19 @@                                                   
 EXIM_DATUM_SIZE(key_datum) = (int)strlen(key) + 1;                     


 if (!EXIM_DBGET(dbm, key_datum, result_datum)) return NULL;                  
+                                                                        
+/*                                                                     
+ * On Solaris, dbm_dirbno is set to -1 upon an open, and then to     
+ * the proper block when it gets used. If all we've done is an           
+ * open at this point, result_datum *may* be non-zero if it hasn't    
+ * been cleared properly (E.g. 0 length). So bounce back if we 
+ * don't have anything yet in the dbm.                                      
+ */                                          
+if (dbm->dbm_dirbno == -1) {                                
+       DEBUG(9) debug_printf("dbfn_read_with_length(): dbm not used yet\n");
+       return NULL;                                                     
+}               
+                                                                            
 yield = (void *)store_malloc(EXIM_DATUM_SIZE(result_datum));
 memcpy(yield, EXIM_DATUM_DATA(result_datum), EXIM_DATUM_SIZE(result_datum)
);     
 if (length != NULL) *length = EXIM_DATUM_SIZE(result_datum);      




-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***