2018-12-30 16:43:04 -08:00
|
|
|
---
|
2023-11-25 09:50:24 -08:00
|
|
|
title: Troubleshooting
|
2018-12-30 16:43:04 -08:00
|
|
|
---
|
2023-11-25 09:50:24 -08:00
|
|
|
# Troubleshooting
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### Where To File
|
|
|
|
|
|
2019-01-09 23:42:54 -08:00
|
|
|
Please creates a [New Issue on GitHub](https://github.com/fluffos/fluffos/issues?direction=desc&milestone=none&sort=popularity&state=open).
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### Bug Report content
|
|
|
|
|
|
|
|
|
|
Please be sure to include these in your bug report.
|
|
|
|
|
|
2019-01-09 23:42:54 -08:00
|
|
|
- The version number, driver will output this on start.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
- The full output, the driver will at least print out some backtrace or error message. Include those.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
- If you can, try to narrow down to a small LPC program that reproduce the
|
|
|
|
|
problem easily. If you can not, Try using Valgrind method first.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
## GDB
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
If you have met an crash, the driver should automatically print out an list of backtrace, but sometime that doesn't really contain enough information.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
If you want to catch the crash, try running driver under GDB directly
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2020-12-10 16:42:33 -08:00
|
|
|
```shell
|
2026-01-27 11:03:21 -05:00
|
|
|
$ gdb --args driver <arguments>
|
2020-12-10 16:42:33 -08:00
|
|
|
|
|
|
|
|
then in GDB prompt
|
|
|
|
|
> handle SIGPIPE nostop noprint pass
|
|
|
|
|
> run
|
|
|
|
|
```
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2026-01-27 11:03:21 -05:00
|
|
|
Or all at once
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
$ gdb -ex "handle SIGPIPE nostop noprint pass" -ex "run" --args driver <arguments>
|
|
|
|
|
```
|
|
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
and when you met an crash, do this
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2020-12-10 16:42:33 -08:00
|
|
|
```shell
|
|
|
|
|
> bt
|
|
|
|
|
> info locals
|
|
|
|
|
```
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
and paste the result to your issue!
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
### Sanitizer
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
Most of the crashing bug is actually caused by previous silent memory corruption, which it is very hard to detect.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
The currently preferred way to detect any sort of memory corruption is to use Sanitizer, that way you catch the
|
|
|
|
|
problem when it happens, not when it causes other problems. However it mostly only works under Linux.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
Here is how you should generate a bug report with Sanitizer.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
Build driver in sanitizer enabled mode
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2020-12-10 16:42:33 -08:00
|
|
|
```shell
|
2026-01-27 11:03:21 -05:00
|
|
|
cmake .. -DENABLE_SANITIZER=ON
|
2020-12-10 16:42:33 -08:00
|
|
|
```
|
2026-01-27 11:03:21 -05:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
Launch driver as usual
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2020-12-10 16:42:33 -08:00
|
|
|
```shell
|
2026-01-27 11:03:21 -05:00
|
|
|
./driver <args>
|
2020-12-10 16:42:33 -08:00
|
|
|
```
|
2018-12-30 16:43:04 -08:00
|
|
|
|
2019-11-16 22:16:27 -08:00
|
|
|
Login to your lib as usual, do something fishy.
|
|
|
|
|
|
|
|
|
|
(it will be slow, that is okay) You may also have to relax your `maximum eval cost` setting, if necessary. When
|
|
|
|
|
Valgrind halts and prints out a backtrace with `Invalid read of size 1`, or `Invalid write of size 1`, save the entire stack trace.
|