- when you open mailbox specify /debug option, it will output all client
IMAP
communication into log file, so we can spot the place in c-client it
dies.
Example ns_imap open -mailbox {{localhost/debug}INBOX}- run aolserver under debugger, to do so you can do:
bash-2.05b# gdb GNU gdb Red Hat Linux (5.2.1-4) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux". (gdb) cd /usr/local/aolserver Working directory /usr/local/aolserver (canonically /opt/local/aolserver). (gdb) file bin/nsd Reading symbols from bin/nsd...done. (gdb) run -t oss2/etc/nsd.tcl -u vlad -d -f >> oss2/logs/nsd.log 2>&1 Starting program: /opt/local/aolserver/bin/nsd -t oss2/etc/nsd.tcl -u vlad -d -f >> oss2/logs/nsd.log 2>&1 [New Thread 8192 (LWP 20584)]
Replace path oss2/etc and oss2/logs to log file and config file according to your installed system and instead of vlad use your user for aolserver. Once it started run your script, after crash in gdb run bt command, it should show the place it crashed.
BTW: try the latest ns_imap from my site, recently i fixed one possible crash error.
Matthew Walker wrote:
I am having trouble with nsimap on a redhat 7.2 box. The nsimap.so loads at startup OK and installs its garbage collector but when I try to open a session from a tcl page using ns_imap open I get (with debug logging turned on):
[18/Mar/2003:17:34:34][15182.5126][-conn2-] Debug: ns_imap: open: 0x8ca8f50: 1: {127.0.0.1}: [EMAIL PROTECTED] Killed
By adding some more Ns_Log's I've isolated it down to this line (447 of nsimap.c):
if(!session->mailbox || !(session->stream = mail_open(session->stream,session->mailbox,flags))) {
Which looks to me where nsimap calls the c-client code to open the connection. The mail server logs show:
01:48:25.58 5 IMAP connection request from [127.0.0.1:41527], socket=27 01:48:25.58 4 IMAP-02446([127.0.0.1]) got connection on [127.0.0.1:143] 01:48:25.58 5 IMAP-02446([127.0.0.1]) out: * OK CommuniGate Pro IMAP Server 4.0.6 at aliencamel.com ready\r\n 01:48:25.58 5 IMAP-02446([127.0.0.1]) inp: 00000000 CAPABILITY 01:48:25.58 5 IMAP-02446([127.0.0.1]) out: * CAPABILITY IMAP4 IMAP4REV1 ACL NAMESPACE UIDPLUS IDLE LITERAL+ QUOTA ID MULTIAPPEND LISTEXT CHILDREN AUTH=LOGIN AUTH=PLAIN AUTH=CRAM-MD5 AUTH=DIGEST-MD5\r\ 01:48:25.58 5 IMAP-02446([127.0.0.1]) inp: 00000001 AUTHENTICATE CRAM-MD5 01:48:25.58 5 IMAP-02446([127.0.0.1]) AUTH challenge: <[EMAIL PROTECTED]> 01:48:25.58 5 IMAP-02446([127.0.0.1]) out: + PDI0NDYuMTA0ODAzODUwNUBhbGllbmNhbWVsLmNvbT4=\r\n 01:48:25.60 3 IMAP-02446([127.0.0.1]) read failed. Error Code=connection closed by peer
So it seems to be at the point of processing the AUTH challenge or formulating the response. The mtest program provided with uw imap sources works OK when they are used. I've used both a redhat rpm of imap-devel and compiled up the uw imap sources and I get the same problem in either instance.
It runs great on my Mac OS X development box. If anyone has any suggestions on what could be happening or what I could do it would be much appreciated.
Thanks
Matthew Walker
PS. If I run strace I get:
15911 getppid() = 15908 15911 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 2000) = 1 15911 getppid() = 15908 15911 read(3, "\0\374\337\276\0\0\0\0\274\320\337\276\20\237\21\10 \310"..., 148) = 148 15911 old_mmap(0xbe5c2000, 253952, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xbe5c2000 15911 mprotect(0xbe5c2000, 4096, PROT_NONE) = 0 15911 clone(child_stack=0xbe5ffbf8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|0x21) = 16036 16036 getpid() = 16036 16036 rt_sigprocmask(SIG_SETMASK, [HUP INT PIPE TERM 32], NULL, 8) = 0 16036 sched_setscheduler(0x3ea4, 0, 0xbe5ffd28) = 0 16036 rt_sigprocmask(SIG_SETMASK, NULL, [HUP INT PIPE TERM 32], 8) = 0 16036 rt_sigsuspend([HUP INT PIPE TERM] <unfinished ...> 15911 kill(16018, SIGRT_0) = 0 15911 poll( <unfinished ...> 16036 --- SIGRT_0 (Real-time signal 0) --- 15911 <... poll resumed> [{fd=3, events=POLLIN}], 1, 2000) = -1 EINTR (Interrupted system call) 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 getppid() = 15908 15911 wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG|__WCLONE, NULL) = 16036 15911 munmap(0xbe5c2000, 253952) = 0 15911 wait4(-1, 0x8149758, WNOHANG|__WCLONE, NULL) = 0 15911 poll([{fd=3, events=POLLIN}], 1, 2000) = -1 EINTR (Interrupted system call) 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 getppid() = 15908 15911 wait4(-1, [WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL], WNOHANG|__WCLONE, NULL) = 16018 15911 munmap(0xbedc2000, 253952) = 0 15911 kill(16022, SIGKILL) = 0 16022 <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) 15911 kill(16021, SIGKILL) = 0 15911 kill(16019, SIGKILL) = 0 15911 kill(16017, SIGKILL <unfinished ...> 16022 +++ killed by SIGKILL +++ 15911 <... kill resumed> ) = 0 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 kill(16016, SIGKILL) = 0 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 kill(16015, SIGKILL) = 0 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 kill(15913, SIGKILL) = 0 15911 kill(15912, SIGKILL <unfinished ...> 15912 <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) 15911 <... kill resumed> ) = 0 15912 +++ killed by SIGKILL +++ 15911 kill(15908, SIGKILL) = 0 15911 --- SIGRT_1 (Real-time signal 1) --- 15911 sigreturn() = ? (mask now ~[TRAP KILL STOP]) 15911 _exit(0) = ? 15908 <... read resumed> 0xbfffe76b, 1) = ? ERESTARTSYS (To be restarted) 15908 +++ killed by SIGKILL +++
-- AOLserver - http://www.aolserver.com/ To Remove yourself from this list: http://www.aolserver.com/listserv.html List information and options: http://listserv.aol.com/
-- Vlad Seryakov 703 961-5433 office [EMAIL PROTECTED] http://www.crystalballinc.com/vlad/
-- AOLserver - http://www.aolserver.com/ To Remove yourself from this list: http://www.aolserver.com/listserv.html List information and options: http://listserv.aol.com/
