• Linux Build woes

    From Mortifis@VERT/ALLEYCAT to All on Monday, October 22, 2018 09:51:03
    Platform: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

    An amd x64 PC running Raspbian X86_64 PC. Synchronet compiles without error using make RELEASE=1 DOSEMU=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185

    When I run sudo /sbbs/exec/sbbs I get 'Segmentation Fault' I believe it is because it is because it is amd x64 ... is there a way for the build to compile as 32bit? ie gcc -m32 ... and if yes where does one set that flag?

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Digital Man@VERT to Mortifis on Monday, October 22, 2018 11:42:42
    Re: Linux Build woes
    By: Mortifis to All on Mon Oct 22 2018 09:51 am

    Platform: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

    An amd x64 PC running Raspbian X86_64 PC. Synchronet compiles without error using make RELEASE=1 DOSEMU=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185

    When I run sudo /sbbs/exec/sbbs I get 'Segmentation Fault'

    Can you capture a provide a backtrace? http://wiki.synchro.net/howto:gdb

    I believe it is
    because it is because it is amd x64 ...

    Why do you believe that? Is there some known problem with native compiled apps on that platform?

    is there a way for the build to
    compile as 32bit? ie gcc -m32 ... and if yes where does one set that flag?

    Certainly there is a way, but we don't have cross-compilation built-into the Synchronet build system - so it's not trivial to do. The best way to build a 32-bit version of sbbs is to build it in a 32-bit environment. But I'm skeptical that that is the issue here.

    digital man

    Synchronet/BBS Terminology Definition #9:
    CR = Carriage Return (ASCII 13, Ctrl-M)
    Norco, CA WX: 67.7øF, 76.0% humidity, 0 mph ENE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Monday, October 22, 2018 19:30:12
    Re: Linux Build woes
    By: Mortifis to All on Mon Oct 22 2018 09:51 am

    Platform: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

    An amd x64 PC running Raspbian X86_64 PC. Synchronet compiles without error using make RELEASE=1 DOSEMU=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185

    When I run sudo /sbbs/exec/sbbs I get 'Segmentation Fault'

    Can you capture a provide a backtrace? http://wiki.synchro.net/howto:gdb


    output from sudo gdb /sbbs/exec/sbbs

    [Threads: 8 Sockets: 4 Clients: 0 Served: 0 Errors: 0] (?=Help):
    Thread 8 "sbbs/webServer" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf3dffb40 (LWP 22256)]
    0xf7e3fc86 in aes_encrypt_key128 ()
    from /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libsbbs.so


    I believe it is
    because it is because it is amd x64 ...

    Why do you believe that? Is there some known problem with native compiled apps on that platform?

    I have no valid reason to believe that, was just an assumption :) In the past 18 or so years I have never encountered a problem build SBBS, including sbbsctrl on windows with Borland, or on Slackware Linux, or on a Rasperry Pi under Raspbian, but lately on a PC under any Deb9.5 Flavour ... hmmm ... I will keep trying for SAG just for debugging ... eventually I will just boot Slack/sbbs and be happy :)

    is there a way for the build to
    compile as 32bit? ie gcc -m32 ... and if yes where does one set that flag?

    Certainly there is a way, but we don't have cross-compilation built-into the Synchronet build system - so it's not trivial to do. The best way to build a 32-bit version of sbbs is to build it in a 32-bit environment. But I'm skeptical that that is the issue here.

    digital man

    Good answer, I have always lived by the moto "if you have to force it, it isn't meant to be" :)

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Digital Man@VERT to Mortifis on Monday, October 22, 2018 22:58:30
    Re: Re: Linux Build woes
    By: Mortifis to Digital Man on Mon Oct 22 2018 07:30 pm

    Re: Linux Build woes
    By: Mortifis to All on Mon Oct 22 2018 09:51 am

    Platform: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

    An amd x64 PC running Raspbian X86_64 PC. Synchronet compiles without error using make RELEASE=1 DOSEMU=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185

    When I run sudo /sbbs/exec/sbbs I get 'Segmentation Fault'

    Can you capture a provide a backtrace? http://wiki.synchro.net/howto:gdb


    output from sudo gdb /sbbs/exec/sbbs

    [Threads: 8 Sockets: 4 Clients: 0 Served: 0 Errors: 0] (?=Help):
    Thread 8 "sbbs/webServer" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf3dffb40 (LWP 22256)]
    0xf7e3fc86 in aes_encrypt_key128 ()
    from /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libsbbs.so

    Okay, that crash is in cryptlib, a 3rd party crypto library which we use for SSH/SSL/TLS and which gets patched before we build and link the library. Anyway, you can probably avoid that particular crash point by disabling SSL/TLS in the web server by remove ALLOW_TLS from the [web] Options in your ctrl/sbbs.ini file. It may crash at some other point in cryptlib and you may need to disable TLS support for services or the mail server as well. See what happens after disabling it in the web server first.

    digital man

    Synchronet "Real Fact" #40:
    Synchronet has been ported to FreeBSD, NetBSD, OpenBSD, Solaris, QNX, and MacOS.
    Norco, CA WX: 60.2øF, 89.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Tuesday, October 23, 2018 09:05:48
    Re: Re: Linux Build woes
    By: Mortifis to Digital Man on Mon Oct 22 2018 07:30 pm

    [Threads: 8 Sockets: 4 Clients: 0 Served: 0 Errors: 0] (?=Help): Thread 8 "sbbs/webServer" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf3dffb40 (LWP 22256)]
    0xf7e3fc86 in aes_encrypt_key128 ()
    from /sbbs/src/sbbs3/gcc.linux.x64.lib.release/libsbbs.so

    Okay, that crash is in cryptlib, a 3rd party crypto library which we use for SSH/SSL/TLS and which gets patched before we build and link the library. Anyway, you can probably avoid that particular crash point by disabling SSL/TLS in the web server by remove ALLOW_TLS from the [web] Options in your ctrl/sbbs.ini file. It may crash at some other point in cryptlib and you may need to disable TLS support for services or the mail server as well. See what happens after disabling it in the web server first.

    digital man

    That worked, Thank you.

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Digital Man@VERT to Mortifis on Tuesday, October 23, 2018 09:58:37
    Re: Re: Linux Build woes
    By: Mortifis to Digital Man on Tue Oct 23 2018 09:05 am

    Okay, that crash is in cryptlib, a 3rd party crypto library which we use for SSH/SSL/TLS and which gets patched before we build and link the library. Anyway, you can probably avoid that particular crash point by disabling SSL/TLS in the web server by remove ALLOW_TLS from the [web] Options in your ctrl/sbbs.ini file. It may crash at some other point in cryptlib and you may need to disable TLS support for services or the mail server as well. See what happens after disabling it in the web server first.

    That worked, Thank you.

    Okay. That's interesting and kind of scary too. If your distro has a cryptlib(-dev) package, it might be better to install that package and link with that library instead - but if you don't care about HTTPS, then you might be fine with the way things are now.

    digital man

    Synchronet/BBS Terminology Definition #21:
    FF = Form Feed (ASCII 12, Ctrl-L)
    Norco, CA WX: 66.4øF, 82.0% humidity, 2 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Tuesday, October 23, 2018 17:03:35
    Re: Re: Linux Build woes
    By: Mortifis to Digital Man on Tue Oct 23 2018 09:05 am

    Okay, that crash is in cryptlib, a 3rd party crypto library which we use for SSH/SSL/TLS and which gets patched before we build and link the library. Anyway, you can probably avoid that particular crash point by disabling SSL/TLS in the web server by remove ALLOW_TLS from the [web] Options in your ctrl/sbbs.ini file. It may crash at some other point in cryptlib and you may need to disable TLS support for services or the mail server as well. See what happens after disabling it in the web server first.

    That worked, Thank you.

    Okay. That's interesting and kind of scary too. If your distro has a cryptlib(-dev) package, it might be better to install that package and link with that library instead - but if you don't care about HTTPS, then you might be fine with the way things are now.

    digital man

    I will have a look at it later when I do a weekly rebuild. I am replying herre via the build on the x64 PC I was having woes with, seems to be working good as a service. Will look at getting some DOS doors running under dosemu so I will be giving your wiki a good workout :)

    Thanks DM

    ---
    þ Synchronet þ Twisted Truckers BBS Dartmouth, Nova Scotia Canada
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Wednesday, October 24, 2018 09:18:44
    Re: Re: Linux Build woes
    By: Mortifis to Digital Man on Tue Oct 23 2018 09:05 am

    Okay, that crash is in cryptlib, a 3rd party crypto library which we use for SSH/SSL/TLS and which gets patched before we build and link the library. Anyway, you can probably avoid that particular crash point by disabling SSL/TLS in the web server by remove ALLOW_TLS from the [web] Options in your ctrl/sbbs.ini file. It may crash at some other point in cryptlib and you may need to disable TLS support for services or the mail server as well. See what happens after disabling it in the web server first.

    That worked, Thank you.

    Okay. That's interesting and kind of scary too. If your distro has a cryptlib(-dev) package, it might be better to install that package and link with that library instead - but if you don't care about HTTPS, then you might be fine with the way things are now.

    digital man

    Noticed now that sbbs crashes often, it runs as a service so it does restart itself, I ran cat /var/log/syslog 2>&1 | grep segfault | tee /sbbs/segfault.log which now shows dozens of entries like:

    Oct 24 06:27:29 pos-x64-pc kernel: [4539125.848688] sbbs/pop3[9478]: segfault at f9fda829 ip 00000000f763ac86 sp 00000000eeff9960 error 6 in libsbbs.so[f73d0000+3a0000]

    Any ideas, other than not trying to use that POS PC :-P

    ---
    þ Synchronet þ Twisted Truckers BBS Dartmouth, Nova Scotia Canada
  • From Digital Man@VERT to Mortifis on Wednesday, October 24, 2018 09:07:20
    Re: Re: Linux Build woes
    By: Mortifis to Digital Man on Wed Oct 24 2018 09:18 am

    Noticed now that sbbs crashes often, it runs as a service so it does restart itself, I ran cat /var/log/syslog 2>&1 | grep segfault | tee /sbbs/segfault.log which now shows dozens of entries like:

    Oct 24 06:27:29 pos-x64-pc kernel: [4539125.848688] sbbs/pop3[9478]: segfault at f9fda829 ip 00000000f763ac86 sp 00000000eeff9960 error 6 in libsbbs.so[f73d0000+3a0000]

    Any ideas, other than not trying to use that POS PC :-P

    It's most likely another crash in cryptlib, since there appears to be something wrong with the cryptlib build on that system. If you get a backtrace (from gdb) and share it, I could possibly help you avoid the problem, but it's not a real solution if you want the full functionality of sbbs.

    digital man

    Synchronet "Real Fact" #66:
    Synchronet was conceived of and mostly developed in southern California.
    Norco, CA WX: 63.9øF, 87.0% humidity, 1 mph SW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net