From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 7 03:29:44 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A222BE08 for ; Sat, 7 Jun 2014 03:29:44 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71EB22257 for ; Sat, 7 Jun 2014 03:29:44 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s573TiRS092084 for ; Sat, 7 Jun 2014 04:29:44 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 190742] New: net-mgmt/php5-snmp breaks sqlite Date: Sat, 07 Jun 2014 03:29:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: feld@FreeBSD.org X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 03:29:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190742 Bug ID: 190742 Summary: net-mgmt/php5-snmp breaks sqlite Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: feld@FreeBSD.org The snmp PHP module somehow causes libpkg.so.1 to be loaded and the sqlite functions from libpkg.so.1 are picked up and cause segfaults, coredumps. To reproduce: Consider this simple PHP script that calls sqlite functions Install required php software: # pkg install php5-pdo_sqlite Execute script: # php test.php Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [14] unable to open database file' in /root/test.php:2 Stack trace: #0 /root/test.php(2): PDO->__construct('sqlite:/databas...') #1 {main} thrown in /root/test.php on line 2 Script works as expected. Now install the php5-snmp module. Check the extensions order and make sure you place snmp above the sqlite modules as this can happen to users. # pkg install php5-snmp # cat /usr/local/etc/php/extensions.ini extension=snmp.so extension=pdo.so extension=pdo_sqlite.so # php test.php Segmentation fault (core dumped) Backtrace of core looks like this: #0 0x0000000000000000 in ?? () #1 0x000000080397894e in sqlite3_release_memory () from /usr/local/lib/libpkg.so.1 #2 0x0000000803978b29 in sqlite3_release_memory () from /usr/local/lib/libpkg.so.1 #3 0x0000000803984e25 in sqlite3_set_auxdata () from /usr/local/lib/libpkg.so.1 #4 0x00000008039a9294 in sqlite3_blob_close () from /usr/local/lib/libpkg.so.1 #5 0x000000080cdd0265 in pdo_sqlite_handle_factory () from /usr/local/lib/php/20100525/pdo_sqlite.so #6 0x000000080a4402dd in zim_PDO_dbh_constructor () from /usr/local/lib/php/20100525/pdo.so #7 0x0000000000597673 in zend_do_fcall_common_helper_SPEC () #8 0x000000000059d2b3 in execute () #9 0x000000000056993e in zend_execute_scripts () #10 0x000000000050d02c in php_execute_script () #11 0x000000000060e854 in do_cli () #12 0x000000000060eff1 in main () #13 0x0000000000418bde in _start () #14 0x000000080096f000 in ?? () -- You are receiving this mail because: You are the assignee for the bug.