Ad Widget

Collapse

Postgres DB crash when deleting item prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sfl
    Junior Member
    • Jun 2016
    • 26

    #1

    Postgres DB crash when deleting item prototype

    Hi all,

    I have ZBX 4.0.1 running on ubuntu 18 and postgresql 11 with native partition based on clock.
    Previously running ZBX 3.4.14 on Postgresql 9.5. Data migration have been done by pg_dump/pg_restore command.

    When I try to delete an item prototype in a LLD rule I have a crash of postgres with message below.
    Postgres rollback the transaction dans everything is stil running but I'm unable to delete item prototype in a template or even directly on a host (without any template deployed) !
    Click image for larger version  Name:	2018-11-23 11_09_54-Configuration of item prototypes.jpg Views:	1 Size:	89.2 KB ID:	369566

    Only items can be deleted without errors !

    After testing, I can notice that only items prototype coming from db migration are affected by the issue.
    Have you got any idea of what is happens ?



    Code:
    [LIST][*]Error in query [DELETE FROM items WHERE (itemid IN ('418588','418589'))] [SSL SYSCALL error: EOF detected][*]SQL statement execution has failed "DELETE FROM items WHERE (itemid IN ('418588','418589'))" [disc_prototypes.php:622 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItemPrototype->delete() → CItem->delete() → DB::delete() → DB::exception() in include/classes/db/DB.php:847][/LIST]
    System log are segfault process:
    [2204979.968303] postgres[18410]: segfault at 10 ip 0000560f9019ff10 sp 00007ffe3b7d4938 error 4 in postgres[560f900d9000+722000]


    Code:
    [LIST][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:718 → CProfile::get() → DBselect() → pg_query() in include/db.inc.php:369][*]Error in query [SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=3 AND idx='web.disc_prototypes.php.sort'] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:719 → CProfile::get() → DBselect() → pg_query() in include/db.inc.php:369][*]Error in query [SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=3 AND idx='web.disc_prototypes.php.sortorder'] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:740 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBstart() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [BEGIN] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:740 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItemPrototype->get() → DBselect() → pg_query() in include/db.inc.php:369][*]Error in query [SELECT DISTINCT i.* FROM items i,item_discovery id WHERE i.flags=2 AND id.parent_itemid='418530' AND i.itemid=id.itemid ORDER BY i.name LIMIT 1001] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:740 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBend() → DBrollback() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [ROLLBACK] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:765 → getPagingLine() → getPageNumber() → CProfile::get() → DBselect() → pg_query() in include/db.inc.php:369][*]Error in query [SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=3 AND idx='web.paging.lastpage'] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:770 → CView->render() → include() → get_header_host_table() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBstart() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [BEGIN] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:770 → CView->render() → include() → get_header_host_table() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->get() → DBselect() → pg_query() in include/db.inc.php:369][*]Error in query [SELECT h.hostid,h.status,h.proxy_hostid,h.name,h.maintenance_status,h.flags,h.available,h.snmp_available,h.jmx_available,h.ipmi_available,h.error,h.snmp_error,h.jmx_error,h.ipmi_error FROM hosts h WHERE h.flags IN (0,4) AND h.hostid='14535' AND h.status IN (0,1)] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:770 → CView->render() → include() → get_header_host_table() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBend() → DBrollback() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [ROLLBACK] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:770 → CView->render() → include() → get_header_host_table() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBstart() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [BEGIN] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:770 → CView->render() → include() → get_header_host_table() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTemplate->get() → DBselect() → pg_query() in include/db.inc.php:369][*]Error in query [SELECT h.hostid,h.templateid,h.name,h.flags FROM hosts h WHERE h.status=3 AND h.hostid='14535'] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:770 → CView->render() → include() → get_header_host_table() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → DBend() → DBrollback() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [ROLLBACK] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:774 → require_once() → DBstart() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [BEGIN] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:774 → require_once() → CProfile::flush() → CProfile::insertDB() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [INSERT INTO profiles (profileid, userid, idx, value_str, type, idx2) VALUES (0, 3, 'web.disc_prototypes.php.sort', 'name', 3, '0')] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:774 → require_once() → CProfile::flush() → CProfile::insertDB() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [INSERT INTO profiles (profileid, userid, idx, value_str, type, idx2) VALUES (0, 3, 'web.disc_prototypes.php.sortorder', 'ASC', 3, '0')] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:774 → require_once() → CProfile::flush() → CProfile::insertDB() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [INSERT INTO profiles (profileid, userid, idx, value_str, type, idx2) VALUES (0, 3, 'web.paging.lastpage', 'disc_prototypes.php', 3, '0')] [SSL SYSCALL error: EOF detected][*]pg_query(): Cannot set connection to blocking mode [disc_prototypes.php:774 → require_once() → DBend() → DBrollback() → DBexecute() → pg_query() in include/db.inc.php:483][*]Error in query [ROLLBACK] [SSL SYSCALL error: EOF detected[/LIST]
    Thanks in advance for any inputs
    Sfl
Working...