Ticket #203 (new defect)

Opened 8 months ago

Last modified 4 months ago

session manager don't reopen log at kill -HUP

Reported by: jens Owned by: smoku
Priority: minor Component: sm
Version: 2.2 Keywords:
Cc: Tracforge_linkmap:
Blocking: Blocked By:

Description

I using file logging and rotate the logfiles with logrotate. On the end of the logrotate script I will reopen log with kill -HUP cat /var/run/jabber/sm.pid Several times work that, but than the session manager don't reopen the log files. The other components, don't have this problem.

And: From the first kill -HUP, jabber:iq:last don't work.

Change History

Changed 7 months ago by jens

  • priority changed from minor to major

Why nobody reads my task?

Changed 7 months ago by smoku

  • priority changed from major to minor

We do read your ticket. It's just that nobody took up the problem yet.

Changed 6 months ago by shax

I have same issue. OS type: OpenBSD 4.2 amd64 log type = 'file' When i send HUP signal to sm:

SM  : Mon Jun  2 21:39:00 2008 [notice] HUP handled. reloading modules...
ROUT: sx (chain.c:106) calling nad write chain
SM  : sx (io.c:196) tag 5 event 2 data 0x4fa2de00
S2S : sx (io.c:196) tag 5 event 2 data 0x4e5bc240
C2S : sx (io.c:196) tag 5 event 2 data 0x49db1740
ROUT: Mon Jun  2 21:39:00 2008 [notice] [127.0.0.1, port=48759] disconnect
SM  : Mon Jun  2 21:39:00 2008 [notice] modules search path: /usr/local/lib/jabberd
ROUT: sx (io.c:402) queueing for write: <presence xmlns='http://jabberd.jabberstudio.org/ns/component/1.0' from='s2s'/>
SM  : Mon Jun  2 21:38:37 2008 sm.c:53 reading from 5
S2S : Mon Jun  2 21:38:37 2008 router.c:44 reading from 5
C2S : Mon Jun  2 21:38:37 2008 c2s.c:669 reading from 5
SM  : Mon Jun  2 21:39:00 2008 [notice] module 'status' added to chain 'sess-start' (order 0 index 0 seq 0)
ROUT: sx (io.c:425) tag 7 event 1 data 0x0
SM  : Mon Jun  2 21:38:37 2008 sm.c:78 read 154 bytes
S2S : Mon Jun  2 21:38:37 2008 router.c:69 read 154 bytes
C2S : Mon Jun  2 21:38:37 2008 c2s.c:694 read 154 bytes
SM  : Mon Jun  2 21:39:00 2008 [notice] module 'status' added to chain 'sess-end' (order 0 index 0 seq 1)
ROUT: Mon Jun  2 21:38:37 2008 router.c:521 want write
SM  : sx (io.c:212) passed 154 read bytes
S2S : sx (io.c:212) passed 154 read bytes
C2S : sx (io.c:212) passed 154 read bytes
SM  : Mon Jun  2 21:39:00 2008 [notice] module 'iq-last' added to chain 'sess-end' (order 1 index 1 seq 0)
ROUT: Mon Jun  2 21:38:37 2008 router.c:872 write action on fd 7
SM  : sx (chain.c:93) calling io read chain
S2S : sx (chain.c:93) calling io read chain
C2S : sx (chain.c:93) calling io read chain
SM  : Mon Jun  2 21:39:00 2008 [notice] module 'validate' added to chain 'in-sess' (order 0 index 2 seq 0)
ROUT: sx (io.c:324) 7 ready for writing
SM  : sx (ssl.c:380) in _sx_ssl_rio
S2S : sx (ssl.c:380) in _sx_ssl_rio
C2S : sx (ssl.c:380) in _sx_ssl_rio
SM  : Mon Jun  2 21:39:00 2008 [notice] module 'status' added to chain 'in-sess' (order 1 index 0 seq 2)
ROUT: sx (io.c:282) encoding 79 bytes for writing: <presence xmlns='http://jabberd.jabberstudio.org/ns/component/1.0' from='s2s'/>
SM  : sx (ssl.c:384) loading 154 bytes into ssl read buffer
S2S : sx (ssl.c:384) loading 154 bytes into ssl read buffer
C2S : sx (ssl.c:384) loading 154 bytes into ssl read buffer
ERROR: sm died.  Shutting down server.
JBRD: Got a signal... pass it on.
JBRD: It was a TERM.  Shut it all down!


Changed 6 months ago by shax

  • version changed from 2.1.23 to 2.2

sorry... i forgot jabberd version: 2.2.0 (2.1.24.1 also)

Changed 4 months ago by lavda

It seems that ever since dynamic reloading of modules was integrated as part of the logrotate (in sm), sm crash if there are current active sessions or sessions starting/stopping at the moment you run '/bin/kill -HUP cat /usr/local/var/jabberd/pid/sm.pid 2> /dev/null. If I look at the core dump, it segfault at different places in the code but always because some address is no longer valid.

Note: See TracTickets for help on using tickets.