New Boinc version - very sparse event log

Message boards : Questions and problems : New Boinc version - very sparse event log
Message board moderation

To post messages, you must log in.

Previous · 1 · 2

AuthorMessage
Les Bayliss
Help desk expert

Send message
Joined: 25 Nov 05
Posts: 1654
Australia
Message 97772 - Posted: 17 Apr 2020, 1:08:01 UTC

Getting back on topic:

Richard
Perhaps the problem isn't in this "memset" routine, but in what calls it.
The input data may work for memset, but not for the replacement.
And a printf at the start may show what's wrong with the data.
ID: 97772 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97773 - Posted: 17 Apr 2020, 8:17:45 UTC - in response to Message 97772.  

Thanks for getting us back on topic - we could use some lateral thinking, or in-depth knowledge of C++, right now. Juha used to pop in at times like this, but I haven't seen him around for a while.

I think the proximate cause - removing memset - is probably an unnecessary red-herring. The original compiler warning - "clearing an object of non-trivial type ‘struct PCI_INFO’; use assignment or value-initialization instead" probably didn't need such drastic action (LOG_FLAGS is a simpler structure: we are initialising, not clearing).

"But the moving finger writes; and, having writ, moves on: nor all thy piety nor wit shall lure it back to cancel half a line, nor all thy tears wash out a word of it."
(Omar Khayyam).

So, we need a replacement that works, and that will pass the scrutiny of the gatekeeper of the code himself. Back of a postcard, anyone?
ID: 97773 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 97778 - Posted: 17 Apr 2020, 9:36:40 UTC - in response to Message 97773.  

Thanks for getting us back on topic - we could use some lateral thinking, or in-depth knowledge of C++, right now. Juha used to pop in at times like this, but I haven't seen him around for a while.
I've asked Jason to come take a look. You never know.
ID: 97778 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 97781 - Posted: 17 Apr 2020, 10:18:47 UTC

As for the bug, who else noticed that between 7.16 being sent out for testing and it being released to public, there was just 5 days? Testing April 3rd, Release April 8th. And then just two people who actually tested it. I don't think we ever had such a short time between testing and release, especially not during another worldwide crisis that would keep people occupied that way. I long for the days of Rom this way. He'd also have jumped on top of these reports and already released a client with a fix. If only for testing. But alas.
ID: 97781 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97782 - Posted: 17 Apr 2020, 11:05:09 UTC - in response to Message 97781.  

I have some (very slight) sympathy with David over this one. v7.16.5 was actually made available for download (for Windows only) towards the end of February. I noticed it, and downloaded it at the beginning of March. No announcement was made, but David later said that he was waiting for someone (himself?) to make a Mac build.

I tested it, but I was checking for fixes to the problems we already knew about. My machines already have cc_config.xml files, so this problem didn't show up - even when I deliberately went looking for it (I deleted the log flag entries in the file, not the file itself). I'm afraid I don't have the patience and mindset to go back to ground zero and test new releases on clean machines, as the very bureaucratic 'box ticking' alpha test regime requires. So I missed it. David's test strategy almost relies on a continual turnover of testers - old ones retire, new one arrive with new machines.

I do agree with you about missing Rom, though.
ID: 97782 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 97785 - Posted: 17 Apr 2020, 11:46:24 UTC - in response to Message 97782.  

I should've seen it, as I installed BOINC clean on my system and ran it bare bones for a while. But I don't run it every day and when I do, I don't check the messages every time. So I have missed it as well.

Got a message back from Jason, he's peeking in.
ID: 97785 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 97787 - Posted: 17 Apr 2020, 12:51:59 UTC
Last modified: 17 Apr 2020, 12:58:19 UTC

From Jason:

static const LOG_FLAGS x;
Should be in the class definition LOG_FLAGS, rather than inside LOG_FLAGS::init() ( but see later ** )
*this = x;
Won't then be needed, since static members are initialised with the class.

Other Notes on the patches over time:


  • memset indeed has different implementation by compiler / libraries, and many old 'bog standard' buffer manipulation things from back in the day are now considered 'unsafe' (meaning unreliable for our purposes). That's mostly to do with security and thread safety, since there are ways break, or break into, buffer manipulation type things, so fair enough they decided to change its use.
  • The static keyword has a different meaning inside a class definition. it's in the wrong place now, but when in the correct place in LOG_FLAGS definition it will just ensure there is one single LOGS_FLAGS structure, now matter how many times init is called.

Why isn't the code just put in

LOG_FLAGS::LOG_FLAGS() 
instead of
LOG_FLAGS::init()
?
    • (**) creating a static LOG_FLAGS structure within LOG_FLAGS may also be problematic, because a circular definition like that may start a recursive initialisation thing.
    • I would rename the existing flags structure definition to LOG_FLAGS_STRUCT (or similar), then create a LOG_FLAGS class with the static LOG_FLAGS_STRUCT as a member, alongside the constructor, init() and anything else rightly belonging within LOG_FLAGS that way LOG_FLAGS_STRUCT can be initialised once when the class is created (with zeroes), then tweaked in LOG_FLAGS::init() by putting:
    x.task = true;
    x.file_xfer = true;
    x.sched_ops = true;



Edit: and
Would have been nice if LOG_FLAGS were defined in log_flags.h/.cpp , but whatever, found it in cc_config.
Needs some minor rejigging so as not to have to change references to log flags elsewhere in the client. Having a look

Edit: And Richard in the CC. Easier to do it via email for now. :)
ID: 97787 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97789 - Posted: 17 Apr 2020, 13:08:55 UTC

Yes, I'm getting the copies now. Probably best not to interrupt the thought processes - I'll nip out for my allowed daily exercise (and pick up the newspaper), catch up when I get back.
ID: 97789 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 97791 - Posted: 17 Apr 2020, 13:29:16 UTC

Jason:
Simplest 'potential' fix I can think of, that won't require changing references to log_flags throughout the codebase. :
void LOG_FLAGS::init() {
	    static const LOG_FLAGS x;
	    *this = x;
                                                      // ...

becomes
static const LOG_FLAGS log_flag_defaults;

void LOG_FLAGS::init() {
	*this = log_flag_defaults;
                                                  // ...
ID: 97791 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97793 - Posted: 17 Apr 2020, 14:24:38 UTC - in response to Message 97791.  

But where would the actual defaults be set? In the STRUCT definition in the header, as in my second attempt yesterday? I think that might be in the narrow-column-formatted one, but it's hard to read. I'll switch to a development machine, and try it out.
ID: 97793 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15483
Netherlands
Message 97794 - Posted: 17 Apr 2020, 14:29:16 UTC

With
static const LOG_FLAGS log_flag_defaults;

being outside of the class definition, it 'should' be initialised with zeroes (as originally intended, but inside that LOG_FLAGS class member init(), it means a different thing than whoever put it there thought.)

If still no-go, can nix that log_flag_defaults static definition, and go to the definition of LOG_FLAGS instead (in cc_config.cpp?)
each line would then need to be made static and = 0;
example, in cc_config,h instead of .cpp :
//initialising in the .h, each member separately ... On by default

static task = true;
static file_xfer = true;
static sched_ops = true;

// off
 by default; intended for developers and testers
	 
   //
	 
  static bool android_debug = false;
	 
       // show Android-specific info (battery etc.)
	 
   static bool app_msg_receive;
	 
       // show shared-mem message from apps
	 
   static bool app_msg_send;

Avoiding the need for some defaults structure and anything worthwhile in init(), But that would be too 'normal'.
Alternatively (also more 'normal', but admittedly labourious/error-prone) would be to initialise them in the constructor (LOG_FLAGS::LOG_FLAGS() ) one by one.
ID: 97794 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97796 - Posted: 17 Apr 2020, 15:23:06 UTC - in response to Message 97791.  

Jason:
Simplest 'potential' fix I can think of, that won't require changing references to log_flags throughout the codebase. :
void LOG_FLAGS::init() {
	    static const LOG_FLAGS x;
	    *this = x;
                                                      // ...

becomes
static const LOG_FLAGS log_flag_defaults;

void LOG_FLAGS::init() {
	*this = log_flag_defaults;
                                                  // ...
Well, I've made that change, and set the three standard values to true as in post 97743

It seems to start OK with or without cc_config.xml, showing appropriate inital config report and Event Log messages; I can change settings through the GUI, and they work properly, too.

I'll try Linux next: what else do I need to test before I make a PR?
ID: 97796 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97797 - Posted: 17 Apr 2020, 16:02:30 UTC

And it seems to work in Linux, too:

Fri 17 Apr 2020 16:57:41 BST |  | cc_config.xml not found - using defaults
Fri 17 Apr 2020 16:57:41 BST |  | Starting BOINC client version 7.16.6 for x86_64-pc-linux-gnu
Fri 17 Apr 2020 16:57:41 BST |  | log flags: file_xfer, sched_ops, task
...
Fri 17 Apr 2020 16:58:57 BST |  | Re-reading cc_config.xml
Fri 17 Apr 2020 16:58:57 BST |  | Config: GUI RPC allowed from any host
Fri 17 Apr 2020 16:58:57 BST |  | Config: GUI RPCs allowed from:
Fri 17 Apr 2020 16:58:57 BST |  | Config: don't check file sizes
Fri 17 Apr 2020 16:58:57 BST |  | Config: don't use VirtualBox
Fri 17 Apr 2020 16:58:57 BST |  | Config: event log limit 3000 lines
Fri 17 Apr 2020 16:58:57 BST |  | log flags: file_xfer, sched_ops, task, sched_op_debug, unparsed_xml
I'll break for coffee, but it's looking good.
ID: 97797 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5082
United Kingdom
Message 97890 - Posted: 20 Apr 2020, 7:30:04 UTC

Well, Charlie has said some nice things about my proposed solution - but David is more interested in adding yet more new features than fixing the ones he broke. I despair sometimes.
ID: 97890 · Report as offensive
Bryn Mawr
Help desk expert

Send message
Joined: 31 Dec 18
Posts: 285
United Kingdom
Message 97891 - Posted: 20 Apr 2020, 7:43:56 UTC - in response to Message 97890.  

Well, Charlie has said some nice things about my proposed solution - but David is more interested in adding yet more new features than fixing the ones he broke. I despair sometimes.


That sounds pretty normal :-)
ID: 97891 · Report as offensive
Previous · 1 · 2

Message boards : Questions and problems : New Boinc version - very sparse event log

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.