[php-src] Issue #13339: php-fpm SIGABRT when pg_connect() called with host parameter
| From: | ianthrive | Date: | Tue, 06 Feb 2024 18:43:56 +0000 |
| Subject: | [php-src] Issue #13339: php-fpm SIGABRT when pg_connect() called with host parameter | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246420@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13339
Author: ianthrive
### Description
It does not happen if
host=localhost is removed from the pg_connect()
call.
Happens in 8.2 and 8.3. Does NOT happen in 8.1.
---
The following code:
```php
<?php
$c = pg_connect('host=localhost user=ian dbname=ipb');
print("done\n");
```
Resulted in this output:
```
[06-Feb-2024 11:04:49.029619] DEBUG: pid 85554, fpm_pctl_perform_idle_server_maintenance(), line
382: [pool www] currently 0 active children, 0 spare children
[06-Feb-2024 11:04:49.392539] DEBUG: pid 85554, fpm_children_make(), line 430: blocking signals
before child birth
[06-Feb-2024 11:04:49.395351] DEBUG: pid 85554, fpm_children_make(), line 454: unblocking signals,
child born
[06-Feb-2024 11:04:49.395602] DEBUG: pid 85554, fpm_children_make(), line 460: [pool www] child
85609 started
[06-Feb-2024 11:04:49.395736] DEBUG: pid 85554, fpm_pctl_on_socket_accept(), line 553: [pool www]
got accept without idle child available .... I forked
[06-Feb-2024 11:04:49.395882] DEBUG: pid 85554, fpm_event_loop(), line 435: event module triggered 1
events
[06-Feb-2024 11:04:49.413857] DEBUG: pid 85554, fpm_got_signal(), line 82: received SIGCHLD
[06-Feb-2024 11:04:49.416453] DEBUG: pid 85554, fpm_event_loop(), line 435: event module triggered 1
events
[06-Feb-2024 11:04:49.417548] WARNING: pid 85554, fpm_children_bury(), line 281: [pool www] child
85609 exited on signal 6 (SIGABRT) after 0.021964 seconds from start
[06-Feb-2024 11:04:49.417756] DEBUG: pid 85554, fpm_children_make(), line 430: blocking signals
before child birth
[06-Feb-2024 11:04:49.421868] DEBUG: pid 85554, fpm_children_make(), line 454: unblocking signals,
child born
[06-Feb-2024 11:04:49.422117] NOTICE: pid 85554, fpm_children_make(), line 460: [pool www] child
85611 started
[06-Feb-2024 11:04:50.031248] DEBUG: pid 85554, fpm_pctl_perform_idle_server_maintenance(), line
382: [pool www] currently 0 active children, 1 spare children
```
But I expected this output instead:
```
done
```
---
```
% uname -a
Darwin ian.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023;
root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64
```
```
% sw_vers -ProductVersion
14.1.2
```
```
/opt/local/bin/php83 -v
PHP 8.3.2 (cli) (built: Jan 26 2024 23:59:55) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.2, Copyright (c) Zend Technologies
% /opt/local/bin/php81 -v
PHP 8.1.27 (cli) (built: Jan 9 2024 01:07:36) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies
```
```
% otool -L /opt/local/lib/php83/extensions/no-debug-non-zts-20230831/pgsql.so
/opt/local/lib/php83/extensions/no-debug-non-zts-20230831/pgsql.so:
/opt/local/lib/postgresql15/libpq.5.dylib (compatibility version 5.0.0, current version 5.15.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)
% otool -L /opt/local/lib/php81/extensions/no-debug-non-zts-20210902/pgsql.so
/opt/local/lib/php81/extensions/no-debug-non-zts-20210902/pgsql.so:
/opt/local/lib/postgresql15/libpq.5.dylib (compatibility version 5.0.0, current version 5.15.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)```
### PHP Version
8.3.2, 8.2.15, 8.1.27
### Operating System
macOS 14.1.2