php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14860 PHP segfault in mysql driver
Submitted: 2002-01-04 17:14 UTC Modified: 2003-05-24 01:20 UTC
Votes:17
Avg. Score:4.4 ± 1.1
Reproduced:14 of 15 (93.3%)
Same Version:12 (85.7%)
Same OS:2 (14.3%)
From: aleigh at tessier dot com Assigned: zak (profile)
Status: No Feedback Package: MySQL related
PHP Version: 4.1.1 OS: Solaris 8
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-01-04 17:14 UTC] aleigh at tessier dot com
Running PHP under continuity (pthread based), and serving 
phpMyAdmin 2.2.2, connecting remotely to a 3.23.47 mysql 
database.

The server randomly crashes(trace below), but not always. 
The seg fault doesn't seem to be related to load, length of 
server operation, etc. It can crash on the 1st or 80th load 
of a phpMyAdmin page, but is fairly reproducable. If the 
server is restarted, may operate normally right away or it 
may not. 

Backtrace:

current thread: t@15
=>[1] _db_return_(_line_ = 167U, _sfunc_ = 0xfdefa014, 
_sfile_ = 0xfdefa010, _slevel_ = 0xfdefa00c), line 827 in 
"dbug.c"
  [2] vio_read(vio = 0x210ec8, buf = 0x2ba220 "^C", size = 
4), line 167 in "violite.c"
  [3] my_real_read(net = 0x2ba018, complen = 0xfdefa11c), 
line 457 in "net.c"
  [4] my_net_read(net = 0x2ba018), line 603 in "net.c"
  [5] net_safe_read(mysql = 0x2ba018), line 288 in 
"libmysql.c"
  [6] mysql_real_connect(mysql = 0x2ba018, host = 0x2c6140 
"sugar.makintosh.com", user = 0x2777a8 "phpbugs", passwd = 
0x257c58 "phpbugs", db = (nil), port = 3306U, unix_socket = 
(nil), client_flag = 8325U), line 1517 in "libmysql.c"
  [7] php_mysql_do_connect(ht = 3, return_value = 0x211038, 
this_ptr = (nil), return_value_used = 1, tsrm_ls = 
0x11c058, persistent = 0), line 646 in "php_mysql.c"
  [8] zif_mysql_connect(ht = 3, return_value = 0x211038, 
this_ptr = (nil), return_value_used = 1, tsrm_ls = 
0x11c058), line 698 in "php_mysql.c"
  [9] execute(op_array = 0x192370, tsrm_ls = 0x11c058), 
line 1590 in "zend_execute.c"
  [10] execute(op_array = 0x17bce8, tsrm_ls = 0x11c058), 
line 2133 in "zend_execute.c"
  [11] zend_execute_scripts(type = 8, tsrm_ls = 0x11c058, 
retval = (nil), file_count = 3, ...), line 814 in "zend.c"
  [12] php_execute_script(primary_file = 0xfdf05b28, 
tsrm_ls = 0x11c058), line 1307 in "main.c"
  [13] capi_module_main(request_context = 0x121830, tsrm_ls 
= 0x11c058), line 411 in "capi.c"
  [14] php4_execute(t = 0xb0348, opts = 0x3f058), line 456 
in "capi.c"
  [15] dlFtransaction_process(class = 4, t = 0xb0348), line 
336 in "dl.c"
  [16] disFhttp_handler(p = 0xb0348), line 69 in 
"dispatch.c"
  [17] thrFthread(arg = 0xb0218), line 281 in "tpool.c"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-12 09:25 UTC] biancardi at xware dot it
I'am having the same problem using apache2 and latest cvs.
I see that ext/mysql/libmysql/
is always compiled with #define UNDEF_THREADS_HACK
so producing a non thread safe mysql builtin library.

Not using the builtin libmysql this problem is solved.

Don't know if it's the same for win32 builds.

I also noticed that build this libmysql the debug code
is not turned off definig DBUG_OFF (?), is this intented ?
 [2002-02-28 14:20 UTC] ronen at greyzone dot com
We've had the same exact problem - specifically with mysql_fetch_array(), and with the exact same symptoms.  Not predictable, random occurance, etc'.

We're running PHP 4.1.1 as a static build for Apache 1.3.22 on RedHat Linux 6.1.  MySQL version is 3.23.42
 [2002-04-03 14:25 UTC] ronen at greyzone dot com
This bug may be related to #16272.

Ronen.
 [2002-07-07 22:05 UTC] sniper@php.net
This should be fixed in CVS, so please try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

 [2002-09-17 01:45 UTC] zak@php.net
Assigning all open mysql bugs to myself for 4.3 QA cycle. 
 [2003-05-24 01:20 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-06-04 08:18 UTC] falcon at kaktos dot co dot il
uhmm, we exprience a somewhat similar bug.
http://bugs.php.net/bug.php?id=28296
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 01:03:38 2021 UTC