github swoole/swoole-src v6.1.5

7 hours ago

🐛 Bug Fixes

  • Fixed a crash issue when users manually suspend coroutines in a multithreaded environment
  • Fixed the issue where the System::socket_poll() function incorrectly closed sockets after failing to add events
  • Fixed decompression failure in WebSocket when compressing message frames, caused by certain server environments not supporting MAX_MEM_LEVEL=9
  • Fixed data reception errors in WebSocket when receiving consecutive compressed data frames, caused by the buffer not being cleared in time
  • Fixed the data race issue in the pdo_oci coroutine client when processing non-PDO_PARAM_LOB data

⭐️ Optimizations

  • In Http Server, when developers set the Content-Encoding header, Swoole will no longer automatically compress the response body. Instead, developers need to implement compression logic themselves and output the corresponding content.

🗑 Removals

  • Removed the PDO::sqliteCreateAggregate(), PDO::sqliteCreateCollation(), and PDO::sqliteCreateFunction() functions in the coroutine environment. Their implementation principle involves calling PHP functions as callbacks in the sqlite3 engine, which is only feasible in single-threaded synchronous blocking mode. In Swoole coroutine mode, the C functions of sqlite3 need to run in asynchronous AIO threads. In the ZTS version, this can cause null pointer reads, while in the NTS version, it may lead to data race issues and occasional crashes.
  • Removed support for the open_basedir setting in the pdo_sqlite coroutine client. It is unsafe to read PG(open_basedir) in a multithreaded environment. Ensure that the sqlite3 database file path is a constant or other safe path. Do not use user input parameters as part of the sqlite database file path.

🐛 Bug修复

  • 修复多线程环境下用户手动挂起协程的崩溃问题
  • 修复System::socket_poll()函数添加事件失败后,错误关闭套接字的问题
  • 修复WebSocket 压缩消息帧时部分服务器环境不支持MAX_MEM_LEVEL=9导致解压失败的问题
  • 修复WebSocket接收解压格式连续数据帧时,因缓冲区未及时清空而导致后续数据接收错误的问题
  • 修复pdo_oci协程客户端处理非PDO_PARAM_LOB数据时的data race问题

⭐️ 优化

  • Http Server中,当开发者设置了Content-Encoding头部时,Swoole将不再对响应体进行自动压缩,而需要由开发者自行实现压缩逻辑并输出相应内容。

🗑 移除

  • 移除协程环境下PDO::sqliteCreateAggregate()PDO::sqliteCreateCollation()PDO::sqliteCreateFunction()函数,其实现原理是将PHP函数作为回调在sqlite3引擎中调用,这些特性仅在单线程同步阻塞模式中可用,而Swoole协程模式下,需要将sqlite3C函数置于异步的AIO线程中运行。在ZTS版本中会出现读取空指针,而在NTS下则会出现data race,引起偶发崩溃的问题
  • 移除pdo_sqlite协程客户端对open_basedir设置的支持,在多线程环境中无法安全读取PG(open_basedir),请务必保证sqlite3的数据库文件路径为常量或者其他安全的路径,不可使用用户输入的参数作为sqlite数据库文件路径的一部分

Don't miss a new swoole-src release

NewReleases is sending notifications on new releases.