[ZBX-4171] Crash zabbix_server (escalator) on the macro {ITEM.LASTVALUE} Created: 2011 Sep 25  Updated: 2017 May 30  Resolved: 2011 Sep 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 1.9.7 (beta)
Fix Version/s: 1.9.7 (beta)

Type: Incident report Priority: Blocker
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: escalator
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  1. zabbix_server -V
    Zabbix Server v1.9.7 (revision 21911) (9 September 2011)
    Compilation time: Sep 24 2011 17:46:59

Debian 6.0.2
mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64) using readline 6.1


Attachments: File objdump.server.tar.bz2     File zabbix_server.log.20382only    

 Description   

If an action has a macro

{ITEM.LASTVALUE}

in a message body then zabbi_server always crashes in function "add_value_suffix()"

That happens when item does not have (by default) configured "Units":

20382:20110924:235413.332 In zbx_format_value()
20382:20110924:235413.332 In replace_value_by_map() value:'6' valuemapid:0
20382:20110924:235413.332 End of replace_value_by_map() value:'6'
20382:20110924:235413.332 In add_value_suffix() value:'6' units:'' value_type:3
20382:20110924:235413.332 Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x6]. Crashing ...
20382:20110924:235413.332 ====== Fatal information: ======
20382:20110924:235413.332 Program counter: 0x7fcd686b7d8a
....

If the item has configured "Units" ("sss" in next example) then server is not crashed:

20864:20110925:000656.682 In zbx_format_value()
20864:20110925:000656.683 In replace_value_by_map() value:'6' valuemapid:0
20864:20110925:000656.683 End of replace_value_by_map() value:'6'
20864:20110925:000656.683 In add_value_suffix() value:'6' units:'sss' value_type:3
20864:20110925:000656.683 In add_value_suffix_normal()
20864:20110925:000656.683 End of add_value_suffix_normal()
20864:20110925:000656.683 End of add_value_suffix() value:'H='
20864:20110925:000656.683 End of zbx_format_value()
20864:20110925:000656.683 End of DBget_item_lastvalue():SUCCEED
....

objdump, debuglog (grep of escalator process only) attached



 Comments   
Comment by Oleksii Zagorskyi [ 2011 Sep 25 ]

I cannot reproduce this problem on another trunk server:
FreeBSD 8.1-RELEASE
mysql Ver 14.14 Distrib 5.5.14, for FreeBSD8.1 (i386) using 5.2

  1. zabbix_server -V
    Zabbix Server v1.9.7 (revision 21911) (9 September 2011)
    Compilation time: Sep 25 2011 01:20:52

To be sure i tried to switch zabbix_server under Debian 6.0.2 to use DB under FreeBSD8.1 (mentioned above), but zabbix_server still crashes at the same step.

<added>
To be sure i tried vice versa zabbix_server under FreeBSD8.1 and DB under Debian 6.0.2 and it works w/o problems!

And finally i cannot reproduce this problem under 3rd trunk server under CentOS5.5 ()

If you need problematic "zabbix_server" binary from the Debian (my workstation) I'll attach it.

Comment by Aleksandrs Saveljevs [ 2011 Sep 26 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-4171.

Comment by Oleksii Zagorskyi [ 2011 Sep 26 ]

Dev branch tested and it works!

Thanks Aleksandrs.

Comment by Aleksandrs Saveljevs [ 2011 Sep 26 ]

Fixed in pre-1.9.7 in r21928.

Generated at Fri Apr 26 23:25:10 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.