Author Topic: NetXMS server crash when triggering SMS action to multiple destinations  (Read 5979 times)

Anders

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
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:
Code: [Select]
#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

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #1 on: December 13, 2012, 12:23:17 pm »
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

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #2 on: December 13, 2012, 04:48:56 pm »
Thanks Victor, btw. do you have any ETA on 1.2.5? :)

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #3 on: December 13, 2012, 07:12:45 pm »
So far I plan to release it around Christmas, so in 1-2 weeks it should be available.

Best regards,
Victor

Anders

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #4 on: December 13, 2012, 08:12:57 pm »
I'm looking forward to it, keep up the great work!

Anders

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #5 on: January 17, 2013, 04:01:41 pm »
Hi,

Did this fix make it into 1.2.5?

Regards

Anders

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #6 on: January 17, 2013, 08:51:29 pm »
Hi!

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

Best regards,
Victor

NetS

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hello. In 1.2.6 sms not send to multiple destinations. Only to first

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Hi!

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

Best regards,
Victor

NetS

  • Newbie
  • *
  • Posts: 5
    • View Profile
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

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #10 on: March 26, 2013, 10:12:51 pm »
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

NetS

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #11 on: April 02, 2013, 09:46:16 am »
how to make it?

macro

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #12 on: April 02, 2013, 12:24:53 pm »
how to make it?

SMSDrvConfig has the following format:

Code: [Select]
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

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #13 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.

macro

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: NetXMS server crash when triggering SMS action to multiple destinations
« Reply #14 on: April 04, 2013, 12:02:55 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.