mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2017-06-22, 14:56   #144
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

277410 Posts
Default Building prpserver on linux

I am in the process of moving my prpserver to a new VM as my provider is increasing the cost of using the older VM infrastructure. The main change that would be apparent to prpnet is an upgrade from Ubuntu 14.04 to 16.04. Note that I have not yet upgraded prpnet to the latest version and thus I am still using prpnet 5.0.8. I am seeing a significant number of socket communication issues which I was not seeing with the old VM. I have switched on socket communcation debugging in the server to make the issue more apparent.

Code:
[2017-06-22 13:03:45 UTC] 5: client connecting from 217.155.207.5
[2017-06-22 13:03:45 UTC] 5: received [FROM david@amphoria.co.uk titan amphoria 5.0.4 RPS]
[2017-06-22 13:03:45 UTC] 5: sending [Connected to server 5.0.8 3]
[2017-06-22 13:03:45 UTC] 6: client connecting from 217.155.207.5
[2017-06-22 13:03:45 UTC] 5: received [RETURNWORK 5.0.4]
[2017-06-22 13:03:45 UTC] 6: received [FROM david@amphoria.co.uk titan amphoria 5.0.4 RPS]
[2017-06-22 13:03:45 UTC] 6: sending [Connected to server 5.0.8 3]
[2017-06-22 13:03:45 UTC] 5: received [WorkUnit: 4023*2^2015900-1 1498133436]
[2017-06-22 13:03:45 UTC] 5: received [Start Child 4023*2^2015900-1]
[2017-06-22 13:03:45 UTC] 5: received [Main Test: 0 E3AB5549B07EE43E llr64.exe 3.8.13 na na 1584.583000]
[2017-06-22 13:03:45 UTC] 5: received [End Child 4023*2^2015900-1]
[2017-06-22 13:03:45 UTC] 5: received [End of WorkUnit: 4023*2^2015900-1 1498133436]
[2017-06-22 13:03:45 UTC] 5: 4023*2^2015900-1 received by Email: david@amphoria.co.uk  User: amphoria  Client: titan  Program: llr64.exe  Residue: E3AB5549B07EE43E  
[2017-06-22 13:03:45 UTC] 5: sending [INFO: Test for 4023*2^2015900-1 was accepted]
[2017-06-22 13:03:46 UTC] 6: received [RETURNWORK 5.0.4]
[2017-06-22 13:03:46 UTC] 5: received [WorkUnit: 4035*2^2015900-1 1498133436]
[2017-06-22 13:03:46 UTC] 5: received [Start Child 4035*2^2015900-1]
[2017-06-22 13:03:46 UTC] 5: received [Main Test: 0 17856208E1D2488D llr64.exe 3.8.13 na na 1601.923000]
[2017-06-22 13:03:46 UTC] 5: received [End Child 4035*2^2015900-1]
[2017-06-22 13:03:46 UTC] 5: received [End of WorkUnit: 4035*2^2015900-1 1498133436]
[2017-06-22 13:03:46 UTC] 5: 4035*2^2015900-1 received by Email: david@amphoria.co.uk  User: amphoria  Client: titan  Program: llr64.exe  Residue: 17856208E1D2488D  
[2017-06-22 13:03:46 UTC] 5: sending [INFO: Test for 4035*2^2015900-1 was accepted]
[2017-06-22 13:03:46 UTC] 6: received [WorkUnit: 4011*2^2015901-1 1498133447]
[2017-06-22 13:03:46 UTC] 6: received [Start Child 4011*2^2015901-1]
[2017-06-22 13:03:46 UTC] 6: received [Main Test: 0 9850F8BF4C0B5E78 llr64.exe 3.8.13 na na 1595.967000]
[2017-06-22 13:03:46 UTC] 6: received [Enof WorkUnit: 4011*2901-1]
[2017-06-22 13:03:46 UTC] 6: Could not parse [Enof WorkUnit: 4011*2901-1]
[2017-06-22 13:03:46 UTC] 6: sending [ERROR:  Test for 4011*2^2015901-1 was rejected.  The server could not parse the message]
[2017-06-22 13:03:46 UTC] david@amphoria.co.uk (titan): Rejected test on 4011*2^2015901-1 due to a parsing error
[2017-06-22 13:03:46 UTC] 6: received [End of WorkUnit: 4011*2^2015901-1 1498133447]
[2017-06-22 13:03:46 UTC] 6: received [End of Message]
[2017-06-22 13:03:46 UTC] 6: sending [INFO: 0 of 1 test results were accepted]
[2017-06-22 13:03:46 UTC] 6: sending [End of Message]
[2017-06-22 13:03:46 UTC] 6: closing socket
[2017-06-22 13:03:46 UTC] 5: received [End of Message]
[2017-06-22 13:03:46 UTC] 5: sending [INFO: All 2 test results were accepted]
[2017-06-22 13:03:46 UTC] 5: sending [End of Message]
[2017-06-22 13:03:46 UTC] 5: closing socket
The parsing errors are being caused by characters being dropped - in the case of the example above from the End of WorkUnit command. Does anyone have any ideas what may be causing these dropped characters?

As I am using a rather old version of prpnet i decided that the next step should be upgrading to the latest version as this may fix the issue. However I get the following errors when prpserver is linked.

Code:
HTMLGeneratorFactory.o: In function `MultiFactorialHTML::MultiFactorialHTML(globals_t*)':
/home/david/prpnet-code/source/MultiFactorialHTML.h:10: undefined reference to `vtable for MultiFactorialHTML'
HTMLGeneratorFactory.o: In function `WagstaffHTML::WagstaffHTML(globals_t*)':
/home/david/prpnet-code/source/WagstaffHTML.h:10: undefined reference to `vtable for WagstaffHTML'
StatsUpdaterFactory.o: In function `MultiFactorialStatsUpdater::MultiFactorialStatsUpdater()':
/home/david/prpnet-code/source/MultiFactorialStatsUpdater.h:7: undefined reference to `vtable for MultiFactorialStatsUpdater'
StatsUpdaterFactory.o: In function `WagstaffStatsUpdater::WagstaffStatsUpdater()':
/home/david/prpnet-code/source/WagstaffStatsUpdater.h:7: undefined reference to `vtable for WagstaffStatsUpdater'
Compilation proceeded without errors with some tweaks to the makefile and changing a variable type of boolean to bool. My knowledge of C++ is insufficient to determine what the issue is here. It is complaining about, for instance, the constructor in the following code from MultiFactorialHTML.h.

Code:
#ifndef _MultiFactorialHTML_

#define _MultiFactorialHTML_

#include "PrimeHTMLGenerator.h"

class MultiFactorialHTML : public PrimeHTMLGenerator
{
public:
   MultiFactorialHTML(globals_t *theGlobals) : PrimeHTMLGenerator(theGlobals) {};

private:
   void     ServerStats(void);
};

#endif // #ifndef _MultiFactorialHTML_
amphoria is offline   Reply With Quote
Old 2017-06-22, 15:18   #145
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

16DD16 Posts
Default

What is the build currently complaining about?

I'll build tonight on my Mac and see if I get any errors.
rogue is offline   Reply With Quote
Old 2017-06-22, 19:16   #146
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

277410 Posts
Default

Assuming that you are referring to the build of 5.4.3 to which the link errors refer, then it is complaining about undefined references to vtables. Having googled this I am none the wiser.

For context I have included the output from the entire link phase below.

Code:
david@TETHYS:~/prpnet-code/source$ make prpserver
g++ -o prpserver prpserver.o Log.o ABCParser.o LengthCalculator.o \
DBInterface.o SQLStatement.o SharedMemoryItem.o ServerThread.o HelperThread.o WorkSender.o WorkReceiver.o PrimeWorkSender.o WWWWWorkSender.o PrimeWorkReceiver.o WWWWWorkReceiver.o PrimeHelperThread.o WWWWHelperThread.o CandidateTestResult.o KeepAliveThread.o HTMLGeneratorFactory.o PrimeHTMLGenerator.o CullenWoodallHTML.o SierpinskiRieselHTML.o FixedBKCHTML.o FixedBNCHTML.o GFNHTML.o XYYXHTML.o PrimorialHTML.o FactorialHTML.o SophieGermainHTML.o WWWWHTMLGenerator.o CyclotomicHTML.o GenericHTML.o HTMLGenerator.o CarolKyneaHTML.o StatsUpdaterFactory.o StatsUpdater.o FactorialStatsUpdater.o PrimorialStatsUpdater.o FixedBKCStatsUpdater.o FixedBNCStatsUpdater.o GFNStatsUpdater.o SierpinskiRieselStatsUpdater.o CullenWoodallStatsUpdater.o SophieGermainStatsUpdater.o PrimeStatsUpdater.o WWWWStatsUpdater.o XYYXStatsUpdater.o CyclotomicStatsUpdater.o GenericStatsUpdater.o CarolKyneaStatsUpdater.o Socket.o ServerSocket.o MailSocket.o HelperSocket.o ServerHelperFactory.o PrimeServerHelper.o WWWWServerHelper.o MailFactory.o Mail.o PrimeMail.o WWWWMail.o -lpthread -lodbc -lstdc++
HTMLGeneratorFactory.o: In function `MultiFactorialHTML::MultiFactorialHTML(globals_t*)':
/home/david/prpnet-code/source/MultiFactorialHTML.h:10: undefined reference to `vtable for MultiFactorialHTML'
HTMLGeneratorFactory.o: In function `WagstaffHTML::WagstaffHTML(globals_t*)':
/home/david/prpnet-code/source/WagstaffHTML.h:10: undefined reference to `vtable for WagstaffHTML'
StatsUpdaterFactory.o: In function `MultiFactorialStatsUpdater::MultiFactorialStatsUpdater()':
/home/david/prpnet-code/source/MultiFactorialStatsUpdater.h:7: undefined reference to `vtable for MultiFactorialStatsUpdater'
StatsUpdaterFactory.o: In function `WagstaffStatsUpdater::WagstaffStatsUpdater()':
/home/david/prpnet-code/source/WagstaffStatsUpdater.h:7: undefined reference to `vtable for WagstaffStatsUpdater'
collect2: error: ld returned 1 exit status
makefile:72: recipe for target 'prpserver' failed
make: *** [prpserver] Error 1
Ubuntu 16.04 comes with gcc 5.4.0. Note that I switched the link order around in the makefile so that LFLAGS_SERVER comes at the end, otherwise I get even more undefined references during the link phase.
amphoria is offline   Reply With Quote
Old 2017-06-22, 20:30   #147
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3×1,951 Posts
Default

The list of objects to link into the server does not include the new classes. Update the list of objects in HTMLOBJECTS and STATSOBJECTS in the makefile to include the objects for the new classes.
rogue is offline   Reply With Quote
Old 2017-06-22, 21:39   #148
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3·1,951 Posts
Default

I had some updates that were not committed. Please do a get latest. Hopefully they will address the problems you're running into.
rogue is offline   Reply With Quote
Old 2017-06-23, 12:51   #149
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

53268 Posts
Default

Thanks Mark, that worked. Sometimes the obvious is staring you in the face but you still miss it!

It will take me a while to implement the upgrade to 5.4.3 because I need to update LLR to the latest version as well as the changes to prpnet. At least I assume that is the case, because I had deferred updating LLR due to the format of the results changing which required the newer version of prpnet.

The number of parsing errors that I am getting with prpserver 5.0.8 has reduced considerably since I turned socket communication debugging on. Now down to one every 2 hours or so rather than dozens per hour. This could imply that it is some type of strange timing issue. I am slowly increasing the number of clients accessing the server again in case it is a loading issue.
amphoria is offline   Reply With Quote
Old 2017-06-23, 13:21   #150
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

16DD16 Posts
Default

Quote:
Originally Posted by amphoria View Post
Thanks Mark, that worked. Sometimes the obvious is staring you in the face but you still miss it!

It will take me a while to implement the upgrade to 5.4.3 because I need to update LLR to the latest version as well as the changes to prpnet. At least I assume that is the case, because I had deferred updating LLR due to the format of the results changing which required the newer version of prpnet.

The number of parsing errors that I am getting with prpserver 5.0.8 has reduced considerably since I turned socket communication debugging on. Now down to one every 2 hours or so rather than dozens per hour. This could imply that it is some type of strange timing issue. I am slowly increasing the number of clients accessing the server again in case it is a loading issue.
When you have a chance, e-mail me the logs that show the parsing errors. I will need both client and server logs.
rogue is offline   Reply With Quote
Old 2017-06-23, 16:17   #151
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

2×19×73 Posts
Default

Ok I will need to turn on socket communication debugging in the clients in order to give you the best information and then leave it to run for 24 hours or so.

I will probably do the upgrade to 5.4.3 over the weekend as it appears to be easier than I thought. I kept a copy of the the database upgrade script from prpnet 5.2, and I have been able to get updated clients and LLR software from PrimeGrid. Thanks go to PrimeGrid for a useful resource.
amphoria is offline   Reply With Quote
Old 2017-06-23, 16:31   #152
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

2×19×73 Posts
Default

In the end I didn't have to wait that long as one of the clients started producing errors straight away after restarting after I have enabled socket logging. I have emailed a zip file to you which includes a truncated server log file and the client log file from this client.

Last fiddled with by amphoria on 2017-06-23 at 16:50
amphoria is offline   Reply With Quote
Old 2020-03-30, 17:01   #153
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

3×1,951 Posts
Default

Quote:
Originally Posted by amphoria View Post
In the end I didn't have to wait that long as one of the clients started producing errors straight away after restarting after I have enabled socket logging. I have emailed a zip file to you which includes a truncated server log file and the client log file from this client.
Although I haven't debugged this issue from a more than two years ago, I did see it myself recently. I think I know how to reproduce it, but haven't taken the time to do so because I'm focused on other things.

I have updated the SVN repository to address a crash in the client which can occur when the client is configured to get a lot of workunits at one time. I have also updated the server to improve performance on Sierpinski/Riesel servers when one uses the onekperinstance flag. If anyone needs a build, let me know.
rogue is offline   Reply With Quote
Old 2020-07-05, 08:31   #154
Happy5214
 
Happy5214's Avatar
 
"Alexander"
Nov 2008
The Alamo City

25·11 Posts
Default

Jean released LLR 3.8.24 yesterday (https://www.mersenneforum.org/showthread.php?t=25701), and Riesel prime tests now default to PRP, only running an LLR test if the PRP test passes. I can't upgrade my PRPNet client's LLR version, even though it would benefit from the added error checking, because it would render the old LLR residues already on the servers incompatible with the new PRP residues which the program would generate. Would there be a way to make PRPNet compatible with LLR 3.8.24? I'd imagine it would need to distinguish PRP residues from LLR residues in the DB.
Happy5214 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PSP goes prpnet ltd Prime Sierpinski Project 86 2012-06-06 02:30
PRPNet 4.0.0 Released rogue Software 84 2011-11-16 21:20
PRPNet 4.0.1 Released Joe O Sierpinski/Riesel Base 5 1 2010-10-22 20:11
PRPNet 3.0.0 Released rogue Conjectures 'R Us 220 2010-10-12 20:48
PRPNet released! rogue Conjectures 'R Us 250 2009-12-27 21:29

All times are UTC. The time now is 08:34.

Thu Aug 13 08:34:08 UTC 2020 up 5:09, 0 users, load averages: 1.93, 1.90, 1.92

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

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.
A copy of the license is included in the FAQ.