Closed mcisho closed 5 years ago
I think I might know what's going on... Let me look into it and I'll get back to you.
@mcisho
Ian,
I of course cannot be 100% certain (since I've mentioned many times before that in all the years I've been working with Hercules I have personally never been able to get Hercules networking working on Linux), BUT ...
... I believe the following patch should fix your problem:
--- hyperion-1/hercifc.c 2019-08-03 15:41:15.075313300 -0700
+++ hyperion-0/hercifc.c 2019-08-15 14:33:47.195041500 -0700
@@ -26,6 +26,9 @@
#include "hercules.h"
#include "hercifc.h"
+#define UTILITY_NAME "hercifc"
+#define UTILITY_DESC "Hercules Network Interface Configuration Program"
+
// --------------------------------------------------------------------
// HERCIFC program entry point
// --------------------------------------------------------------------
@@ -48,6 +51,8 @@
UNREFERENCED( argc );
+ INITIALIZE_UTILITY( UTILITY_NAME, UTILITY_DESC, &pszProgName );
+
DROP_PRIVILEGES(CAP_NET_ADMIN);
pszProgName = strdup( argv[0] );
--- hyperion-1/hthreads.c 2019-08-03 15:41:15.106513400 -0700
+++ hyperion-0/hthreads.c 2019-08-15 13:58:04.315000600 -0700
@@ -191,7 +191,7 @@
break;
}
- /* If needed, alloacte a new ILOCK structure for this lock */
+ /* If needed, allocate a new ILOCK structure for this lock */
if (&locklist == ple)
{
The problem (the cause of the crash) was that hthreads was never getting initialized. The above code (which you should see in every Hercules utility) performs standard utility initialization, which includes initializing hthreads.
Please let me know whether the above patch fixes your problem or not. If it does, I'll go ahead and commit the change and then close this issue. Otherwise I'm going to need to scratch my head some more.
Thanks.
(and sorry about that! I completely forgot about hercifc
!)
Problem fixed. Thanks.
Next time you need to do something with Linux networking let me know and we'll see if we can get it working.
Fixed by commit 1f8fa07f3b3dab695620b5dbeabbca5e4c3ada45. Closing.
My host is: Fedora 30 x86_64.
I have two Hercules on the system, Hercules 3.13 which in installed from an rpm and which I never (knowingly) use, and SDL Hercules 4.n (currently commit de63b92cf82e35233f47361c61283237b912c358) which I make from source and use regularly. Since pre-configured interfaces became available, I have run Hercules 4.n without privileges, and as a result regularly see message
HHC00166E
issued byhercifc
.In the process of attempting to reproduce #230, I discovered that the 4.3 hercifc was experiencing a Segmentation fault when issuing message
HHC00166E
. It appears that all of those regularly seenHHC00166E
messages had been issued by the 3.13hercifc
!The simplest way to demonstrate the problem is to execute
hercifc
from the command line, the results of which are shown in the following gdb back trace: