Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in add_ch_to_localbuffer #507

Open
lluchs opened this issue Dec 9, 2021 · 1 comment
Open

Crash in add_ch_to_localbuffer #507

lluchs opened this issue Dec 9, 2021 · 1 comment

Comments

@lluchs
Copy link

lluchs commented Dec 9, 2021

vzlogger randomly crashed today:

#0  0x0053c2cc in Reading::deleted (this=0xb)
    at /home/lukas/.cache/yay/vzlogger-git/src/vzlogger/include/Reading.hpp:173
#1  0x0053b648 in add_ch_to_localbuffer (ch=...)
    at /home/lukas/.cache/yay/vzlogger-git/src/vzlogger/src/local.cpp:87
#2  0x005431ac in reading_thread (arg=0x15b3c80)
    at /home/lukas/.cache/yay/vzlogger-git/src/vzlogger/src/threads.cpp:140
#3  0xb6ee9f60 in start_thread () from /usr/lib/libpthread.so.0
#4  0xb6912cd8 in ?? () from /usr/lib/libc.so.6

The log showed connection errors shortly before the crash (at 06:12:11):

361050 [Dec 09 06:11:41][chn0] CURL: Couldn't connect to server                        
361051 [Dec 09 06:11:41][chn0] Waiting 30 secs for next request due to previous failure
361052 [Dec 09 06:11:41][chn1] CURL: Couldn't connect to server                        
361053 [Dec 09 06:11:41][chn1] Waiting 30 secs for next request due to previous failure

System is Arch Linux ARM (armv7l), vzlogger commit 037ab6b (current master).

@r00t-
Copy link
Contributor

r00t- commented Apr 4, 2022

	for (it = buf->begin(); it != buf->end(); ++it) {
		Reading &r = *it;
		if (!r.deleted()) {

https://github.com/volkszaehler/vzlogger/blob/master/src/local.cpp#L87
(the method then crashes dereferencing this->_deleted.)

i can't tell if it's expected that buf contains a null-entry,
but it would be trivial to add a check.

thanks for reporting, @lluchs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants