Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23354

Zabbix proxy crash at exit if no DB connection

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 7.0.0alpha5, 7.0 (plan)
    • 7.0.0alpha5
    • Proxy (P)
    • None
    • Sprint 104 (Sep 2023)
    • 0.5

      Steps to reproduce:

      1. Run zabbix_proxy in foreground with unavailable DB, built from master
      2. Press Ctrl+C

      Result:

        6548:20230901:165941.016 database is down: reconnecting in 10 seconds
        6548:20230901:165950.554 Got signal [signal:2(SIGINT),sender_pid:0,sender_uid:0,reason:128]. Exiting ...
        6548:20230901:165950.554 Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x98]. Crashing ...
        6548:20230901:165950.554 ====== Fatal information: ======
      ...
        6548:20230901:165950.555 === Backtrace: ===
        6548:20230901:165950.559 18: ../sbin/zabbix_proxy(zbx_backtrace+0x4d) [0x5637640aa196]
        6548:20230901:165950.559 17: ../sbin/zabbix_proxy(zbx_log_fatal_info+0x17b) [0x5637640aa484]
        6548:20230901:165950.559 16: ../sbin/zabbix_proxy(+0x2f6c51) [0x5637640aac51]
        6548:20230901:165950.559 15: /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7fd55e9ee980]
        6548:20230901:165950.559 14: ../sbin/zabbix_proxy(pb_lock+0x1c) [0x563763fd8cf2]
        6548:20230901:165950.559 13: ../sbin/zabbix_proxy(zbx_pb_disable+0x9) [0x563763fda7b6]
        6548:20230901:165950.559 12: ../sbin/zabbix_proxy(+0x78156) [0x563763e2c156]
        6548:20230901:165950.559 11: ../sbin/zabbix_proxy(+0x2f6ec1) [0x5637640aaec1]
        6548:20230901:165950.559 10: /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7fd55e9ee980]
        6548:20230901:165950.559 9: /lib/x86_64-linux-gnu/libc.so.6(nanosleep+0x14) [0x7fd55cb6f654]
        6548:20230901:165950.559 8: /lib/x86_64-linux-gnu/libc.so.6(sleep+0x3a) [0x7fd55cb6f55a]
        6548:20230901:165950.559 7: ../sbin/zabbix_proxy(zbx_db_connect+0xb5) [0x56376408e7ed]
        6548:20230901:165950.559 6: ../sbin/zabbix_proxy(zbx_db_get_database_type+0x40) [0x563764092992]
       

      Expected:

      No crash

      Presumably, this happens because proxy buffer is unitialized before DB connection yet is used at exit.

            wiper Andris Zeila
            Kalimulin Alex Kalimulin
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: