pakon-heavy-guts issueshttps://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues2020-11-12T02:23:39+01:00https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/7Unit tests2020-11-12T02:23:39+01:00Ghost UserUnit testsSome of the modules are a bit complex and would benefit from few unit tests. This doesn't aim for 100% coverage, but for an aid in debugging and developing.
Some more tests to cover:
- [x] spe
- [x] worker
- [x] likely parts of the u...Some of the modules are a bit complex and would benefit from few unit tests. This doesn't aim for 100% coverage, but for an aid in debugging and developing.
Some more tests to cover:
- [x] spe
- [x] worker
- [x] likely parts of the util modulehttps://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/12MAC address cache2020-11-12T02:23:38+01:00Ghost UserMAC address cacheAs the nfqueue doesn't provide MAC addresses in many cases, we want to cache the IP→MAC mapping and provide it when we don't have a better source.As the nfqueue doesn't provide MAC addresses in many cases, we want to cache the IP→MAC mapping and provide it when we don't have a better source.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/11Track the connection state2020-11-12T02:23:38+01:00Ghost UserTrack the connection stateBasically, we want to detect when a TCP connection is closed.Basically, we want to detect when a TCP connection is closed.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/14Find a usable DNS library2020-11-12T02:23:38+01:00Ghost UserFind a usable DNS libraryWe need to be able to look into the DNS packets. So having a library we throw a buffer into and it gives us list of records in it.We need to be able to look into the DNS packets. So having a library we throw a buffer into and it gives us list of records in it.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/16Docs update2020-11-12T02:23:38+01:00Ghost UserDocs updateSome changes were made, bring the documentation up to date.
This includes documenting the configuration syntax and listing what items are present in the json output. Also mention the encoding issues.Some changes were made, bring the documentation up to date.
This includes documenting the configuration syntax and listing what items are present in the json output. Also mention the encoding issues.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/6Ensure the stack size when pushing multiple values2020-11-12T02:23:38+01:00Ghost UserEnsure the stack size when pushing multiple valuesMake sure we can push any number of values to lua in the `lua_convert` module. That means zero is possible, but also make sure there's enough space on the stack. The check is done in call of function, but not when, for example, returning...Make sure we can push any number of values to lua in the `lua_convert` module. That means zero is possible, but also make sure there's enough space on the stack. The check is done in call of function, but not when, for example, returning parameters or pushing many values for some other reason.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/13Ringbuffer logger2020-11-12T02:23:38+01:00Ghost UserRingbuffer loggerHave a ringbuffer logger that puts messages to memory and outputs them either on request or on big problems (exception killing a thread, segfault…).
Think about performance ‒ if it is to be turned on by default, on what level, if we wou...Have a ringbuffer logger that puts messages to memory and outputs them either on request or on big problems (exception killing a thread, segfault…).
Think about performance ‒ if it is to be turned on by default, on what level, if we would have one buffer for each thread or shared, etc.
This'll help debugging problems, like #2.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/4Restart lost threads2020-11-12T02:23:38+01:00Ghost UserRestart lost threadsIf a thread gets terminated because of an exception, send the info to the main thread and restart it there (or reload or something).If a thread gets terminated because of an exception, send the info to the main thread and restart it there (or reload or something).https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/18Segfault in parsing DNS names2020-11-12T02:23:38+01:00Ghost UserSegfault in parsing DNS namesIt seems it is illegal for `this` to be `NULL` and the compiler is allowed to optimize the check out from inside the function.
```
55 Name ParsedName::toOwned() const {
56 Name result;
57 const ParsedName ...It seems it is illegal for `this` to be `NULL` and the compiler is allowed to optimize the check out from inside the function.
```
55 Name ParsedName::toOwned() const {
56 Name result;
57 const ParsedName *label = this;
58 while (label) {
59 result.labels_.emplace_back(label->label_.begin(), label->label_.end());
60 /*
61 * Convert the from the shared_ptr to a raw pointer (more
62 * convenient for local manipulation and without performance
63 * penalties for all the atomic reference counters).
(gdb) print label
$3 = (const Pakon::DNS::ParsedName *) 0x0
```
The segfault happens on line 59, directly below the check.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/9Better logging2018-01-10T14:54:48+01:00Ghost UserBetter loggingAllow the logging to be actually configured (at compile time or run time). Allow different locations, like syslog, or memory buffer dumped on crash.Allow the logging to be actually configured (at compile time or run time). Allow different locations, like syslog, or memory buffer dumped on crash.https://gitlab.nic.cz/turris/pakon-heavy-guts/-/issues/1socat runs at 100% CPU forever2017-03-24T09:53:30+01:00Stéphane Bortzmeyersocat runs at 100% CPU foreverAfter the Turris Omnia starts, a socat process runs at 100 % CPU forever, until I kill it.
```
|top]
Mem: 197080K used, 834580K free, 1576K shrd, 1472K buff, 61300K cached
CPU: 5% usr 45% sys 0% nic 50% idle 0% io 0% irq 0%...After the Turris Omnia starts, a socat process runs at 100 % CPU forever, until I kill it.
```
|top]
Mem: 197080K used, 834580K free, 1576K shrd, 1472K buff, 61300K cached
CPU: 5% usr 45% sys 0% nic 50% idle 0% io 0% irq 0% sirq
Load average: 1.11 1.04 0.97 2/135 8419
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
4689 3104 root R 2656 0% 50% socat STDIO OPENSSL:api.turris.cz:567
...
root@turris:~# ps w|grep socat
4689 root 2656 R socat STDIO OPENSSL:api.turris.cz:5679,cafile=/etc/ssl/ucollect-server.pem,cipher=HIGH:!LOW:!MEDIUM:!SSLv
5015 root 2744 S socat STDIO OPENSSL:api.turris.cz:5679,cafile=/etc/ssl/ucollect-server.pem,cipher=HIGH:!LOW:!MEDIUM:!SSLv
8429 root 1076 R grep socat
```
As a result, the Omnia is hot:
```
root@turris:~# sensors
armada_thermal-virtual-0
Adapter: Virtual device
temp1: +87.0°C
```
`kill -KILL` is necessary to kill the runaway socat process. Temperature then becomes more reasonable.
```
root@turris:~# sensors
armada_thermal-virtual-0
Adapter: Virtual device
temp1: +76![turris-and-crazy-socat](/uploads/960476486f299437cf19167baa8b773b/turris-and-crazy-socat.png).5°C
```
I attach a graph of system load after startup (which the drop after I killed the process)
Note it has been reported on the forum
https://discourse.labs.nic.cz/t/big-load-socat-stdio-openssl-api-turris-cz-5679/1141 but I do not know of the Omnia developers are reading the forum? Anyway, as of today, the bug is still present.
Device Turris Omnia - RTROM01
Serial number [redacted]
Turris OS version 3.2.1
Kernel version 4.4.13-05df79f63527051ea0071350f86faf76-8
Sending of uCollect data Online (status updated 6 seconds ago)
Sending of firewall logs Online (status updated 481 seconds ago)