[Dovecot] Compilation of 1.1.6 fails on HP-UX 11.31
Hi,
$ uname -srv HP-UX B.11.31 U $ cc --version cc: HP C/aC++ B3910B A.06.20 [May 13 2008]
Compilation fails, output of configure and make are given below. The cause of this is almost certainly that this version of HP-UX does define the QCMD macro in sys/quota.h (checked in the ifdef line 26 dovecot-1.1.6/src/plugins/quota/quota-fs.h) as well as the dqblk struct, but the latter with different fields than the Linux version. Older versions of HP-UX seem not to have contained this macro(? can't check this at the moment), which is probably why it was used to distinguish between HP-UX and Linux in quota-fs.h.
Deleting lines 26-28 and 30 from dovecot-1.1.6/src/plugins/quota/quota-fs.h fixes the problem for HP-UX, but of course a real fix would need to add a more current method of distinguishing between Linux and HP-UX.
If there's any more helfpul information you'd like let me know,
cheers,
Marc
configure: ... Install prefix ...................... : /opt/dovecot-1.1.16 File offsets ........................ : 64bit I/O loop method ..................... : poll File change notification method ..... : none Building with SSL support ........... : yes (OpenSSL) Building with IPv6 support .......... : yes Building with pop3 server ........... : yes Building with mail delivery agent .. : yes Building with GSSAPI support ........ : no Building with user database modules . : static prefetch passwd passwd-file Building with password lookup modules : passwd passwd-file pam checkpassword Building with SQL drivers ............:
make:
...
source='quota-fs.c' object='quota-fs.lo' libtool=yes
DEPDIR=.deps depmode=hp2 /bin/sh ../../../depcomp
/bin/sh ../../../libtool --tag=CC --mode=compile cc
-DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib
-I../../../src/lib-dict -I../../../src/lib-index
-I../../../src/lib-mail -I../../../src/lib-storage
-I../../../src/lib-storage/index
-I../../../src/lib-storage/index/maildir -I/opt/openssl/include -g
-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -c -o quota-fs.lo quota-fs.c
cc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib
-I../../../src/lib-dict -I../../../src/lib-index -I../../../src/lib-mail
-I../../../src/lib-storage -I../../../src/lib-storage/index
-I../../../src/lib-storage/index/maildir -I/opt/openssl/include -g
-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -c +Maked quota-fs.c -DPIC -o
.libs/quota-fs.o
"quota-fs.c", line 469: error #2136: struct "dqblk" has no field
"dqb_curinodes"
*value_r = dqblk.dqb_curinodes;
^
"quota-fs.c", line 470: error #2136: struct "dqblk" has no field "dqb_isoftlimit" *limit_r = dqblk.dqb_isoftlimit; ^
2 errors detected in the compilation of "quota-fs.c". *** Error exit code 1
On Thu, 2008-11-06 at 16:32 +0100, Marc Beyer wrote:
Compilation fails, output of configure and make are given below. The cause of this is almost certainly that this version of HP-UX does define the QCMD macro in sys/quota.h (checked in the ifdef line 26 dovecot-1.1.6/src/plugins/quota/quota-fs.h) as well as the dqblk struct, but the latter with different fields than the Linux version. Older versions of HP-UX seem not to have contained this macro(? can't check this at the moment), which is probably why it was used to distinguish between HP-UX and Linux in quota-fs.h.
Does the new HP-UX version happen to support also group quotas? If so, I could make it use the Linux code by just disabling the inode quotas. But I'd guess the QCMD macro was added just for making it easier to compile Linux code and trying to use group quotas would fail. So perhaps the HP-UX vs. Linux check could just be changed. Does the patch below help? diff -r ed4d6f6e4da7 src/plugins/quota/quota-fs.h --- a/src/plugins/quota/quota-fs.h Fri Nov 21 14:35:46 2008 +0200 +++ b/src/plugins/quota/quota-fs.h Fri Nov 21 14:58:03 2008 +0200 @@ -23,7 +23,7 @@ #ifdef HAVE_QUOTACTL # ifdef HAVE_SYS_QUOTA_H -# ifdef QCMD +# ifndef _HPUX_SOURCE # define FS_QUOTA_LINUX # else # define FS_QUOTA_HPUX
Hi,
dovecot 1.1.7 reliably crashes every time I try to open a mailbox using IMAP. Error in the logs:
dovecot: Dec 02 23:14:15 Error: setmntent(/etc/mtab) failed: No such file or directory dovecot: Dec 02 23:14:16 Panic: IMAP(arandomuser@example.com): my_vsnprintf(): Output string too big dovecot: Dec 02 23:14:16 Error: child 4815 (imap) killed with signal 6 dovecot: Dec 02 23:14:19 Panic: IMAP(arandomuser@example.com): my_vsnprintf(): Output string too big dovecot: Dec 02 23:14:19 Error: child 4816 (imap) killed with signal 6 ... (it goes on until the daemon is killed)
# dovecot -n # 1.1.7: /opt/dovecot-1.1.7/etc/dovecot.conf Error: setmntent(/etc/mtab) failed: No such file or directory # OS: HP-UX B.11.31 ia64 base_dir: /var/run/dovecot log_path: /var/adm/syslog/dovecot/err.log info_log_path: /var/adm/syslog/dovecot/info.log protocols: imap imaps pop pops ssl_cert_file: /opt/dovecot/etc/dovecot.crt ssl_key_file: /opt/dovecot/etc/dovecot.key login_dir: /var/run/dovecot/login login_executable: /opt/dovecot/libexec/dovecot/imap-login verbose_proctitle: yes first_valid_uid: 113 last_valid_uid: 113 first_valid_gid: 109 last_valid_gid: 109 mail_uid: exim mail_gid: exim mail_location: maildir:/maildir/%d/%n mail_debug: yes mail_drop_priv_before_exec: yes mail_executable: /opt/dovecot/libexec/dovecot/imap mail_plugin_dir: /opt/dovecot/lib/dovecot/imap/ namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: mechanisms: plain login cram-md5 executable: /opt/dovecot/libexec/dovecot/dovecot-auth user: exim verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /opt/dovecot/etc/dovecot-mysql.conf userdb: driver: static args: uid=113 gid=109 home=/maildir/%d/%n
gdb backtrace (this is the HP-UX gdb, not the GNU debugger, dovecot was compiled with the HP-UX cc):
(gdb) bt #0 0x60000000c03ef990:0 in kill+0x30 () from /usr/lib/hpux32/libc.so.1 #1 0x60000000c02a0e60:0 in raise+0x120 () from /usr/lib/hpux32/libc.so.1 #2 0x60000000c03b0f70:0 in abort+0x170 () from /usr/lib/hpux32/libc.so.1 #3 0x42ab6a0:0 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:150 #4 0x42acd40:0 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0x409f750 "my_vsnprintf(): Output string too big", args=0x7ffff418) at failures.c:430 #5 0x42abb50:0 in i_panic ( format=0x409f750 "my_vsnprintf(): Output string too big") at failures.c:197 #6 0x4306fb0:0 in my_vsnprintf (str=0x7ffff4a0 "4935b742", size=9, format=0x4094998 "%08x", ap=0x7ffff478) at compat.c:276 #7 0x42f9a20:0 in i_snprintf (dest=0x7ffff4a0 "4935b742", max_chars=9, format=0x4094998 "%08x") at strfuncs.c:23 #8 0x41e6cd0:0 in mailbox_uidvalidity_write ( path=0x4001d400 "/maildir/example.com/arandomuser/dovecot-uidvalidity", uid_validity=1228257090) at mailbox-uidvalidity.c:42 #9 0x41e7ac0:0 in mailbox_uidvalidity_next_rescan ( path=0x4001d400 "/maildir/example.com/arandomuser/dovecot-uidvalidity") at mailbox-uidvalidity.c:154 #10 0x41e7de0:0 in mailbox_uidvalidity_next ( path=0x4001d400 "/maildir/example.com/arandomuser/dovecot-uidvalidity") at mailbox-uidvalidity.c:181 ---Type <return> to continue, or q <return> to quit--- #11 0x4110540:0 in maildir_get_uidvalidity_next (storage=0x40046698) at maildir-storage.c:1054 #12 0x4121c60:0 in maildir_uidlist_sync_update (ctx=0x40044e60) at maildir-uidlist.c:1219 #13 0x4124a70:0 in maildir_uidlist_sync_finish (ctx=0x40044e60) at maildir-uidlist.c:1609 #14 0x4114120:0 in maildir_sync_context (ctx=0x4001c220, forced=false, find_uid=0x0, lost_files_r=0x7ffff590) at maildir-sync.c:781 #15 0x41147b0:0 in maildir_storage_sync_init (box=0x4005ca28, flags=MAILBOX_SYNC_FLAG_FIX_INCONSISTENT|MAILBOX_SYNC_FLAG_FULL_READ) at maildir-sync.c:859 #16 0x41de2e0:0 in mailbox_sync_init (box=0x4005ca28, flags=MAILBOX_SYNC_FLAG_FIX_INCONSISTENT|MAILBOX_SYNC_FLAG_FULL_READ) at mail-storage.c:516 #17 0x41de4a0:0 in mailbox_sync (box=0x4005ca28, flags=MAILBOX_SYNC_FLAG_FIX_INCONSISTENT|MAILBOX_SYNC_FLAG_FULL_READ,
status_items=STATUS_KEYWORDS|STATUS_FIRST_UNSEEN_SEQ|STATUS_UIDVALIDITY|STATUS_UIDNEXT|STATUS_RECENT|STATUS_MESSAGES, status_r=0x7ffff5c0) at mail-storage.c:545 #18 0x40bc200:0 in cmd_select_full (cmd=0x40054298, readonly=false) at cmd-select.c:39 #19 0x40bc640:0 in cmd_select (cmd=0x40054298) at cmd-select.c:88 #20 0x40c9c00:0 in client_command_input (cmd=0x40054298) at client.c:580 ---Type <return> to continue, or q <return> to quit--- #21 0x40ca340:0 in client_command_input (cmd=0x40054298) at client.c:629 #22 0x40ca6a0:0 in client_handle_next_command (client=0x40046da0, remove_io_r=0x7ffff610) at client.c:670 #23 0x40c9470:0 in client_handle_input (client=0x40046da0) at client.c:680 #24 0x40c6ec0:0 in client_input (client=0x40046da0) at client.c:725 #25 0x42cdb60:0 in io_loop_handler_run (ioloop=0x4002e9f0) at ioloop-poll.c:204 #26 0x42cb780:0 in io_loop_run (ioloop=0x4002e9f0) at ioloop.c:320 #27 0x40efa90:0 in main (argc=3, argv=0x7ffffa44, envp=0x7ffffa54) at main.c:293 (gdb)
Doing a system call trace via tusc -p -v -o dovetrace -k -f dovecot I get the following for a crashed process (different pid since I didn't want to do the tusc on the same run). Lines start with the [5301]:
[5301] open("/maildir/example.com/arandomuser", O_RDONLY|0x200000, 0152000) ................................................................................ = 8 [5301] fstat(8, 0x7ffff440) ................................................................................................................................ = 0 [5301] fcntl(8, F_SETFD, 0) ................................................................................................................................ = 0 [5301] getdents(8, 0x4007b3d0, 8192) ....................................................................................................................... = 312 [5301] getdents(8, 0x4007b3d0, 8192) ....................................................................................................................... = 0 [5301] close(8) ............................................................................................................................................ = 0 [5301] rename("/maildir/example.com/arandomuser/dovecot-uidvalidity.4935b740", "/maildir/example.com/arandomuser/dovecot-uidvalidity.4935b741") ............ = 0 [5301] open("/maildir/example.com/arandomuser/dovecot-uidvalidity", O_RDWR|O_CREAT|0x800, 0666) ............................................................ = 8 [5301] brk(0x400b1000) ..................................................................................................................................... = 0 [5301] brk(0x400c1000) ..................................................................................................................................... = 0 [5301] brk(0x400e1000) ..................................................................................................................................... = 0 [5301] brk(0x40121000) ..................................................................................................................................... = 0 [5301] brk(0x401a1000) ..................................................................................................................................... = 0 [5301] write(2, "01P m y _ v s n p r i n t f ( ) ".., 40) .................................................................................................. = 40 [5301] sigprocmask(SIG_UNBLOCK, NULL, 0x7ffff3a0) .......................................................................................................... = 0 [5301] sigaction(SIGABRT, NULL, 0x7ffff3c0) ................................................................................................................ = 0 [5301] close(1) ............................................................................................................................................ = 0 [5301] sigprocmask(SIG_BLOCK, 0x7ffff3a0, NULL) ............................................................................................................ = 0 [5301] sigaction(SIGABRT, 0x7ffff3c0, NULL) ................................................................................................................ = 0 [5301] sigprocmask(SIG_UNBLOCK, 0x7ffff3a0, NULL) .......................................................................................................... = 0 [5301] getpid() ............................................................................................................................................ = 5301 (5295) [5301] Received signal 6, SIGABRT, in kill(), [SIG_DFL], no siginfo [5301] kill(6, SIGABRT) .................................................................................................................................... [entry] [5301] exit(6) [implicit (kill failure)] ................................................................................................................... WIFSIGNALED(SIGABRT)|WCOREDUMP [5295] waitpid(-1, WIFSIGNALED(SIGABRT)|WCOREDUMP, WNOHANG) ................................................................................................ = 5301 [5302] kill(5301, SIG#0) ................................................................................................................................... ERR#3 ESRCH
Anything you can think of that would help?
Cheers,
Marc
participants (2)
-
Marc Beyer
-
Timo Sirainen