Re: debugging seg fault

[email protected] (Don Cohen)
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>
(btw I figured out how to do the debuginfo install but the result
was almost unchanged.)

Vladimir Tzankov writes:
 > Good, thanks.
 > 
 > Can you elaborate a little bit more what you are doing (some
 > pseudocode)? I see the thread was interrupted and invoke-debugger
 > called in its context. Did you kill the thread (internally calls
 > thread-interrupt) or just execute something in thread's context?

Here's the file I load into an image already containing ap5:
  http://chmusic.org/private/startup.lsp
This creates a debug server, then loads all sorts of other stuff.

Then I telnet to the debug server at the port defined in the conf file:
  $ telnet localhost 8226
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.

  ((1 . #<THREAD "debugger-2016-6-20 02:07:09">)
   (2 . #<THREAD "keep-updating-clock">) (3 . #<THREAD "debug-server">)
   (4 . #<THREAD "main thread">))
  enter the number of a thread to interrupt/debug: 1
  1

  ** - Continuable Error
  debug
  If you continue (by typing 'continue'): Return from BREAK loop
  The following restarts are also available:
  ABORT          :R1      ABORT
  Break 1 [1]> (load "code/aimdrive/ad-package.lsp")
  (load "code/aimdrive/ad-package.lsp")

[that just creates a package needed for the next load]

  ;; Loading file code/aimdrive/ad-package.lsp ...
  ;; Loaded file code/aimdrive/ad-package.lsp
  #P"/home/smb/code/aimdrive/ad-package.lsp"
  Break 1 [1]> (load "code/aimdrive/aimedit.lsp")
  (load "code/aimdrive/aimedit.lsp")

  ;; Loading file code/aimdrive/aimedit.lsp ...Connection closed by foreign host.
  [2016-06-20 02:07:59 root@tw1 /home/smb]
And of course, at this point the original image in which I loaded 
the file at the url has exited with a segfault.

The form that's being executed when the crash occurs is just a
regular defun as far as I can tell:

(defun get-attributes (type-name &aux type)
  (unless (symbolp type-name)
          (setq type-name (intern type-name "AD")))
  (setf type (relationp type-name))
  (unless (relationp type)
          (return-from get-attributes "NOT_A_TYPE"))
  (let ((rels (listof x s.t. (and (typeconstraint x 0 type)
                                  (relationarity x 2)))))
    (loop for rel in rels
          unless (ap5::derivedrel rel)
          collect
          (symbol-name (relationname rel)))))

At least once I've done a read on the file, producing the code above,
then an eval of it, which crashed.
In the past I've done lots of defuns (probably even loads) from 
debug threads, so I don't expect that I can create a small example
just by loading the debug server into a regular mt lisp and doing
any old load.

Let me know how to proceed.

BTW, I've also had some trouble with what I interpret as locking.
I load a file and it stops.  I control-c then resume by redoing
some form and it continues past the place where it stopped before.
The form where it stops is doing some locking, but it's not clear
to me either what sort of problem would be fixed by break and redo
or how to figure out what's going on when it's stuck.
So any advice on that would also be appreciated.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.