php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52958 Segfault in PDO_OCI on cleanup after running a long testsuite
Submitted: 2010-09-29 23:37 UTC Modified: 2016-03-08 01:28 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: kontakt at beberlei dot de Assigned: lstrojny (profile)
Status: Closed Package: PDO OCI
PHP Version: 5.3.3 OS: Ubuntu
Private report: No CVE-ID: None
 [2010-09-29 23:37 UTC] kontakt at beberlei dot de
Description:
------------
I couldnt reproduce this (tried creating lots of connections, queries and statements to simulate a long running testsuite), so here is the GDB report without a reproduce case:

Actual result:
--------------
#0  0x019a1138 in slrac () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#1  0x0195a7c2 in ?? () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#2  0x0197883e in ?? () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#3  0x01979237 in ?? () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#4  0x0195b163 in ?? () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#5  0x0196e9e7 in kghfrh_internal () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#6  0x0196eb8e in kghfrh () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#7  0x01548179 in kpuhhfrh () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#8  0x0155de34 in kpufhndl0 () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#9  0x0155c7d0 in kpufhndl () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#10 0x0162e644 in OCIHandleFree () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1
#11 0x0240e9d3 in oci_handle_closer (dbh=0x9a74700) at /home/benny/downloads/php-5.3.3/ext/pdo_oci/oci_driver.c:193
#12 0x023e868e in dbh_free (dbh=0x98f78a0) at /home/benny/downloads/php-5.3.3/ext/pdo/pdo_dbh.c:1511
#13 0x0837ad3c in zend_objects_store_del_ref_by_handle_ex (handle=338, handlers=0x23f9140) at /home/benny/downloads/php-5.3.3/Zend/zend_objects_API.c:220
#14 0x0837ad6f in zend_objects_store_del_ref (zobject=0x9aeadec) at /home/benny/downloads/php-5.3.3/Zend/zend_objects_API.c:172
#15 0x0834edf5 in _zval_dtor (zval_ptr=0x8edd710) at /home/benny/downloads/php-5.3.3/Zend/zend_variables.h:35
#16 _zval_ptr_dtor (zval_ptr=0x8edd710) at /home/benny/downloads/php-5.3.3/Zend/zend_execute_API.c:443
#17 0x08365dd8 in zend_hash_destroy (ht=0x8ed59f0) at /home/benny/downloads/php-5.3.3/Zend/zend_hash.c:526
#18 0x083776c3 in zend_object_std_dtor (object=0x987b958) at /home/benny/downloads/php-5.3.3/Zend/zend_objects.c:45
#19 0x083776f2 in zend_objects_free_object_storage (object=0x987b958) at /home/benny/downloads/php-5.3.3/Zend/zend_objects.c:128
#20 0x0837a88e in zend_objects_store_free_object_storage (objects=0x8872590) at /home/benny/downloads/php-5.3.3/Zend/zend_objects_API.c:92
#21 0x0834f14d in shutdown_executor () at /home/benny/downloads/php-5.3.3/Zend/zend_execute_API.c:302
#22 0x0835aaa3 in zend_deactivate () at /home/benny/downloads/php-5.3.3/Zend/zend.c:890
#23 0x08309633 in php_request_shutdown (dummy=0x0) at /home/benny/downloads/php-5.3.3/main/main.c:1633
#24 0x083dc986 in main (argc=6, argv=0xbffff234) at /home/benny/downloads/php-5.3.3/sapi/cli/php_cli.c:1373


***** Internal heap ERROR kghfrh:ds addr=0x926435c ds=0x8a5f128 *****

***** Dump of memory around addr 0x926435c: 
9263350                            00000000              [....]
9263360 00000000 00000000 00000000 00000000  [................]
        Repeat 61 times
9263740 00000000 00000000 00000000 00021200  [................]
9263750 00000000 00000000 00000000 01000000  [................]
9263760 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9263780 00000003 000B000A 00000000 0926378C  [.............7&.]
9263790 0926378C 09264328 08A5DADC 00000000  [.7&.(C&.........]
92637A0 092637A0 092637A0 00000000 00000000  [.7&..7&.........]
92637B0 00000000 00000000 00000000 00000000  [................]
        Repeat 3 times
92637F0 00000000 00000000 C0000325 09263320  [........%... 3&.]
9263800 08A4AF68 08A5AB78 00000000 00000000  [h...x...........]
9263810 00000000 00000000 00000000 00000000  [................]
        Repeat 47 times
9263B10 00000000 00000000 00000000 10000821  [............!...]
9263B20 092637F8 08A4AF14 08A5DE6C 08A5DA3C  [.7&.....l...<...]
9263B30 1000080D 00000000 020AAFC0 84000802  [................]
9263B40 00000000 08A5DE5C 08A5DA5C 08A5DEF8  [....\...\.......]
9263B50 B000089E 00000000 08A5E0FC 08A5E0FC  [................]
9263B60 00000000 00000000 00000000 00000000  [................]
        Repeat 83 times
92640A0 00000000 00000000 00000000 B0000082  [................]
92640B0 09263B50 02087438 000A12CD 01006600  [P;&.8t.......f..]
92640C0 00080C02 00000100 00000100 B0000092  [................]
92640D0 09263B50 02087438 000A12CD 01007700  [P;&.8t.......w..]
92640E0 00080C02 00000100 00000100 63CA0300  [...............c]
92640F0 7F6D0100 7C6D0100 03000300 0100B200  [..m...m|........]
9264100 3A383A4F 64747322 73616C43 00000000  [O:8:"stdClas....]
9264110 B9E05900 00000000 00000000 00000000  [.Y..............]
9264120 00000000 00000000 7C6D0100 F2A94000  [..........m|.@..]
9264130 23000100 00000009 13000000 00000000  [...#............]
9264140 3A4F0100 73223A38 6C436474 22737361  [..O:8:"stdClass"]
9264150 7B3A303A 0000007D 00000000 B00000F2  [:0:{}...........]
9264160 09263B50 09264164 09264164 01006600  [P;&.dA&.dA&..f..]
9264170 00080C02 00000100 00000100 62CA0300  [...............b]
9264180 7D6D0100 7C6D0100 02000200 0100B200  [..m}..m|........]
9264190 00003B4E 00000000 4CF21518 00000000  [N;.........L....]
92641A0 B9E05900 00000000 00000000 00000000  [.Y..............]
92641B0 00000000 00000000 7C6D0100 F2A94000  [..........m|.@..]
92641C0 12000100 00000009 02000000 00000000  [................]
92641D0 3B4E0100 00000000 00000000 B0000072  [..N;........r...]
92641E0 0926415C 092641E4 092641E4 00005400  [\A&..A&..A&..T..]
92641F0 00000000 00000000 00000000 00000000  [................]
        Repeat 4 times
9264240 00000000 00000000 00000000 B0000032  [............2...]
9264250 09263B50 02020EA0 000A12CD 0000003D  [P;&.........=...]
9264260 0000000A 00000079 08A46E68 B0000082  [....y...hn......]
9264270 09263B50 02087438 000A12CD 01006800  [P;&.8t.......h..]
9264280 00080C02 00000100 00000100 68CA0300  [...............h]
9264290 C46E0100 C36E0100 03000300 0100B200  [..n...n.........]
92642A0 32666564 00000000 00000000 00000000  [def2............]
92642B0 050B5A00 00000000 00000000 00000000  [.Z..............]
92642C0 00000000 00000000 C36E0100 FAA74000  [..........n..@..]
92642D0 14000100 00000009 04000000 00000000  [................]
92642E0 65640100 00003266 00000000 B0000082  [..def2..........]
92642F0 09263B50 02087438 000A12CD 01006800  [P;&.8t.......h..]
9264300 00080C02 00000100 00000100 68CA0300  [...............h]
9264310 C46E0100 C36E0100 03000300 0100B200  [..n...n.........]
9264320 32666564 00000000 00000000 00000000  [def2............]
9264330 050B5A00 00000000 00000000 00000000  [.Z..............]
9264340 00000000 00000000 C36E0100 FAA74000  [..........n..@..]
9264350 14000100 00000009 04000000 00000000  [................]
9264360 65640100 00003266 00000000 00000000  [..def2..........]
9264370 09263B50 00000031 C0000D91 09264364  [P;&.1.......dC&.]
9264380 0986C44C 08A5F1A0 00000000 00000000  [L...............]
9264390 00000000 00000000 00000000 00000000  [................]
        Repeat 3 times
92643D0 C000022D 09264378 00000000 00000000  [-...xC&.........]
92643E0 0000008C 0000048C 0000068C 0000068C  [................]
92643F0 00000000 00000000 08A46EB8 0C820060  [.........n..`...]
9264400 00000008 004100EB 00010041 00000001  [......A.A.......]
9264410 00000000 00000000 00B400B4 00B40000  [................]
9264420 00000041 00020001 02020200 2A142A00  [A............*.*]
9264430 2E003A24 2E002C00 2C002C00 00000000  [$:...,...,.,....]
9264440 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9264460 00000000 00002400 00000000 00000000  [.....$..........]
9264470 00000024 00000000 2D000000 00000000  [$..........-....]
9264480 00000000 00000000 00000000 59000000  [...............Y]
9264490 59005900 2D005900 4D004D00 44002D00  [.Y.Y.Y.-.M.M.-.D]
92644A0 20004400 48004800 34003200 4D003A00  [.D. .H.H.2.4.:.M]
92644B0 3A004900 53005300 00000000 00000000  [.I.:.S.S........]
92644C0 00000000 00000000 48000000 32004800  [...........H.H.2]
92644D0 3A003400 49004D00 53003A00 00005300  [.4.:.M.I.:.S.S..]
92644E0 00000000 00000000 00000000 00000000  [................]
92644F0 00000000 00000000 59000000 59005900  [...........Y.Y.Y]
9264500 2D005900 4D004D00 44002D00 20004400  [.Y.-.M.M.-.D.D. ]
9264510 48004800 34003200 4D003A00 3A004900  [.H.H.2.4.:.M.I.:]
9264520 53005300 00000000 00000000 00000000  [.S.S............]
9264530 00000000 00000000 00000000 00000000  [................]
9264540 00000000 00000000 48000000 2E004800  [...........H.H..]
9264550 49004D00 53002E00 58005300 46004600  [.M.I...S.S.X.F.F]
9264560 41002000 20004D00 5A005400 00005200  [. .A.M. .T.Z.R..]
9264570 00000000 00000000 00000000 00000000  [................]
9264580 00000000 00000000 00000000 59000000  [...............Y]
9264590 59005900 2D005900 4D004D00 44002D00  [.Y.Y.Y.-.M.M.-.D]
92645A0 20004400 48004800 34003200 4D003A00  [.D. .H.H.2.4.:.M]
92645B0 3A004900 53005300 54002000 48005A00  [.I.:.S.S. .T.Z.H]
92645C0 54003A00 4D005A00 00000000 00000000  [.:.T.Z.M........]
92645D0 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
92645F0 00000000 00000000 00000000 C00001A9  [................]
9264600 09264378 00000000 00000000 00000000  [xC&.............]
9264610 00000000 00000000 00000000 00000000  [................]
        Repeat 24 times
92647A0 00000000 C0000965 09264378 08A5F1A0  [....e...xC&.....]
92647B0 0986C44C 043F180A 3F18112D 18162D04  [L.....?.-..?.-..]
92647C0 1820023F 3A043F18 043F181A 00181B3A  [?. ..?.:..?.:...]
92647D0 00000010 00000000 00000000 00000000  [................]
92647E0 00000000 00000000 00000000 00000000  [................]
        Repeat 12 times
92648B0 18000000 3A043F18 043F181A 00181B3A  [.....?.:..?.:...]
92648C0 3F182E10 18222002 00001000 00000000  [...?. ".........]
92648D0 00000000 00000000 00000000 00000000  [................]
        Repeat 13 times
92649B0 18190000 1A2E043F 2E043F18 1833181B  [....?....?....3.]
92649C0 023F182E 3F182220 18322002 00001000  [..?. ".?. 2.....]
92649D0 00000000 00000000 00000000 00000000  [................]
        Repeat 13 times
9264AB0 3F180A00 18112D04 162D043F 20023F18  [...?.-..?.-..?. ]
9264AC0 043F1818 3F181A3A 181B3A04 182E1000  [..?.:..?.:......]
9264AD0 2220023F 00100018 00000000 00000000  [?. "............]
9264AE0 00000000 00000000 00000000 00000000  [................]
        Repeat 12 times
9264BB0 043F180A 3F18112D 18162D04 1820023F  [..?.-..?.-..?. .]
9264BC0 3A043F18 043F181A 3F181B3A 182F2002  [.?.:..?.:..?. /.]
9264BD0 303A043F 32100018 00100018 00000000  [?.:0...2........]
9264BE0 00000000 00000000 00000000 00000000  [................]
        Repeat 12 times
9264CB0 C0000459 092647A4 08A5F194 08A5E7E0  [Y....G&.........]
9264CC0 0000008C 0000028C 0000038C 0000068C  [................]
9264CD0 00000000 00000000 08A46EB8 02820650  [.........n..P...]
9264CE0 00000008 004100D3 00010041 00000001  [......A.A.......]
9264CF0 00000000 00000000 00B400B4 00B40000  [................]
9264D00 00000041 00010001 01010100 150A1500  [A...............]
9264D10 2C2E1D12 2C2E0000 002C0000 00000000  [...,...,..,.....]
9264D20 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9264D40 00000000 00000024 00000000 24000000  [....$..........$]
9264D50 00000000 00000000 002D0000 00000000  [..........-.....]
9264D60 00000000 00000000 00000000 59590000  [..............YY]
9264D70 4D2D5959 44442D4D 32484820 494D3A34  [YY-MM-DD HH24:MI]
9264D80 0053533A 00000000 00000000 00000000  [:SS.............]
9264D90 00000000 00000000 00000000 00000000  [................]
9264DA0 00000000 00000000 48480000 4D3A3432  [..........HH24:M]
9264DB0 53533A49 00000000 00000000 00000000  [I:SS............]
9264DC0 00000000 00000000 00000000 00000000  [................]
9264DD0 00000000 00000000 59590000 4D2D5959  [..........YYYY-M]
9264DE0 44442D4D 32484820 494D3A34 0053533A  [M-DD HH24:MI:SS.]
9264DF0 00000000 00000000 00000000 00000000  [................]
        Repeat 2 times
9264E20 00000000 00000000 48480000 2E494D2E  [..........HH.MI.]
9264E30 46585353 4D412046 525A5420 00000000  [SSXFF AM TZR....]
9264E40 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9264E60 00000000 00000000 00000000 59590000  [..............YY]
9264E70 4D2D5959 44442D4D 32484820 494D3A34  [YY-MM-DD HH24:MI]
9264E80 2053533A 3A485A54 004D5A54 00000000  [:SS TZH:TZM.....]
9264E90 00000000 00000000 00000000 00000000  [................]
        Repeat 3 times
9264ED0 00000000 00000000 00000000 C000022D  [............-...]
9264EE0 09264CB0 08A5F188 0926514C 0000008C  [.L&.....LQ&.....]
9264EF0 0000028C 0000038C 0000068C 00000000  [................]
9264F00 00000000 08A46EB8 02820670 00000008  [.....n..p.......]
9264F10 004100B4 00010041 00000001 00000000  [..A.A...........]
9264F20 00000000 00B400B4 00B40000 00000041  [............A...]
9264F30 00010001 01010100 150A1500 2C2E1D12  [...............,]
9264F40 2C2E0000 002C0000 00000000 00000000  [...,..,.........]
9264F50 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9264F70 00000024 00000000 24000000 00000000  [$..........$....]
9264F80 00000000 002D0000 00000000 00000000  [......-.........]
9264F90 00000000 00000000 59590000 4D2D5959  [..........YYYY-M]
9264FA0 44442D4D 32484820 494D3A34 0053533A  [M-DD HH24:MI:SS.]
9264FB0 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9264FD0 00000000 48480000 4D3A3432 53533A49  [......HH24:MI:SS]
9264FE0 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9265000 00000000 59590000 4D2D5959 44442D4D  [......YYYY-MM-DD]
9265010 32484820 494D3A34 0053533A 00000000  [ HH24:MI:SS.....]
9265020 00000000 00000000 00000000 00000000  [................]
        Repeat 2 times
9265050 00000000 48480000 2E494D2E 46585353  [......HH.MI.SSXF]
9265060 4D412046 525A5420 00000000 00000000  [F AM TZR........]
9265070 00000000 00000000 00000000 00000000  [................]
        Repeat 1 times
9265090 00000000 00000000 59590000 4D2D5959  [..........YYYY-M]
92650A0 44442D4D 32484820 494D3A34 2053533A  [M-DD HH24:MI:SS ]
92650B0 3A485A54 004D5A54 00000000 00000000  [TZH:TZM.........]
92650C0 00000000 00000000 00000000 00000000  [................]
        Repeat 3 times
9265100 00000000 00000000 20000015 09264378  [........... xC&.]
9265110 00000000 00000000 00004558 20000015  [........XE..... ]
9265120 09265108 00000000 00000000 00004558  [.Q&.........XE..]
9265130 20000015 0926511C 00000000 00000000  [... .Q&.........]
9265140 00003033 D0000229 09265130 08A5F188  [30..)...0Q&.....]
9265150 08A5F188 35423635 35374335 39374333  [....56B55C753C79]
9265160 35343543 42313734 34314631 33343936  [C545471B1F146943]
9265170 38454233 34433245 39463846 42463743  [3BE8E2C4F8F9C7FB]
9265180 45314332 41313631 36373541 43373043  [2C1E161AA576C07C]
9265190 31413338 35413436 38453535 37363239  [83A164A555E89267]
92651A0 43423645 46344132 37373432 44443230  [E6BC2A4F247702DD]
92651B0 46333546 D00001B9 09265144 08A5F17C  [F53F....DQ&.|...]
92651C0 08A5F17C 48545541 5256535F 5345525F  [|...AUTH_SVR_RES]
92651D0 534E4F50 00000045 D0000195 092651B4  [PONSE........Q&.]
92651E0 08A5F17C 08A5F17C 4D2D4444 522D4E4F  [|...|...DD-MON-R]
92651F0 48482052 2E494D2E 46585353 4D412046  [R HH.MI.SSXFF AM]
9265200 525A5420 D0000169 092651D8 08A5F17C  [ TZRi....Q&.|...]
9265210 08A5F17C 48545541 534C4E5F 43584C5F  [|...AUTH_NLS_LXC]
9265220 4E5A5453 00004D46 D0000145 09265204  [STZNFM..E....R&.]
9265230 08A5F17C 08A5F17C 4D2E4848 53532E49  [|...|...HH.MI.SS]
9265240 20464658 54204D41 0000525A D0000121  [XFF AM TZR..!...]
9265250 09265228 08A5F17C 08A5F17C 48545541  [(R&.|...|...AUTH]
9265260 534C4E5F 43584C5F 4E5A5454 00004D46  [_NLS_LXCTTZNFM..]
9265270 D00000FD 0926524C 08A5F170 08A5F170  [....LR&.p...p...]
9265280 4D2D4444 522D4E4F 48482052 2E494D2E  [DD-MON-RR HH.MI.]
9265290 46585353 4D412046 D00000D5 09265270  [SSXFF AM....pR&.]
92652A0 08A5F170 08A5F170 48545541 534C4E5F  [p...p...AUTH_NLS]
92652B0 43584C5F 504D5453 00004D46 D00000B1  [_LXCSTMPFM......]
92652C0 09265298 08A5F170 08A5F170 4D2E4848  [.R&.p...p...HH.M]
92652D0 53532E49 20464658 00004D41 D0000091  [I.SSXFF AM......]
92652E0 092652BC 08A5F170 08A5F170 48545541  [.R&.p...p...AUTH]
92652F0 534C4E5F 43584C5F 454D4954 00004D46  [_NLS_LXCTIMEFM..]
9265300 D000006D 092652DC 08A5F170 08A5F170  [m....R&.p...p...]
9265310 48545541 534C4E5F 43584C5F 4F494E55  [AUTH_NLS_LXCUNIO]
9265320 5255434E 00000000 D0000045 09265300  [NCUR....E....S&.]
9265330 08A5F170 08A5F170 47455247 4149524F  [p...p...GREGORIA]
9265340 0000004E D0000029 09265328 08A5F170  [N...)...(S&.p...]
9265350 08A5F170 48545541 534C4E5F           [p...AUTH_NLS]    

******************************************************
HEAP DUMP heap name="Alloc authenti"  desc=0x8a5f128
 extent sz=0x1024 alt=32767 het=32767 rec=0 flg=3 opc=6
 parent=0x8a4ac68 owner=(nil) nex=(nil) xsz=0x1010

Program received signal SIGSEGV, Segmentation fault.
0x019a1138 in slrac () from /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1

Patches

52958-PHP-5.4-20120623.patch (last revision 2012-06-23 09:26 UTC by hswong3i at gmail dot com)
52958-fix-pdo-oci-cleanups.patch (last revision 2010-10-06 19:34 UTC by kontakt at beberlei dot de)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-01 02:33 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: sixd
 [2010-10-06 10:35 UTC] kalle@php.net
Looking at oci_handle_closer() breifly, then the first thing that catches my eye is we don't check H->err because we attempt to free the handle.

I'm not on a dev machine, so I can't write a patch. Could you try and see if something along these lines will work for you:

1) Open /src/ext/pdo_oci/oci_driver.c and find line 215 (trunk, might be the same in 5.x)
2) Wrap line 215 and 216 inside an if conditional like so:

if (H->err) {
	OCIHandleFree(H->err, OCI_HTYPE_ERROR);
	H->err = NULL;
}
 [2010-10-06 19:33 UTC] kontakt at beberlei dot de
As an additional info, i changed to using the OCI 11.1 Instaclient Library to compile against with the same error as described in the original report.

When applying the patch this sort of breaks it completly for both my other bug http://bugs.php.net/bug.php?id=52957 and this a comparable error :-)

I get a binary output of a screen and this error:

Errors in file :
OCI-21500: internal error code, arguments: [kghfrempty:ds], [0xC84EB3C], [], [], [], [], [], []

GDB has the following backtraces:

Program received signal SIGSEGV, Segmentation fault.
0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
(gdb) bt
#0  0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#1  0x02adb406 in slrac () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#2  0x0392acaf in sskgds_plt_adjust () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#3  0x0392ad69 in sskgds_find_rtn_hdr () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#4  0x039210ce in skgdstpcs () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#5  0x036d5435 in kgdsdst () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#6  0x031a3b6e in skgudmp () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#7  0x036a0938 in kgeriv_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#8  0x036a08af in kgeriv () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#9  0x036a325c in kgeric1 () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#10 0x03687682 in kgherror () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#11 0x03e98eea in kghfrmrg () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#12 0x03e97eb0 in kghfre () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#13 0x03df3cfb in kpuhhfre () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#14 0x0271866e in kpufhndl0 () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#15 0x02715dfe in kpufhndl () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#16 0x026eaea6 in OCIHandleFree () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#17 0x024989d3 in oci_handle_closer (dbh=0x9a02d80) at /home/benny/downloads/php-5.3.3/ext/pdo_oci/oci_driver.c:193


Program received signal SIGSEGV, Segmentation fault.
0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
(gdb) bt
#0  0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#1  0x02adb406 in slrac () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#2  0x0392acaf in sskgds_plt_adjust () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#3  0x0392ad69 in sskgds_find_rtn_hdr () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#4  0x039210ce in skgdstpcs () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#5  0x036d5435 in kgdsdst () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#6  0x031a3b6e in skgudmp () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#7  0x036a0540 in kgerinv_internal () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#8  0x036a04cb in kgerinv () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#9  0x036a2493 in kgerin () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#10 0x03688378 in kghnerror () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#11 0x03e9cd98 in kghfrempty () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#12 0x03e9a7af in kghgex () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#13 0x03e9bcc0 in kghfnd () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#14 0x03e9ab33 in kghalo () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#15 0x03e9a3c4 in kghgex () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#16 0x03e9bcc0 in kghfnd () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#17 0x03e95e65 in kghprmalo () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#18 0x03e95637 in kghalp () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#19 0x026ca7fa in kpuhhalpuc () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#20 0x0270c9b4 in kpuexAllocPrefMem () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#21 0x0270c1c5 in kpuexInitStmh () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#22 0x0270af18 in kpuexCallback () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#23 0x03e5ee23 in ttcdrv () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#24 0x03e193b8 in nioqwa () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#25 0x03e041e5 in upirtrc () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#26 0x03e0ea60 in kpurcsc () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#27 0x03e08be5 in kpuexec () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#28 0x03e04bbe in OCIStmtExecute () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#29 0x0249aba2 in oci_stmt_execute (stmt=0xac8a6b4) at /home/benny/downloads/php-5.3.3/ext/pdo_oci/oci_statement.c:144
#30 0x023f18ba in zim_PDOStatement_execute (ht=1, return_value=0xac5ebe8, return_value_ptr=0x0, this_ptr=0xac5eb44,
 [2012-06-23 09:32 UTC] hswong3i at gmail dot com
When developing Drupal 7.x pdo_oci driver (https://github.com/hswong3i/oci) I face this bug too.

Once review with latest patch + cleanup + combo patch with https://bugs.php.net/patch-display.php?bug_id=57702&patch=57702-PHP-5.4-20120623.patch&revision=latest, the segfault no longer exists on 5.4.5-dev (20120623) + Ubuntu 12.04.

may someone apply this patch and get it fixed?
 [2012-06-24 13:05 UTC] hswong3i at gmail dot com
Sorry for using legacy patch contribute style... Renew as pull request at Github:
* https://github.com/php/php-src/pull/118
 [2012-06-26 22:40 UTC] sixd@php.net
-Package: Oracle related +Package: PDO related
 [2012-10-26 05:54 UTC] sixd@php.net
-Assigned To: sixd +Assigned To:
 [2013-01-14 20:37 UTC] lstrojny@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: lstrojny
 [2013-01-14 20:37 UTC] lstrojny@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.4, 5.5 and master branches.
 [2016-03-08 01:28 UTC] sixd@php.net
-Package: PDO related +Package: PDO OCI
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC