Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howto:gdb [2018/03/24 01:38] – [Debugging] Add attach to running instance instructions digital manhowto:gdb [2019/05/07 15:10] – [Debugging] mention "bt full" and "-ex run -args" and such digital man
Line 35: Line 35:
   LimitCORE=infinity   LimitCORE=infinity
      
-:!: Linux Sysops: to help locate sbbs crash core files, the following +:!: **Linux Sysops**:\\ 
-lines in your ''/etc/sysctl.conf'' file can be helpful:+To help locate sbbs crash core files, adding the following lines in your ''/etc/sysctl.conf'' file can be helpful:
  
   # Controls whether core dumps will append the PID to the core filename.   # Controls whether core dumps will append the PID to the core filename.
Line 45: Line 45:
 This will place core files with the name ''core.sbbs.####'' in the ''/tmp'' directory This will place core files with the name ''core.sbbs.####'' in the ''/tmp'' directory
 instead of ''core.####'' in the current directory (typically ''/sbbs/ctrl''). instead of ''core.####'' in the current directory (typically ''/sbbs/ctrl'').
 +
 +Also, if you're using the ''setuid'' feature of sbbs (e.g. starts as //root// but changes to a different user after binding ports), then you may need to add the following line to your ''/etc/sysctl.conf'' file:
 +  fs.suid_dumpable = 2
 +  
 +You can also set ''suid_dumpable'' immediately and temporarily with the following command:
 +  # echo 2 > /proc/sys/fs/suid_dumpable
 +  
  
 ===== Debugging ===== ===== Debugging =====
Line 55: Line 62:
   # gdb /sbbs/exec/sbbs <pid>   # gdb /sbbs/exec/sbbs <pid>
  
-B. Run Synchronet (if no core file used):+B. Run Synchronet non-daemonized (if no core file used):
   (gdb) run -nd   (gdb) run -nd
  
 C. After segfault or other crash (or when using a core), display back-trace: C. After segfault or other crash (or when using a core), display back-trace:
   (gdb) bt   (gdb) bt
 +or (if more details are needed):
 +  (gdb) bt full
  
 D. If (and only if) the last line of the output looks like this: D. If (and only if) the last line of the output looks like this:
Line 67: Line 76:
  
 E. Copy and paste in e-mail to rob[at]synchro[dot]net or post in one of the Synchronet [[support|discussion groups]]. E. Copy and paste in e-mail to rob[at]synchro[dot]net or post in one of the Synchronet [[support|discussion groups]].
 +
 +**TIP:**\\
 +To run Synchronet (non-daemonized) directly from the GNU debugger without having to type "run" at a ''(gdb)'' prompt:
 +  # gdb -ex run -args sbbs -nd
  
 ==== Handling SIGPIPE ==== ==== Handling SIGPIPE ====
Line 77: Line 90:
  
 ===== See Also ===== ===== See Also =====
-  * [[:howto:|howto index]]+  * [[:howto:|How-To index]] 
 +  * [[https://wiki.debian.org/HowToGetABacktrace]]
  
 {{tag>debug unix linux gdb}} {{tag>debug unix linux gdb}}