Skip to content
New issue

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

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

Already on GitHub? # to your account

db_dump seg faults if STATSEXPORT is not enabled #2958

Closed
drivere opened this issue Jan 12, 2019 · 5 comments · Fixed by #2974
Closed

db_dump seg faults if STATSEXPORT is not enabled #2958

drivere opened this issue Jan 12, 2019 · 5 comments · Fixed by #2974

Comments

@drivere
Copy link

drivere commented Jan 12, 2019

Describe the bug
db_dump crashes with a seg fault if STATSEXPORT is not enabled. This results in stats not being exported.

Steps To Reproduce
With STATSEXPORT disabled, from the project bin directory, run db_dump:
./db_dump -d 4 -dump_spec ../db_dump_spec.xml

Expected behavior
If STATSEXPORT is disabled, I would expect db_dump to work like it used to before the latest GDPR code was added.

System Information

  • OS: Linux Ubuntu 4.15.0-42
  • BOINC Version: 7.15.0 (server version 1.0.0)

Additional context
Here is the output of db_dump if STATSEXPORT is disabled (in case its useful):
2
2019-01-11 10:07:35.5384 db_dump starting
2019-01-11 10:07:35.5403 Starting
query: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
query: select count(*) from user WHERE total_credit > 0 AND authenticator NOT LIKE 'deleted%'
query: select sum(total_credit) from user WHERE total_credit > 0 AND authenticator NOT LIKE 'deleted%'
query: select * from consent_type where shortname = 'STATSEXPORT'
query: select * from user WHERE total_credit > 0 AND authenticator NOT LIKE 'deleted%'

@drivere
Copy link
Author

drivere commented Jan 21, 2019

The seg fault is now happening again, even with STATSEXPORT enabled. I assume there is a problem in one of my tables that surfaced again after a user enabled the stats export.

So this issue should be put on hold until I gather more information.

@davidpanderson
Copy link
Contributor

Can you run db_dump under gdb and see where it's crashing.
i.e., do
./configure CXXFLAGS="-g"
in the build process, then
gdb db_dump

@drivere
Copy link
Author

drivere commented Jan 22, 2019

Yes, I can do that. It will be a couple days before I find the time, but I will post back here with the info.

@drivere
Copy link
Author

drivere commented Jan 22, 2019

I found the problem. Didn't need the debugger after all. The problem is in function write_user in file db_dump.cpp. On about line 582, the function call f->write has one too many arguments. The user.country argument needs to be removed (the country tag is written out later)

I'm not sure how to proceed at this point, as I am not familiar with the process here, so maybe someone else can make this fix and get it into the baseline?

@ChristianBeer
Copy link
Member

This issues was introduced with #2906 specifically commit ff91f05 on Dec 17 2018 so they are not part of a server release. The last server release (1.0.3) was on Dec 10 2018. I'm going to create a PR as a hotfix for this issue so it can be merged into master fast.

ChristianBeer added a commit that referenced this issue Jan 22, 2019
One too many argument for write function. Introduced in ff91f05.

Fixes #2958
@AenBleidd AenBleidd added this to the Server Release 1.2.0 milestone Aug 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants