swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.47k stars 3.16k forks source link

ProcessFactory::end() (ERRNO 1005): session#6 does not exists,达梦数据库 #5379

Closed Jackfinal closed 4 months ago

Jackfinal commented 5 months ago

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error. 自己写了一个达梦数据库驱动,根据oracle改造的,命令行 直接运行没有问题,放到hyperf里,直接就有这个 session#6 does not exists 报错 https://gitee.com/jackfinal/hyperf-database-dm.git

  2. What did you expect to see? 不影响系统运行,看着像关闭数据,关闭不了,能给点思路吗?

  3. What did you see instead?

报错信息 `[2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::dispatch(:155): push and notify one: 1719197807.160323 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): pop 1 event: 1719197807.160336 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): no event: 1719197807.160369 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::dispatch(:155): push and notify one: 1719197807.160400 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): pop 1 event: 1719197807.160404 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): no event: 1719197807.160450 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::dispatch(:155): push and notify one: 1719197807.160504 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): pop 1 event: 1719197807.160511 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): no event: 1719197807.160545 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::dispatch(:155): push and notify one: 1719197807.160575 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): pop 1 event: 1719197807.160581 [2024-06-24 10:56:47 9037.11] DEBUG ThreadPool::create_thread(:241): no event: 1719197807.160621 [2024-06-24 10:56:47 9037.11] TRACE ProcessFactory::end() (ERRNO 1005): session#5 does not exists [2024-06-24 10:56:47 9036.10] TRACE ProcessFactory::end() (ERRNO 1005): session#6 does not exists [2024-06-24 10:56:57 $9016.0] WARNING Server::check_worker_exit_status(): worker(pid=9035, id=9) abnormal exit, status=0, signal=11 A bug occurred in Swoole-v5.1.0, please report it. The Swoole developers probably don't know about it, and unless you report it, chances are it won't be fixed. You can read How to report a bug doc before submitting any bug reports:

https://github.com/swoole/swoole-src/blob/master/.github/ISSUE.md Please do not send bug reports in the mailing list or personal letters. The issue page is also suitable to submit feature requests.

OS: Linux 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 GCC_VERSION: 4.8.5 20150623 (Red Hat 4.8.5-44) OPENSSL_VERSION: OpenSSL 1.0.2k-fips 26 Jan 2017 PHP_VERSION : 8.1.13

[INFO] Worker#9 started. [WARNING] WebSocket: fd[3] does not exist. [WARNING] WebSocket: fd[3] does not exist. `

  1. What version of Swoole are you using (show your php --ri swoole)?

`swoole

Swoole => enabled Author => Swoole Team team@swoole.com Version => 5.1.0 Built => Jun 24 2024 10:28:34 coroutine => enabled with boost asm context debug => enabled trace_log => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.0.2k-fips 26 Jan 2017 http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.2.7 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608`

  1. What is your machine environment used (show your uname -a & php -v & gcc -v) ?

Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux PHP 8.1.13 (cli) (built: Dec 1 2022 16:29:48) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.13, Copyright (c) Zend Technologies

使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper 目标:x86_64-redhat-linux 配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux 线程模型:posix gcc 版本 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

php -m [PHP Modules] bcmath Core ctype curl date dm dom fileinfo filter ftp gd gettext hash iconv igbinary intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO PDO_DM pdo_mysql pdo_sqlite pdo_sqlsrv Phar posix redis Reflection session shmop SimpleXML soap sockets sodium SPL sqlite3 ssh2 standard swoole sysvsem tokenizer xml xmlreader xmlwriter zip zlib

[Zend Modules]

pdo_DM 就是dm的数据库扩展

NathanFreeman commented 5 months ago

php -m看一下扩展列表

Jackfinal commented 5 months ago

@NathanFreeman pdo_DM 就是dm的数据库扩展

NathanFreeman commented 5 months ago

不是看这个,看所有的扩展列表

Jackfinal commented 5 months ago

我刚改了问题内容,你刷新一下 问题内容 @NathanFreeman

NathanFreeman commented 5 months ago

DEBUG和TREACE都是调试信息,下面的进程退出是个问题,看看是不是开启了协程,是的话尝试关闭。 或者用gdb和valgrind调试一下进程信息

Jackfinal commented 5 months ago

关于段错误(核心转储)

这个调试,有详细的教程吗?看不太懂。。我gdb -p 进程后,进程就跑不了。。。

NathanFreeman commented 5 months ago

你要通过http请求,触发一下问题代码

wheakerd commented 5 months ago

hyperf 需要 session 的组件,

composer require hyperf/session

see: https://hyperf.wiki/3.1/#/zh-cn/session?id=session-%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86

matyhtf commented 4 months ago

使用 USE_ZEND_ALLOC=0 valgrind --log-file=/tmp/valgrind.log php your_file.php 跟踪程序的运行