davew: there's a problem with the new code that purges users during shutdown.  
I 
think it has something to do with the fact that the thread doing the shutdown 
is 
missing some thread-specific variables, and therefore the MYTID macro segfaults:

2008/01/23 23:28:21.003339 Closing listener on 
'/usr/local/citadel/citadel.socket'
2008/01/23 23:28:21.003434 Purging session 1
2008/01/23 23:28:21.003472 RemoveContext() session 1
2008/01/23 23:28:21.003534 Calling logout(1)
2008/01/23 23:28:21.003575 xmpp_queue_event(1, )

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208445248 (LWP 17128)]
0x08057b51 in cdb_fetch (cdb=1, key=0x0, keylen=0) at database_sleepycat.c:698
698             if (MYTID != NULL) {
(gdb) bt
#0  0x08057b51 in cdb_fetch (cdb=1, key=0x0, keylen=0) at 
database_sleepycat.c:698
#1  0x0804ef23 in getuser (usbuf=0xbfe75a90, name=0x9816e40 "") at user_ops.c:94
#2
 0x0804fb21 in purge_user (pname=0x9816e40 "") at user_ops.c:813
#3  0x0804fd37 in logout (who=0x9814508) at user_ops.c:612
#4  0x08051c1e in RemoveContext (con=0x9814508) at citserver.c:255
#5  0x08054f19 in context_cleanup () at sysdep.c:760
#6  0x08054fc8 in sysdep_master_cleanup () at sysdep.c:806
#7  0x08051b06 in master_cleanup (exitcode=0) at citserver.c:201
#8  0x0804ed1a in main (argc=2, argv=0xbfe78d34) at server_main.c:345
(gdb) The program is running.  Exit anyway? (y or n) y


As a result, the command "/etc/init.d/citadel stop" doesn't work, because 
citserver crashes and therefore exits non-zero, so the watcher process assumes 
it wasn't supposed to exit and starts it up again.

Could you have a look at the above and adjust the code accordingly please?

Thanks...

By the way folks, I think we're *very* close to being able to release our new 
code.  libcitadel is definitely
stable, and libical is starting to look good 
too.  So let's start figuring out the "show stopper" bugs (the above is one of 
them) so we can squash them and get this puppy out the door.

Reply via email to