NetXMS server crash when triggering SMS action to multiple destinations

Started by Anders, December 11, 2012, 05:02:31 PM

Previous topic - Next topic

Anders

Hi,

I've just recently added a second SMS-destination (action) in the "Event Processing Policy" for a temperature sensor that I'm polling via SNMP. If the policy only has one SMS destination (action), the SMS alarms seems to be triggered fine, but when a second target is added, the NetXMS Server crashes (seg. faults).

I get the following output from gdb:

#0  0x00007ffff4e91101 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff4e90d66 in strdup () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff7bc5166 in Serial::Open (this=0x7fffefce04a0, pszPort=0x0) at serial.cpp:84
#3  0x00007ffff7bc51de in Serial::Restart (this=0x7fffefce04a0) at serial.cpp:313
#4  0x00007ffff7bc5263 in Serial::Write (this=0x7fffefce04a0, pBuff=0x7fffefadfc23 "AT+CMGF=0\r\n", nSize=11) at serial.cpp:473
#5  0x00007fffefadef6a in SMSDriverSendPDU (pszPhoneNumber=0xXXXXXXXXXXXXX "4670XXXXXXX", pszText=<optimized out>) at main.cpp:257
#6  0x00007fffefadf48d in SMSDriverSend (pszPhoneNumber=0xXXXXXXXXXXXXX "4670XXXXXXX",
    pszText=0x7fffc0025940 "Host: XXXXXXXXX (XXX.XXX.XXX.XXX)\r\nObject: Temperature sensor: XXXXXXXXXXXXXXXX\r\nEvent: Critical (100043)\r\nValue: 21.100000\r\nTimestamp: 11-Dec-2012 14:14:07") at main.cpp:187
#7  0x00007ffff6ce9482 in SenderThread (pArg=<optimized out>) at sms.cpp:64
#8  0x00007ffff59e0e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007ffff4efbcbd in clone () from /lib/x86_64-linux-gnu/libc.so.6


Let me know if I can assist with any further information.

// Anders

Victor Kirhenshtein

Hi!

I have fixed bug in serial communication code which cause this crash. Release 1.2.5 will contain this fix.

Best regards,
Victor

Anders


Victor Kirhenshtein

So far I plan to release it around Christmas, so in 1-2 weeks it should be available.

Best regards,
Victor

Anders


Anders


Victor Kirhenshtein

Hi!

It should. Do you still have same issue with 1.2.5?

Best regards,
Victor

NetS

Hello. In 1.2.6 sms not send to multiple destinations. Only to first

Victor Kirhenshtein

Hi!

Do you have any errors in server log? Was it working before 1.2.6?

Best regards,
Victor

NetS

No errors on log. I don't tested it before 1.2.6. I use modem ZTE and Windows 2008 r2 system.

How i can help to diagnostic it?

Victor Kirhenshtein

Hi!

Just found a bug in PDU mode sender that can cause crash on 64-bit systems. Can you try to switch SMS driver to text mode?

Best regards,
Victor


macro

Quote from: NetS on April 02, 2013, 09:46:16 AM
how to make it?

SMSDrvConfig has the following format:

Device[,PortSpeed[,DataBits[,Parity[,StopBits[,Mode]]]]]

Where Mode is either P (PDU) or T (Text). PDU is on by default.

For example: /dev/ttyUSB0,9600,8,n,1,T will enable SMS driver to send texts in plain text mode.

NetS

Thanks. But i allready transfer server from Windows Server 2008R2 to Ubuntu 12.04 x64.

Now it works for 2 of 3 Numbers. I tried to add dummy numbers and it works but passes numbers through one. First-work Second-no Third-Work Fourth-Work ... etc. I think that need delay for send sms, becouse driver not send correctly multiple numbers on one time.

macro

Quote from: NetS on April 03, 2013, 11:13:59 AM
Thanks. But i allready transfer server from Windows Server 2008R2 to Ubuntu 12.04 x64.

Now it works for 2 of 3 Numbers. I tried to add dummy numbers and it works but passes numbers through one. First-work Second-no Third-Work Fourth-Work ... etc. I think that need delay for send sms, becouse driver not send correctly multiple numbers on one time.

I'm not sure if this is a driver's fault, but could be. The most obvious guess is that your modem needs some time to process an sms and ignores subsequent AT commands for this period of time. Please post your log here (or PM me) and we'll try to figure this out.