• core files not generated

    From Dumas Walker@VERT/CAPCITY2 to DIGITAL MAN on Saturday, January 13, 2018 13:46:00
    Moving and renaming this, since it is no longer about TW or JS.

    A non-debug core file can still be very useful and yes, there a various ways to
    instruct your system to allow core files to be created. Detailed here: >http://wiki.synchro.net/howto:gdb#core_file

    $ulimit -c
    unlimited

    /etc/sysctl.conf has the following two lines:

    kernel.core_uses_pid = 1
    kernel.core_pattern = /tmp/core.%e.%p

    I get the segfault and check /tmp. Nothing there.

    So, what package is it that a developer would have on their *nix box that probably doesn't come with a debian stable install that I need to install
    to get core files?

    Or maybe a more pertinent question... since sbbs has to be started with
    sudo in order to bind to port 23, how does one allow superuser to create
    core files? When I su to root, I get this:

    $ulimit -c
    0

    Which could be why sbbs does not create a core file... I don't think it is getting far enough to change the user back and, even if it were, I don't
    know that it would matter.

    Thanks!

    ---
    þ SLMR 2.1a þ "Mmmmmmmm.....doughnuts."
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Digital Man@VERT to Dumas Walker on Saturday, January 13, 2018 13:42:40
    Re: core files not generated
    By: Dumas Walker to DIGITAL MAN on Sat Jan 13 2018 01:46 pm

    Moving and renaming this, since it is no longer about TW or JS.

    A non-debug core file can still be very useful and yes, there a various ways to
    instruct your system to allow core files to be created. Detailed here: >http://wiki.synchro.net/howto:gdb#core_file

    $ulimit -c
    unlimited

    /etc/sysctl.conf has the following two lines:

    kernel.core_uses_pid = 1
    kernel.core_pattern = /tmp/core.%e.%p

    I get the segfault and check /tmp. Nothing there.

    If you're running sbbs as a service, then your service startup file (e.g. sbbs.service or init.d/sbbs file) may need the core limit adjusted there. There's a instructions on the gdb wiki page about that.

    So, what package is it that a developer would have on their *nix box that probably doesn't come with a debian stable install that I need to install
    to get core files?

    No such package.

    Or maybe a more pertinent question... since sbbs has to be started with
    sudo in order to bind to port 23, how does one allow superuser to create core files? When I su to root, I get this:

    $ulimit -c
    0

    You could put "ulimit -c unlimited" in your /root/.profile, but I don't think that's going to fix the problem (but you could try), unless you're running sbbs manually from a login shell as root.

    digital man

    Synchronet "Real Fact" #2:
    Synchronet version 2 for DOS and OS/2 was released to the public domain in 1997.
    Norco, CA WX: 78.8øF, 20.0% humidity, 6 mph SSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nelgin@VERT/EOTLBBS to Dumas Walker on Saturday, January 13, 2018 15:33:41
    On Sat, 13 Jan 2018 13:46:00 -0500, "Dumas Walker"
    <dumas.walker@VERT/CAPCITY2> wrote:

    Moving and renaming this, since it is no longer about TW or JS.

    A non-debug core file can still be very useful and yes, there a various ways to
    instruct your system to allow core files to be created. Detailed here: >>http://wiki.synchro.net/howto:gdb#core_file

    $ulimit -c
    unlimited

    /etc/sysctl.conf has the following two lines:

    kernel.core_uses_pid = 1
    kernel.core_pattern = /tmp/core.%e.%p

    I get the segfault and check /tmp. Nothing there.

    So, what package is it that a developer would have on their *nix box that >probably doesn't come with a debian stable install that I need to install
    to get core files?

    Or maybe a more pertinent question... since sbbs has to be started with
    sudo in order to bind to port 23, how does one allow superuser to create
    core files? When I su to root, I get this:

    $ulimit -c
    0

    Which could be why sbbs does not create a core file... I don't think it is >getting far enough to change the user back and, even if it were, I don't
    know that it would matter.

    Do ;SHELL in your bbs then ulimit -a

    You'll probably find it starts up without ulimit set.

    Are you using init.d or systemd to startup? There's hints on the wiki
    for what to put in the systemd startup script to set ulimit.

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From Dumas Walker@VERT/CAPCITY2 to DIGITAL MAN on Saturday, January 13, 2018 20:08:00
    If you're running sbbs as a service, then your service startup file (e.g. sbbs.service or init.d/sbbs file) may need the core limit adjusted there. There's a instructions on the gdb wiki page about that.

    I am not running it as a service. I am running it in console, from a shell script that I envoke with sudo.

    Or maybe a more pertinent question... since sbbs has to be started with sudo in order to bind to port 23, how does one allow superuser to create core files? When I su to root, I get this:

    $ulimit -c
    0
    You could put "ulimit -c unlimited" in your /root/.profile, but I don't think >that's going to fix the problem (but you could try), unless you're running sbbs
    manually from a login shell as root.

    You are correct, it does not fix it.

    It sounds sort of like someone running it in console, who has to use sudo to bind port 23, will never get a core file produced. If that is the case, what do they do when they get a segmentation fault?

    ---
    þ SLMR 2.1a þ "My eyeballs nearly popped out!"
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Dumas Walker@VERT/CAPCITY2 to NELGIN on Saturday, January 13, 2018 20:02:00
    Do ;SHELL in your bbs then ulimit -a

    You'll probably find it starts up without ulimit set.

    If it was actually running, and not failing to start because of a
    segmentation fault, that might work. :) As it is, I cannot do anything in
    the bbs.

    Are you using init.d or systemd to startup? There's hints on the wiki
    for what to put in the systemd startup script to set ulimit.

    There are hints, and I followed the ones for getting a core dumps if you
    are not starting the system as a service. They did not work and I suspect
    it is because I have to start the bbs by using sudo to run the script. Otherwise, the ports will not bind.

    ---
    þ SLMR 2.1a þ DALETECH - for all your home security needs!
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Dumas Walker@VERT/CAPCITY2 to DIGITAL MAN on Saturday, January 13, 2018 20:20:00
    P.S. I did confirm that my bbs user is correctly configured to create core files otherwise, ironically when scfg crashed. As I don't have to start it with sudo, it did create one, although I do not appear to have any program installed which is able to open it in any legible format.

    ---
    þ SLMR 2.1a þ "Buck McCoy?!? He was bigger than opium!"
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Digital Man@VERT to Dumas Walker on Saturday, January 13, 2018 17:30:50
    Re: Re: core files not genera
    By: Dumas Walker to NELGIN on Sat Jan 13 2018 08:02 pm

    Do ;SHELL in your bbs then ulimit -a

    You'll probably find it starts up without ulimit set.

    If it was actually running, and not failing to start because of a segmentation fault, that might work. :) As it is, I cannot do anything in the bbs.

    Are you using init.d or systemd to startup? There's hints on the wiki
    for what to put in the systemd startup script to set ulimit.

    There are hints, and I followed the ones for getting a core dumps if you
    are not starting the system as a service. They did not work and I suspect it is because I have to start the bbs by using sudo to run the script. Otherwise, the ports will not bind.

    "I have to start the bbs using sudo".

    No, you do not. If you install Synchronet as service with the instructions here:
    http://wiki.synchro.net/install:nix#daemon_mode
    or here:
    http://wiki.synchro.net/howto:systemd


    (depending on your distro)
    ... you will not need to use "sudo" for anything.

    digital man

    Synchronet/BBS Terminology Definition #46:
    SEXYZ = Synchronet External X/Y/ZMODEM file transfer protocol driver
    Norco, CA WX: 73.2øF, 22.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Dumas Walker on Saturday, January 13, 2018 17:31:16
    Re: core files not generated
    By: Dumas Walker to DIGITAL MAN on Sat Jan 13 2018 08:20 pm

    P.S. I did confirm that my bbs user is correctly configured to create core files otherwise, ironically when scfg crashed. As I don't have to start it with sudo, it did create one, although I do not appear to have any program installed which is able to open it in any legible format.

    Install gdb.
    http://wiki.synchro.net/howto:gdb

    digital man

    This Is Spinal Tap quote #25:
    Viv Savage: Have... a good... time... all the time. That's my philosophy. Norco, CA WX: 73.2øF, 22.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Dumas Walker on Saturday, January 13, 2018 17:43:58
    Re: Re: core files not genera
    By: Dumas Walker to NELGIN on Sat Jan 13 2018 08:02 pm

    Do ;SHELL in your bbs then ulimit -a

    You'll probably find it starts up without ulimit set.

    If it was actually running, and not failing to start because of a segmentation fault, that might work. :) As it is, I cannot do anything in the bbs.

    Are you using init.d or systemd to startup? There's hints on the wiki
    for what to put in the systemd startup script to set ulimit.

    There are hints, and I followed the ones for getting a core dumps if you
    are not starting the system as a service. They did not work and I suspect it is because I have to start the bbs by using sudo to run the script. Otherwise, the ports will not bind.

    What's your limits.conf file look like?

    I ran "man limits.conf" and it contained this possibly helpful note:

    NOTE: group and wildcard limits are not applied to the root user. To set a
    limit for the root user, this field must contain the literal username root.

    digital man

    Synchronet/BBS Terminology Definition #46:
    SEXYZ = Synchronet External X/Y/ZMODEM file transfer protocol driver
    Norco, CA WX: 72.6øF, 24.0% humidity, 3 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nelgin@VERT/EOTLBBS to Dumas Walker on Sunday, January 14, 2018 02:04:50
    On Sat, 13 Jan 2018 20:08:00 -0500, "Dumas Walker"
    <dumas.walker@VERT/CAPCITY2> wrote:

    If you're running sbbs as a service, then your service startup file (e.g.
    sbbs.service or init.d/sbbs file) may need the core limit adjusted there.
    There's a instructions on the gdb wiki page about that.

    I am not running it as a service. I am running it in console, from a shell >script that I envoke with sudo.

    Or maybe a more pertinent question... since sbbs has to be started with >> > sudo in order to bind to port 23, how does one allow superuser to create >> > core files? When I su to root, I get this:

    $ulimit -c
    0
    You could put "ulimit -c unlimited" in your /root/.profile, but I don't think >>that's going to fix the problem (but you could try), unless you're running sbbs
    manually from a login shell as root.

    You are correct, it does not fix it.

    It sounds sort of like someone running it in console, who has to use sudo to >bind port 23, will never get a core file produced. If that is the case, what >do they do when they get a segmentation fault?

    I have this in a file /sbbs/bin/sc
    setcap 'cap_net_bind_service=+ep'
    /sbbs/src/sbbs3/gcc.linux.x64.exe.debug/sbbs

    then I have these /etc/sudoers.d/bbs entries
    bbs ALL=NOPASSWD: /sbbs/bin/sc
    bbs ALL=NOPASSWD: /bin/systemctl stop sbbs
    bbs ALL=NOPASSWD: /bin/systemctl start sbbs

    My sbbs.service entry looks like

    [Unit]
    Description=Synchronet BBS service
    Documentation=man:sbbs
    After=syslog.target network.target

    [Service]
    Type=forking
    Environment=SBBSROOT=/sbbs SBBSCTRL=/sbbs/ctrl SBBSNODE=/sbbs/node1
    User=bbs
    Group=bbs
    PermissionsStartOnly=true
    LimitNOFILE=10000
    LimitCORE=infinity
    ExecStart=/sbbs/src/sbbs3/gcc.linux.x64.exe.debug/sbbs
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifer=synchronet
    ExecReload=/bin/kill -HUP
    Restart=on-failure
    RestartSec=30

    [Install]
    WantedBy=multi-user.target

    Once sbbs is compiled I run sudo /sbbs/bin/sc
    which will allow non-root programs to bind to ports under 1024

    Then as my bbs user I can sudo /bin/systemctl start sbbs
    since this is run as root. It drops permissions to the bbs setups up
    core dumps, file limits, syslog etc.

    That way I don't have to run anything as root. My binkd also runs
    under bbs user.

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From mark lewis@VERT to Dumas Walker on Sunday, January 14, 2018 06:47:40
    On 2018 Jan 13 20:20:00, you wrote to DIGITAL MAN:

    P.S. I did confirm that my bbs user is correctly configured to create
    core
    files otherwise, ironically when scfg crashed. As I don't have to start
    it
    with sudo, it did create one, although I do not appear to have any program installed which is able to open it in any legible format.

    core files can be loaded into the debugger, gdb, for analysis...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Although a Canadian, Mario Martinez is, in fact, an Italian.
    ---
    * Origin: (1:3634/12.73)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Dumas Walker@VERT/CAPCITY2 to DIGITAL MAN on Sunday, January 14, 2018 10:27:00
    No, you do not. If you install Synchronet as service with the instructions here:
    http://wiki.synchro.net/install:nix#daemon_mode
    or here:
    http://wiki.synchro.net/howto:systemd
    (depending on your distro)
    ... you will not need to use "sudo" for anything.

    I tried it as a service and did not like it. It was a long time ago, but I
    am thinking I could not get it to work. So, yes, if I want to run it in a console (I do), I have to run it using sudo.

    ---
    þ SLMR 2.1a þ A noble spirit embiggens the smallest man. -J.Springfield
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Dumas Walker@VERT/CAPCITY2 to DIGITAL MAN on Sunday, January 14, 2018 10:29:00
    What's your limits.conf file look like?

    I ran "man limits.conf" and it contained this possibly helpful note:

    NOTE: group and wildcard limits are not applied to the root user. To set a
    limit for the root user, this field must contain the literal username root.

    Ahhhh, I should have looked there! :)

    As you know now, I ran it without sudo to get a core file. gdb was already installed, so you should have some output in your email box. Thanks!

    ---
    þ SLMR 2.1a þ "You've stolen my soul!" - Granpa Simpson
    þ Synchronet þ CAPCITY2 * capcity2.synchro.net * 1-502-875-8938
  • From Digital Man@VERT to Dumas Walker on Sunday, January 14, 2018 11:39:28
    Re: Re: core files not genera
    By: Dumas Walker to DIGITAL MAN on Sun Jan 14 2018 10:29 am

    What's your limits.conf file look like?

    I ran "man limits.conf" and it contained this possibly helpful note:

    NOTE: group and wildcard limits are not applied to the root user. To set a
    limit for the root user, this field must contain the literal username root.

    Ahhhh, I should have looked there! :)

    As you know now, I ran it without sudo to get a core file. gdb was already installed, so you should have some output in your email box. Thanks!

    Yes, and it appears its crashing in cryptlib. Did deleting the ssl.cert file help?

    digital man

    Synchronet "Real Fact" #27:
    Rob Swindell (digital man) was born approximately 4 hours before the Unix epoch.
    Norco, CA WX: 72.2øF, 24.0% humidity, 1 mph SW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Dumas Walker on Sunday, January 14, 2018 12:41:00
    Re: Re: core files not genera
    By: Dumas Walker to DIGITAL MAN on Sun Jan 14 2018 10:27 am

    No, you do not. If you install Synchronet as service with the instructions here:
    http://wiki.synchro.net/install:nix#daemon_mode
    or here:
    http://wiki.synchro.net/howto:systemd
    (depending on your distro)
    ... you will not need to use "sudo" for anything.

    I tried it as a service and did not like it. It was a long time ago, but I am thinking I could not get it to work. So, yes, if I want to run it in a console (I do), I have to run it using sudo.

    There's actually a way not to using the Linux "capabilties": https://packages.debian.org/stable/libcap2-dev (install this and rebuild sbbs)

    Then perform the step detailed here: http://wiki.synchro.net/howto:linux_non-root

    Another possible option would be to use authbind. http://2ality.com/2010/07/running-tomcat-on-port-80-in-user.html

    ... there are ways.

    digital man

    Synchronet "Real Fact" #78:
    Synchronet Match Maker had at one time over 4000 profiles of men and women. Norco, CA WX: 72.2øF, 24.0% humidity, 1 mph SW wind, 0.00 inches rain/24hrs

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