Skip to content

Commit

Permalink
Update ISSUE (#4027)
Browse files Browse the repository at this point in the history
* Update ISSUE

* Fix typo
  • Loading branch information
sy-records authored Jan 25, 2021
1 parent 91ef1ec commit 78a86c8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
24 changes: 12 additions & 12 deletions .github/ISSUE-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

# 需知

当你觉得发现了一个Swoole内核的bug时, 请提出报告.
当你觉得发现了一个Swoole内核的BUG时, 请提出报告.
Swoole的内核开发者们或许还不知道问题的存在,
除非你主动提出报告, 否则BUG也许将很难被发现并修复,
你可以在[Github的issue区](https://github.com/swoole/swoole-src/issues)提出错误报告(即点击右上角绿色的`New issue`按钮), 这里的错误报告将会被最优先解决.
请不要在邮件列表或私人信件中发送错误报告, Github的issue区同样可以提出对于Swoole的任何要求与建议.
请不要在邮件列表或私人信件中发送错误报告, GitHub的issue区同样可以提出对于Swoole的任何要求与建议.

在你提交错误报告之前, 请先阅读以下的**如何提交错误报告**.

Expand Down Expand Up @@ -42,6 +42,16 @@ Please answer these questions before submitting your issue. Thanks!

其中, 最为关键的是提供**可稳定重现的简单脚本代码**, 否则你必须提供尽可能多的其它信息来帮助开发者判断错误原因

## 内存分析 (强烈推荐)

更多时候, Valgrind比gdb更能发现内存问题, 通过以下指令运行你的程序, 直到触发BUG

```shell
USE_ZEND_ALLOC=0 valgrind --log-file=/tmp/valgrind.log php xxx.php
```

* 当程序发生错误时, 可以通过键入 `ctrl+c` 退出, 然后上传 `/tmp/valgrind.log` 文件以便于开发组定位BUG.

## 关于段错误(核心转储)

此外, 在一种特殊情况下你可以使用调试工具来帮助开发者定位问题
Expand Down Expand Up @@ -77,13 +87,3 @@ gdb php /tmp/core.4596
```

将以上信息都贴在issue中

#### 内存分析 (强烈推荐)

更多时候, Valgrind比gdb更能发现内存问题, 通过以下指令运行你的程序, 直到触发BUG

```shell
USE_ZEND_ALLOC=0 valgrind --log-file=/tmp/valgrind.log php xxx.php
```

* 当程序发生错误时, 可以通过键入 `ctrl+c` 退出, 然后上传 `/tmp/valgrind.log` 文件以便于开发组定位BUG.
21 changes: 11 additions & 10 deletions .github/ISSUE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ Please answer these questions before submitting your issue. Thanks!
```
The most important thing is to provide a simple script for reproducing the error, otherwise, you must provide as much information as possible.

## Memory detection (recommended)

In addition to using `gdb` analysis, you can use the `valgrind` tool to check if the program is working properly.

```shell
USE_ZEND_ALLOC=0 valgrind --log-file=/tmp/valgrind.log php xxx.php
```

* After the program is executed to the wrong location, `ctrl+c` is interrupted, and upload the `/tmp/valgrind.log` file.

## CoreDump

Besides, In a special case, you can use debugging tools to help developers locate problems
Expand Down Expand Up @@ -60,16 +70,7 @@ Use the f command in gdb to view the code segment corresponding to the ID.
```

If there is no function call stack information, it may be that the compiler has removed the debug information. Please manually modify the `Makefile` file in the swoole source directory and modify CFLAGS to
```shell
CFLAGS = -Wall -pthread -g -O0
```

#### Memory detection (recommended)

In addition to using `gdb` analysis, you can use the `valgrind` tool to check if the program is working properly.

```shell
USE_ZEND_ALLOC=0 valgrind --log-file=/tmp/valgrind.log php xxx.php
CFLAGS = -Wall -pthread -g -O0
```

* After the program is executed to the wrong location, `ctrl+c` is interrupted, and upload the `/tmp/valgrind.log` file.

0 comments on commit 78a86c8

Please sign in to comment.