[Dovecot] Fwd: dovecot bug report (64 bit file offsets)
I have found similar problem: http://www.dovecot.org/list/dovecot/2007-January/018623.html "After configure remove HAVE_PREAD from config.h, recompile and see if it works."
I think I figured out where might be the problem. If the binary is compiled in the 64bit environment and you want to use 64 bit file offset you must use 64 bit equivalents of the function. Of course if you are using open/pread (which are 32 bit compatible only) the whole program functionality will be broken. You must use open64/pread64 etc. Else macros _LARGE_FILE_API should be defined in order to use large files in other case nothing will work (random parsing errors and dead indexes will appear ). As I can see there is a big issue in the dovecot.
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/pread6...
Regards, Andris ---------- Forwarded message ---------- No: markevich@inbox.lv Kam: tss@iki.fi Reply-To: markevich@inbox.lv Date: Tue, 27 Nov 2007 10:45:23 +0200 Temats: dovecot bug report (64 bit file offsets) Hello. I found 2 issues while using dovecot in the 64-bit system. Before that I was using it on the Solaris 10 32bit and everything worked fine.
First issue is that it's impossible to specify Openssl library directory, there is only possiblity to specify type gnutls/openssl. But if there are 2 versions of openssl installed it's hard to specify which one we want to use, we need to play with AUXLIBS and LD flags to prevent looking in un-needed locations. I'm suggesting to add new ./configure key like --with-ssl-dir like all other programs do (why dovecot hasn't it?). For example in FC8 openssl 0.9.8b is available in the packages but latest is 0.9.8.g, and it's impossible to compile dovecot with 0.9.8b because of the missing function in it which present in 0.9.8.g.
Second and most serious bug is that it seems that dovecot is unable to use 64 file offsets correctly. First problem was that I as unable to launch dovecot at all - it gave a lot of configuration file (dovecot.conf) parsing errors (which is working perfectly on the 32 bit Solaris). It was very strange because he complained that he is expecting to see '=' in the line where only comments are located. Deleting some lines at the start of the configuration file produced the error on random lines (I can't describe it in other way) but with the comments too. For example, first error complained that line 42 is incorrect (only comments are there), after deletion of 2 empty lines at the beginning dovecot complained that line 172 has errors but any way there are only comments there too. I've deleted all of the comments from the configuration file but still dovecot randomly is giving such errors. Any way dovecot is UNABLE to parse all my file, I can see it from dovecot -n. He is starting normally (time to time) but only half of the configuration file is read. Similar problems goes with the indexes dovecot.index.log - dovecot is able to create the files but is unable to read them after any access to it dovecot generates errors like unexpected eof found and file is corrupted. From all this I can assume that 64bit file offsets on a 64 bit system aren't working at all.
Latest dovecot 1.0.7 (also tried 1.0.5) Fedora core 8 64bit (with latest patches and updates) Intel core duo 6300 (x86_64) XFS (only local filesystem)
Regards, Andris
On 2007-11-27 11:21:16 +0200, markevich@inbox.lv wrote:
I have found similar problem: http://www.dovecot.org/list/dovecot/2007-January/018623.html "After configure remove HAVE_PREAD from config.h, recompile and see if it works."
I think I figured out where might be the problem. If the binary is compiled in the 64bit environment and you want to use 64 bit file offset you must use 64 bit equivalents of the function. Of course if you are using open/pread (which are 32 bit compatible only) the whole program functionality will be broken. You must use open64/pread64 etc. Else macros _LARGE_FILE_API should be defined in order to use large files in other case nothing will work (random parsing errors and dead indexes will appear ). As I can see there is a big issue in the dovecot.
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/pread6...
Regards, Andris ---------- Forwarded message ---------- No: markevich@inbox.lv Kam: tss@iki.fi Reply-To: markevich@inbox.lv Date: Tue, 27 Nov 2007 10:45:23 +0200 Temats: dovecot bug report (64 bit file offsets) Hello. I found 2 issues while using dovecot in the 64-bit system. Before that I was using it on the Solaris 10 32bit and everything worked fine.
First issue is that it's impossible to specify Openssl library directory, there is only possiblity to specify type gnutls/openssl. But if there are 2 versions of openssl installed it's hard to specify which one we want to use, we need to play with AUXLIBS and LD flags to prevent looking in un-needed locations. I'm suggesting to add new ./configure key like --with-ssl-dir like all other programs do (why dovecot hasn't it?). For example in FC8 openssl 0.9.8b is available in the packages but latest is 0.9.8.g, and it's impossible to compile dovecot with 0.9.8b because of the missing function in it which present in 0.9.8.g.
Second and most serious bug is that it seems that dovecot is unable to use 64 file offsets correctly. First problem was that I as unable to launch dovecot at all - it gave a lot of configuration file (dovecot.conf) parsing errors (which is working perfectly on the 32 bit Solaris). It was very strange because he complained that he is expecting to see '=' in the line where only comments are located. Deleting some lines at the start of the configuration file produced the error on random lines (I can't describe it in other way) but with the comments too. For example, first error complained that line 42 is incorrect (only comments are there), after deletion of 2 empty lines at the beginning dovecot complained that line 172 has errors but any way there are only comments there too. I've deleted all of the comments from the configuration file but still dovecot randomly is giving such errors. Any way dovecot is UNABLE to parse all my file, I can see it from dovecot -n. He is starting normally (time to time) but only half of the configuration file is read. Similar problems goes with the indexes dovecot.index.log - dovecot is able to create the files but is unable to read them after any access to it dovecot generates errors like unexpected eof found and file is corrupted. From all this I can assume that 64bit file offsets on a 64 bit system aren't working at all.
Latest dovecot 1.0.7 (also tried 1.0.5) Fedora core 8 64bit (with latest patches and updates) Intel core duo 6300 (x86_64) XFS (only local filesystem)
which is funny actually as on opensuse (10.1 -> 10.3 -> factory) has no problem with dovecot running on x86_64.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
I agree that it’s kind strange behavior.
Also I’ve googled that exactly the same errors (unexpected eof found … on file ‘UNOPENED’) were related to mysql. But how mysql compile options might affect configuration file parsing and read/write operations? (indexes for example) Does any one have any idea why this might happen?
“any slight change to the main dovecot.conf file can prevent dovecot from starting (segfault with "Unexpected eof found when reading file 'UNOPENED' (Errcode: 0)" message), whereas i386 packages work somewhat better.”
http://dovecot.org/list/dovecot/2006-April/012340.html
Regards, Andris Quoting Marcus Rueckert : which is funny actually as on opensuse (10.1 -> 10.3 -> factory) has no problem with dovecot running on x86_64.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- Tavs bezmaksas pasts Inbox.lv
Links:
[1] mailto:darix@opensu.se
On 2007-11-27 14:15:29 +0200, markevich@inbox.lv wrote:
I agree that it’s kind strange behavior.
Also I’ve googled that exactly the same errors (unexpected eof found … on file ‘UNOPENED’) were related to mysql. But how mysql compile options might affect configuration file parsing and read/write operations? (indexes for example) Does any one have any idea why this might happen?
“any slight change to the main dovecot.conf file can prevent dovecot from starting (segfault with "Unexpected eof found when reading file 'UNOPENED' (Errcode: 0)" message), whereas i386 packages work somewhat better.”
maybe some overlapping function names? i am not sure how fedora builds mysql and dovecot. maybe give opensuse a try and see if it fails in your setup.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
participants (2)
-
Marcus Rueckert
-
markevich@inbox.lv