-
Type:
Incident report
-
Resolution: Won't fix
-
Priority:
Major
-
None
-
Affects Version/s: None
-
Component/s: Server (S)
-
None
-
Environment:OpenBSD 4.1, MySQL 5.0.33
CFLAGS="-ggdb3 -lssl -lcrypto" AUTOCONF_VERSION="2.61" AUTOMAKE_VERSION="1.9"
./configure --enable-static --enable-server --enable-agent --with-mysql --with-net-snmp
ZABBIX server crashes on SIG_SEGV, theres a zabbix_agentd running, all trunk@5036
------8<------ ktrace dump ------8<------
15054 zabbix_server GIO fd 5 read 11 bytes
"\a\0\0^A\0\0\0^B\0\0\0"
15054 zabbix_server RET read 11/0xb
15054 zabbix_server PSIG SIGSEGV SIG_DFL code 1 addr=0x7da42154 trapno=1
15054 zabbix_server NAMI "zabbix_server.core"
------8<-------------------------8<------
------8<------ gdb ------8<------
Core was generated by `zabbix_server'.
Program terminated with signal 11, Segmentation fault.
#0 0x1c0475c3 in mysql_fetch_row ()
(gdb) bt
#0 0x1c0475c3 in mysql_fetch_row ()
#1 0x1c02da82 in zbx_db_fetch (result=0x8612f100) at db.c:537
#2 0x1c02a7d6 in DBfetch (result=0x8612f100) at db.c:199
#3 0x1c011709 in get_values () at poller.c:322
#4 0x1c011e98 in main_poller_loop (type=0, num=3) at poller.c:542
#5 0x1c00c71c in MAIN_ZABBIX_ENTRY () at server.c:1134
#6 0x1c021015 in daemon_start (allow_root=0) at daemon.c:170
#7 0x1c00c308 in main (argc=1, argv=0xcfbcc580) at server.c:978
(gdb) disas
Dump of assembler code for function mysql_fetch_row:
0x1c047518 <mysql_fetch_row+0>: push %ebp
0x1c047519 <mysql_fetch_row+1>: mov %esp,%ebp
0x1c04751b <mysql_fetch_row+3>: push %esi
0x1c04751c <mysql_fetch_row+4>: push %ebx
0x1c04751d <mysql_fetch_row+5>: mov 0x8(%ebp),%ebx
0x1c047520 <mysql_fetch_row+8>: mov 0xc(%ebx),%eax
0x1c047523 <mysql_fetch_row+11>: test %eax,%eax
0x1c047525 <mysql_fetch_row+13>: jne 0x1c0475bc <mysql_fetch_row+164>
0x1c04752b <mysql_fetch_row+19>: cmpb $0x0,0x4c(%ebx)
0x1c04752f <mysql_fetch_row+23>: jne 0x1c047580 <mysql_fetch_row+104>
0x1c047531 <mysql_fetch_row+25>: mov 0x18(%ebx),%esi
0x1c047534 <mysql_fetch_row+28>: cmpl $0x2,0x37c(%esi)
0x1c04753b <mysql_fetch_row+35>: je 0x1c047595 <mysql_fetch_row+125>
0x1c04753d <mysql_fetch_row+37>: push %eax
0x1c04753e <mysql_fetch_row+38>: pushl 0x3c0a56e8
0x1c047544 <mysql_fetch_row+44>: xor %eax,%eax
0x1c047546 <mysql_fetch_row+46>: cmpb $0x0,0x4d(%ebx)
0x1c04754a <mysql_fetch_row+50>: setne %al
0x1c04754d <mysql_fetch_row+53>: dec %eax
0x1c04754e <mysql_fetch_row+54>: and $0xffffffdc,%eax
0x1c047551 <mysql_fetch_row+57>: add $0x802,%eax
0x1c047556 <mysql_fetch_row+62>: push %eax
0x1c047557 <mysql_fetch_row+63>: push %esi
0x1c047558 <mysql_fetch_row+64>: call 0x1c044844 <set_mysql_error>
0x1c04755d <mysql_fetch_row+69>: add $0x10,%esp
0x1c047560 <mysql_fetch_row+72>: movb $0x1,0x4c(%ebx)
0x1c047564 <mysql_fetch_row+76>: lea 0x4d(%ebx),%eax
0x1c047567 <mysql_fetch_row+79>: cmp %eax,0x3b4(%esi)
0x1c04756d <mysql_fetch_row+85>: movl $0x0,0x37c(%esi)
0x1c047577 <mysql_fetch_row+95>: je 0x1c047589 <mysql_fetch_row+113>
0x1c047579 <mysql_fetch_row+97>: movl $0x0,0x18(%ebx)
0x1c047580 <mysql_fetch_row+104>: xor %eax,%eax
0x1c047582 <mysql_fetch_row+106>: lea 0xfffffff8(%ebp),%esp
0x1c047585 <mysql_fetch_row+109>: pop %ebx
0x1c047586 <mysql_fetch_row+110>: pop %esi
0x1c047587 <mysql_fetch_row+111>: leave
0x1c047588 <mysql_fetch_row+112>: ret
0x1c047589 <mysql_fetch_row+113>: movl $0x0,0x3b4(%esi)
0x1c047593 <mysql_fetch_row+123>: jmp 0x1c047579 <mysql_fetch_row+97>
0x1c047595 <mysql_fetch_row+125>: pushl 0x14(%ebx)
0x1c047598 <mysql_fetch_row+128>: pushl 0x44(%ebx)
0x1c04759b <mysql_fetch_row+131>: pushl 0x3c(%ebx)
0x1c04759e <mysql_fetch_row+134>: push %esi
0x1c04759f <mysql_fetch_row+135>: call 0x1c045430 <read_one_row>
0x1c0475a4 <mysql_fetch_row+140>: add $0x10,%esp
0x1c0475a7 <mysql_fetch_row+143>: test %eax,%eax
0x1c0475a9 <mysql_fetch_row+145>: jne 0x1c047560 <mysql_fetch_row+72>
0x1c0475ab <mysql_fetch_row+147>: addl $0x1,(%ebx)
0x1c0475ae <mysql_fetch_row+150>: mov 0x44(%ebx),%eax
0x1c0475b1 <mysql_fetch_row+153>: adcl $0x0,0x4(%ebx)
0x1c0475b5 <mysql_fetch_row+157>: mov %eax,0x48(%ebx)
0x1c0475b8 <mysql_fetch_row+160>: jmp 0x1c047582 <mysql_fetch_row+106>
0x1c0475ba <mysql_fetch_row+162>: mov %esi,%esi
0x1c0475bc <mysql_fetch_row+164>: mov 0x10(%ebx),%eax
0x1c0475bf <mysql_fetch_row+167>: test %eax,%eax
0x1c0475c1 <mysql_fetch_row+169>: je 0x1c0475d2 <mysql_fetch_row+186>
0x1c0475c3 <mysql_fetch_row+171>: mov 0x4(%eax),%edx
0x1c0475c6 <mysql_fetch_row+174>: mov (%eax),%eax
0x1c0475c8 <mysql_fetch_row+176>: mov %eax,0x10(%ebx)
0x1c0475cb <mysql_fetch_row+179>: mov %edx,0x48(%ebx)
0x1c0475ce <mysql_fetch_row+182>: mov %edx,%eax
0x1c0475d0 <mysql_fetch_row+184>: jmp 0x1c047582 <mysql_fetch_row+106>
0x1c0475d2 <mysql_fetch_row+186>: movl $0x0,0x48(%ebx)
0x1c0475d9 <mysql_fetch_row+193>: jmp 0x1c047580 <mysql_fetch_row+104>
0x1c0475db <mysql_fetch_row+195>: nop
End of assembler dump.
(gdb) i reg
eax 0x7da42150 2107908432
ecx 0x80df5fa0 -2132844640
edx 0x7 7
ebx 0x8612f100 -2045579008
esp 0xcfbcb140 0xcfbcb140
ebp 0xcfbcb148 0xcfbcb148
esi 0xcfbcc580 -809712256
edi 0x12 18
eip 0x1c0475c3 0x1c0475c3
eflags 0x10206 66054
cs 0x1f 31
ss 0x27 39
ds 0x27 39
es 0x27 39
fs 0x27 39
gs 0x27 39
(gdb) x $eax+4
0x7da42154: Cannot access memory at address 0x7da42154
------8<-----------------8<------