Posts by Thomas

1) Message boards : API : Inconsistent Trickle Down Message Behavior (Message 68322)
Posted 16 Mar 2016 by Thomas
Post:
Hi James,

Thanks so much for the reply! The buffer size sounds like a good place to look. Do you mind expanding on what you mean by "holding the thread back with sleep"? Specifically I would be curious to understand the causal chain of consequences this has - I have been treating boinc-sleep essentially as the system "sleep" command. Is there a more BOINC-idiomatic approach to implementing my busy wait routine?
2) Message boards : API : Inconsistent Trickle Down Message Behavior (Message 68027)
Posted 27 Feb 2016 by Thomas
Post:
Hi all,

I would like to add trickle_down message handling to my app. I am experiencing some strange and sporadic behavior from my implementation (I used https://boinc.berkeley.edu/trac/wiki/TrickleApi, as well as uc2.cpp and trickle_echo.cpp to help me complete it). I would like the app to send a trickle_up message, and then have it "echoed" back to the app from the server. It looks like the trickle_up message and the trickle handler are working, at least from what I can see in the database. Around 50% of the time, the trickle_down message never reaches the app. In the times that my app DOES pick up a trickle_down message, it reads something like this:

trickle_ (19655):


when the message in the database's "msg_to_host" is:

<trickle_down>

      <result_name>test_app_nodelete_0</result_name>
      <time>1456539574</time>
what am I?
</trickle_down>


To receive the trickle_down message I have created a loop which periodically polls for the presence of a reply. I've included that code below. As it is written now, it will very often timeout, but if I remove the timeout the system simply hangs indefinitely every other time I run it.

int retrieve_trickle_reply(char* reply) {
    int retval, i = 0;
    char buf[256];

    // Poll periodically until trickle recieved or timeout
    retval = boinc_receive_trickle_down(reply, sizeof(reply));
    while (!retval && i < TIMEOUT) {
        boinc_sleep(POLL_IVAL);
        retval = boinc_receive_trickle_down(reply, sizeof(reply));
        ++i;
    }

    fprintf(stderr, "%s i count is: %d\n",
        boinc_msg_prefix(buf, sizeof(buf)), i
    );

    fprintf(stderr, "%s reply is: %s\n",
        boinc_msg_prefix(buf, sizeof(buf)), reply
    );

    if (i == TIMEOUT) {
        return 1;
    }

    return 0;
}


Any ideas? Another note: I know that in uc2.cpp the return value of "boinc_receive_trickle_down" is treated as if "0" is a reply and any other value is "no reply". Looking at the source code I am fairly confident that it is the other way around. In any case I have tried both interpretations and neither works.

Thanks!
Thomas
3) Message boards : API : Trickle Up Messages not Sending to Server (Message 67580)
Posted 6 Feb 2016 by Thomas
Post:
Thank you Christian. The vboxwrapper.cpp is good reference material and I will continue to use if for other endeavors as well. It turns out that my own test app simply didn't take enough time to execute for the trickle messages to get picked up.

Thanks again!
4) Message boards : API : Trickle Up Messages not Sending to Server (Message 67567)
Posted 6 Feb 2016 by Thomas
Post:
Hi all,

I'm not sure how to move forward with this. I wanted to test out the "trickle messages" API, but it looks like trickle up messages are never leaving the client. During computation, when monitoring the "slot" directory, I notice that "trickle_up.xml" is created, but it never seems to be copied over the the "project" directory on the client (as I understand is the normal flow of things). Additionally, no messages reach the handler I wrote on the server, and no messages show up in the database. There isn't any activity in the server-side trickle logs, and I'm not seeing anything relevant in any of the client logs (though it's less clear where to look so I may have missed something / am still looking over everything on that end).

An additional oddity: trickle_up.xml, as it appears in the slots directory, only ever contains the <variety> tag, but does not include the text body of the message.

To implement the trickle up messages I essentially just followed the instructions on this page:
https://boinc.ssl.berkeley.edu/trac/wiki/TrickleApi.

Any help or direction would be greatly appreciated!
5) Message boards : Server programs : Disable SELinux (Message 67095)
Posted 23 Jan 2016 by Thomas
Post:
I noticed that it's very briefly mentioned in the instructions for building a BOINC server from scratch that SELinux should be disabled. Is this absolutely necessary? How come? I am trying to create a BOINC server in a Docker container, which I believe require SELinux to operate correctly (not 100% sure!).




Copyright © 2023 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.