Opened 10 years ago

Last modified 10 years ago

#822 assigned defect

run-program and save-application don't work together

Reported by: Neronus2 Owned by: gb
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: crash, run-program, save-application Cc:

Description (last modified by gb)

When I start a program with run-program and then save an application via save-application, then the next time the application is run and quits, there is a memory fault.

My guess: Clozure registers started applications somewhere. After the image was saved and restarted, this list of course is empty. Solution: Forget all active processes during save-application.


*(7FEA07A39BB0) : 0 (LISP-THREAD-SUSPEND-COUNT #<LISP-THREAD listener [tcr @ #x7F5718C44570] #x3020005B538D>) 175
 (7FEA07A39C10) : 1 (PROCESS-ACTIVE-P #<A Foreign Pointer [stack-allocated] #x7F5718C44570>) 141
 (7FEA07A39C30) : 2 (PREPARE-TO-QUIT NIL) 429
 (7FEA07A39CF8) : 4 (FUNCALL #'#<(:INTERNAL QUIT)>) 509
 (7FEA07A39DE8) : 7 (FUNCALL #'#<CCL::XCMAIN> 17591790266418) 701
 (7FEA07A39E70) : 8 (%PASCAL-FUNCTIONS% 1 17591790266418) 397
*(7FEA07A39ED8) : 9 (%NANOSLEEP ???) NIL
 (7FEA07A39F28) : 10 (%NANOSLEEP 0 330000000) 589
 (7FEA07A39F90) : 11 (HOUSEKEEPING-LOOP) 501

Change History (1)

comment:1 Changed 10 years ago by gb

  • Description modified (diff)
  • Owner set to gb
  • Status changed from new to assigned

There may be two (not directly related) issues here.

  1. CCL's notion of what external processes are running isn' reset by SAVE-APPLICATION.
  1. There may be a race condition in some cases where thread A tries to determine the state of thread B and thread B exits while thread A is looking at it.

The backtrace seems to suggest case (2), but I don't know what was being accessed when you faulted, or what version of CCL you're running on what OS, and these things matter.

If you still have the image that generated this error when SAVE-APPLICATION was called, can you tell me whether or not:

? (ccl::process-tcr *current-process*)


? (ccl::%current-tcr)

return the same value when called in the listener ?

Note: See TracTickets for help on using tickets.