Bug #77955 [Com]: Random segmentation fault in mysqlnd from php-fpm

From: Date: Wed, 22 May 2019 18:42:22 +0000
Subject: Bug #77955 [Com]: Random segmentation fault in mysqlnd from php-fpm
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220948@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77955&edit=1

 ID:                 77955
 Comment by:         syslogbeta at gmail dot com
 Reported by:        victoria at sharksmedia dot dk
 Summary:            Random segmentation fault in mysqlnd from php-fpm
 Status:             Assigned
 Type:               Bug
 Package:            PDO MySQL
 Operating System:   CentOS 7.6.1810
 PHP Version:        7.3.4
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

Any updates on that?


Previous Comments:
------------------------------------------------------------------------
[2019-05-19 17:56:25] peku33 at gmail dot com

Is there any update on this issue? I'm facing the same problems on debian buster, after
upgrading from php7.2 to php7.3. I can observe this from ~january (after switching to 7.3.1) up to
now with latest PHP 7.3.4-2.

Random segfaults are reported by the php-fpm:
[15808956.997420] php-fpm7.3[26936]: segfault at 7f1bc4c01018 ip 00007f1bd35fd7c5 sp
00007ffccc7f6f70 error 4 in mysqlnd.so[7f1bd35e9000+1e000]
[15808956.999217] Code: 00 00 00 00 00 41 54 55 53 48 8b 1f 48 85 db 74 58 8b 47 14 49 89 fc 48 8d
2c 80 48 c1 e5 05 48 01 dd eb 38 90 48 85 db 74 2b <48> 8b 3b 48 c7 43 48 00 00 00 00 48 c7 83
90 00 00 00 00 00 00 00
[15809230.166757] php-fpm7.3[26977]: segfault at 7f1bc5401018 ip 00007f1bd35fd7c5 sp
00007ffccc7f6f70 error 4 in mysqlnd.so[7f1bd35e9000+1e000]
[15809230.177642] Code: 00 00 00 00 00 41 54 55 53 48 8b 1f 48 85 db 74 58 8b 47 14 49 89 fc 48 8d
2c 80 48 c1 e5 05 48 01 dd eb 38 90 48 85 db 74 2b <48> 8b 3b 48 c7 43 48 00 00 00 00 48 c7 83
90 00 00 00 00 00 00 00

------------------------------------------------------------------------
[2019-05-10 05:48:31] victoria at sharksmedia dot dk

Are there any way i can help?

------------------------------------------------------------------------
[2019-05-07 14:24:52] victoria at sharksmedia dot dk

(gdb) up
#1  mysqlnd_mysqlnd_res_meta_free_pub (meta=0x7f492977a718) at
/usr/src/debug/php-7.3.4/ext/mysqlnd/mysqlnd_result_meta.c:106
106				php_mysqlnd_free_field_metadata(fields++);
(gdb) up
#2  0x00007f49392c3daa in mysqlnd_mysqlnd_res_free_result_contents_internal_pub
(result=0x7f492977a048) at /usr/src/debug/php-7.3.4/ext/mysqlnd/mysqlnd_result.c:300
300			result->meta->m->free_metadata(result->meta);
(gdb) p result->meta
$1 = (MYSQLND_RES_METADATA *) 0x7f492977a718
(gdb) p *result->memory_pool.arena
$2 = {ptr = 0x7f492977a188 "pK,9I\177", end = 0x7f492977de80 "\001", prev = 0x0}
(gdb)

------------------------------------------------------------------------
[2019-05-07 14:20:19] dmitry@php.net

Nikita, I can't create a script to confirm your idea.
Victoria, please check this by printing data.

(gdb) up
(gdb) up
(gdb) p result->meta
(gdb) p *result->memory_pool.arena

------------------------------------------------------------------------
[2019-05-07 13:19:28] victoria at sharksmedia dot dk

(gdb) up
#1  mysqlnd_mysqlnd_res_meta_free_pub (meta=0x7f492977a718) at
/usr/src/debug/php-7.3.4/ext/mysqlnd/mysqlnd_result_meta.c:106
106				php_mysqlnd_free_field_metadata(fields++);
(gdb) p *meta
$1 = {fields = 0x7f4929401018, m = 0x7f49394e1080 <mysqlnd_mysqlnd_res_meta_methods>,
current_field = 0, field_count = 159}
(gdb) p i
$2 = <optimized out>
(gdb) p meta.fields[0]
Cannot access memory at address 0x7f4929401018
(gdb) p meta.fields[i-1]
value has been optimized out
(gdb)

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77955


--
Edit this bug report at https://bugs.php.net/bug.php?id=77955&edit=1


Thread (25 messages)

« previous php.bugs (#220948) next »