- Commit of new status monitor

This commit is contained in:
koennecke
2007-01-29 05:36:36 +00:00
parent 4ef7bc5cc0
commit 8f2826b267
4 changed files with 560 additions and 0 deletions

2
.cvsignore Normal file
View File

@ -0,0 +1,2 @@
emergency.scn
recover.bin

322
statemon.c Normal file
View File

@ -0,0 +1,322 @@
/**
* This is a state monitor. It collects all the start and stop messages
* from the device executor and from scan and batch commands. Clients can
* listen to this in order to figure out what is actually going on in a
* given SICS installation. This might in the end supersede the status code
* managment in status.c
*
* copyright: see file COPYRIGHT
*
* Mark Koennecke, January 2007
*/
#include <sics.h>
#include "exeman.h"
#include "scan.h"
#include "scan.i"
#include "stptok.h"
#include "statemon.h"
#include "sicshipadaba.h"
/*==========================================================================*/
typedef struct __STATEMON {
pObjectDescriptor pDes;
pICallBack pCall;
}StateMon;
/*============================ Callbacks =================================*/
static int DevexecCallback(int iEvent, void *text, void *pData,
commandContext cc){
char pDevice[132];
int eventCode;
pStateMon self = (pStateMon)pData;
memset(pDevice,0,132);
if(iEvent == DRIVSTAT){
stptok(text,pDevice,131," ");
if(strstr(text,"started") != NULL){
eventCode = STSTART;
} else if(strstr(text,"finished") != NULL) {
eventCode = STEND;
} else {
printf("Unrecognized event text from devexec in statemon.c: %s\n",
text);
return 0;
}
if(self != NULL){
InvokeCallBack(self->pCall,eventCode,pDevice);
}
}
return 1;
}
/*---------------------------------------------------------------------------*/
static int StateMonScanInterest(int iEvent, void *pEventData, void *pUser,
commandContext cc){
pScanData pScan = NULL;
pStateMon self = (pStateMon)pUser;
pScan = (pScanData)pEventData;
if(pScan == NULL || self == NULL){
printf("Bad StateMonScanInterst in statemon\n");
return 0;
}
if(iEvent == SCANSTART){
InvokeCallBack(self->pCall,STSTART,pScan->objectName);
return 1;
}else if(iEvent == SCANEND){
InvokeCallBack(self->pCall,STEND,pScan->objectName);
return 1;
}
return 1;
}
/*--------------------------------------------------------------------------*/
static int ExeCallback(int iEvent, void *pEvent, void *pUser,
commandContext cc){
pStateMon self = (pStateMon)pUser;
char *name = (char *)pEvent;
char pBueffel[131];
if(self == NULL || name == NULL){
printf("Bad ExeCallback in statemon\n");
return 0;
}
if(iEvent == BATCHSTART){
snprintf(pBueffel,131,"exe %s",name);
InvokeCallBack(self->pCall,STSTART,pBueffel);
return 1;
}
if(iEvent == BATCHEND){
snprintf(pBueffel,131,"exe %s",name);
InvokeCallBack(self->pCall,STEND,pBueffel);
return 1;
}
return 0;
}
/*=============== user callbacks ============================================*/
static int StateInterest(int iEvent, void *pEvent, void *pUser,
commandContext cc){
SConnection *pCon = (SConnection *)pUser;
char *device = (char *)pEvent;
char buffer[256];
if(pCon == NULL || device == NULL){
printf("Bad StateInterest in statemon\n");
return 0;
}
if(iEvent == STSTART){
snprintf(buffer,255,"STARTED = %s", device);
SCWriteInContext(pCon,buffer,eWarning,cc);
}
if(iEvent == STEND){
snprintf(buffer,255,"FINISH = %s", device);
SCWriteInContext(pCon,buffer,eWarning,cc);
}
return 1;
}
/*--------------------------------------------------------------------------*/
static pHdb recurseInterestNode(pHdb current, char *pDevice){
char pSicsdev[131], pAlias[132];
pHdb result = NULL;
char *alias = NULL, *pPtr = NULL;
memset(pSicsdev,0,132);
memset(pAlias,0,132);
if(current != NULL){
if(GetHdbProperty(current,"sicsdev",pSicsdev,131) != 0){
strtolower(pSicsdev);
if(strcmp(pSicsdev,pDevice) == 0){
return current;
}
/*
* try to look for aliases, too
*/
alias = FindAliases(pServ->pSics,pSicsdev);
pPtr = alias;
while((pPtr = stptok(pPtr,pAlias,131,",")) != NULL){
if(strcmp(pAlias,pDevice) == 0){
return current;
}
}
if(alias != NULL){
free(alias);
}
}
current = current->child;
while(current != NULL){
result = recurseInterestNode(current, pDevice);
if(result != NULL){
return result;
}
current = current->next;
}
}
return NULL;
}
/*--------------------------------------------------------------------------*/
static pHdb locateInterestNode(char *device){
char pDevice[132], pSicsdev[132];
pHdb current = NULL, result = NULL;
memset(pDevice,0,132);
memset(pSicsdev,0,132);
/*
* this is to strip off exes batch file name
*/
stptok(device,pDevice,131," ");
strtolower(pDevice);
current = GetHipadabaRoot();
return recurseInterestNode(current,pDevice);
}
/*--------------------------------------------------------------------------*/
static int StateHdbInterest(int iEvent, void *pEvent, void *pUser,
commandContext cc){
SConnection *pCon = (SConnection *)pUser;
char *device = (char *)pEvent, *path = NULL;
char buffer[1024];
pHdb node = NULL;
if(pCon == NULL || device == NULL){
printf("Bad StateHdbInterest in statemon\n");
return 0;
}
node = locateInterestNode(device);
if(node != NULL){
path = GetHipadabaPath(node);
if(iEvent == STSTART){
snprintf(buffer,1024,"%s STARTED", path);
SCWriteInContext(pCon,buffer,eWarning,cc);
}
if(iEvent == STEND){
snprintf(buffer,1024,"%s FINISH", path);
SCWriteInContext(pCon,buffer,eWarning,cc);
}
}
return 1;
}
/*====================== interpreter interface ==============================*/
static void killStateMon(void *pData){
pStateMon self = NULL;
self = (pStateMon)pData;
if(self != NULL){
if(self->pDes != NULL){
DeleteDescriptor(self->pDes);
}
if(self->pCall != NULL){
DeleteCallBackInterface(self->pCall);
}
free(self);
}
}
/*---------------------------------------------------------------------------*/
int StateMonFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]){
pStateMon pNew = NULL;
commandContext cc;
pICallBack target = NULL;
void *pPtr = NULL, *exe = NULL, *pDevexec = NULL;
exe = FindCommandData(pSics,"exe", "ExeManager");
pDevexec = FindCommandData(pSics,"stopexe","DeviceExecutor");
if(exe == NULL || pDevexec == NULL){
SCWrite(pCon,
"ERROR: both the device executor and the batch file module must be installed before initialising statemon",
eError);
return 0;
}
/*
* generate data structures
*/
strcpy(cc.deviceID,"statemon");
cc.transID = -120;
pNew = (pStateMon)malloc(sizeof(StateMon));
if(pNew == NULL){
SCWrite(pCon,"ERROR: out of memory creating StateMon",eError);
return 0;
}
memset(pNew,0,sizeof(StateMon));
pNew->pDes = CreateDescriptor("statemon");
pNew->pCall = CreateCallBackInterface();
if(pNew->pDes == NULL || pNew->pCall == NULL){
SCWrite(pCon,"ERROR: out of memory creating StateMon",eError);
return 0;
}
/*
* register callbacks
*/
target = GetCallbackInterface(pDevexec);
assert(target != NULL);
RegisterCallback(target,cc,DRIVSTAT,DevexecCallback,pNew,NULL);
target = GetCallbackInterface(exe);
assert(target != NULL);
RegisterCallback(target,cc,BATCHSTART,ExeCallback,pNew,NULL);
RegisterCallback(target,cc,BATCHEND,ExeCallback,pNew,NULL);
if(argc > 1) {
pPtr = FindCommandData(pSics,argv[1],"ScanObject");
if(pPtr == NULL){
SCWrite(pCon,"ERROR: failked to locate scan object",eError);
} else {
target = GetCallbackInterface(pPtr);
assert(target != NULL);
RegisterCallback(target,cc,SCANSTART,StateMonScanInterest,pNew,NULL);
RegisterCallback(target,cc,SCANEND,StateMonScanInterest,pNew,NULL);
}
}
/*
* TODO: add kill functions
*/
AddCommand(pSics,"statemon",StateMonAction,killStateMon,pNew);
return 1;
}
/*---------------------------------------------------------------------------*/
int StateMonAction(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]){
long lID;
int i;
pStateMon self = NULL;
self = (pStateMon)pData;
assert(self != NULL);
if(argc < 2){
SCWrite(pCon,"ERROR: not enough arguments to statemon",eError);
return 0;
}
strtolower(argv[1]);
if(strcmp(argv[1],"interest") == 0){
lID = RegisterCallback(self->pCall, SCGetContext(pCon),STSTART, StateInterest,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
lID = RegisterCallback(self->pCall, SCGetContext(pCon),STEND, StateInterest,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
SCSendOK(pCon);
return 1;
} else if(strcmp(argv[1],"uninterest") == 0) {
for(i = 0; i < 2; i++){
lID = SCgetCallbackID(pCon,self->pCall);
if(lID >= 0){
RemoveCallback(self->pCall,lID);
SCUnregisterID(pCon,lID);
}
}
SCSendOK(pCon);
return 1;
} else if(strcmp(argv[1],"hdbinterest") == 0){
lID = RegisterCallback(self->pCall, SCGetContext(pCon),STSTART, StateHdbInterest,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
lID = RegisterCallback(self->pCall, SCGetContext(pCon),STEND, StateHdbInterest,
pCon, NULL);
SCRegister(pCon,pSics, self->pCall,lID);
SCSendOK(pCon);
return 1;
}
SCWrite(pCon,"ERROR: keyword not recognized",eError);
return 0;
}

21
statemon.h Normal file
View File

@ -0,0 +1,21 @@
/**
* This is a state monitor. It collects all the start and stop messages
* from the device executor and from scan and batch commands. Clients can
* listen to this in order to figure out what is actually going on in a
* given SICS installation. This might in the end supersede the status code
* managment in status.c
*
* copyright: see file COPYRIGHT
*
* Mark Koennecke, January 2007
*/
#ifndef STATEMON_H_
#define STATEMON_H_
typedef struct __STATEMON *pStateMon;
/*===================== The interpreter interface ===========================*/
int StateMonFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]);
int StateMonAction(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]);
#endif /*STATEMON_H_*/

215
val.lis Normal file
View File

@ -0,0 +1,215 @@
==16499== Memcheck, a memory error detector for x86-linux.
==16499== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==16499== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==16499== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==16499== For more details, rerun with: -v
==16499==
WARNING: Cannot log(Accepted dummy connection )
sim/topsi/morpheus.tcl:0>> ServerOption ReadTimeOut 10
sim/topsi/morpheus.tcl:1>> ServerOption AcceptTimeOut 50
sim/topsi/morpheus.tcl:2>> ServerOption ReadUserPasswdTimeout 500000
sim/topsi/morpheus.tcl:3>> ServerOption LogFileBaseName $loghome/morpheus
sim/topsi/morpheus.tcl:4>> ServerOption TecsPort 9753
sim/topsi/morpheus.tcl:5>> ServerOption ServerPort 2911
sim/topsi/morpheus.tcl:6>> ServerOption InterruptPort 9709
sim/topsi/morpheus.tcl:7>> ServerOption statusfile $datahome/morpheusstatus.tcl
sim/topsi/morpheus.tcl:8>> ServerOption TelnetPort 1301
sim/topsi/morpheus.tcl:9>> ServerOption TelWord sicslogin
sim/topsi/morpheus.tcl:10>> ServerOption QuieckPort 2108
sim/topsi/morpheus.tcl:11>> TokenInit connan
sim/topsi/morpheus.tcl:12>> ServerOption LogFileDir $loghome
sim/topsi/morpheus.tcl:13>> commandlog auto
sim/topsi/morpheus.tcl:14>> ServerOption RedirectFile $loghome/mostdout
sim/topsi/morpheus.tcl:15>> MakeDataNumber SicsDataNumber $datahome/DataNumber
sim/topsi/morpheus.tcl:16>> VarMake SicsDataPath Text Mugger
sim/topsi/morpheus.tcl:17>> SicsDataPath $datahome/
sim/topsi/morpheus.tcl:18>> SicsDataPath lock
sim/topsi/morpheus.tcl:19>> VarMake SicsDataPrefix Text Mugger
sim/topsi/morpheus.tcl:20>> SicsDataPrefix lock
sim/topsi/morpheus.tcl:21>> VarMake SicsDataPostFix Text Mugger
sim/topsi/morpheus.tcl:22>> SicsDataPostFix .dat
sim/topsi/morpheus.tcl:23>> SicsDataPostFix lock
sim/topsi/morpheus.tcl:24>> SicsUser lnsmanager lnsSICSlns 1
sim/topsi/morpheus.tcl:25>> SicsUser morpheususer 06lns1 2
sim/topsi/morpheus.tcl:26>> SicsUser mu 06lns1 2
sim/topsi/morpheus.tcl:27>> VarMake Instrument Text Internal
sim/topsi/morpheus.tcl:28>> VarMake sample Text User
sim/topsi/morpheus.tcl:29>> sample " "
sim/topsi/morpheus.tcl:30>> VarMake Title Text User
sim/topsi/morpheus.tcl:31>> Title "morpheus"
sim/topsi/morpheus.tcl:32>> VarMake User Text User
sim/topsi/morpheus.tcl:33>> User "unknown"
sim/topsi/morpheus.tcl:34>> VarMake email Text User
sim/topsi/morpheus.tcl:35>> email "unknown"
sim/topsi/morpheus.tcl:36>> VarMake adress Text User
sim/topsi/morpheus.tcl:37>> adress "unknown"
sim/topsi/morpheus.tcl:38>> VarMake fax Text User
sim/topsi/morpheus.tcl:39>> fax "unknown"
sim/topsi/morpheus.tcl:40>> VarMake phone Text User
sim/topsi/morpheus.tcl:41>> phone "unknown"
sim/topsi/morpheus.tcl:42>> VarMake BatchRoot text User
sim/topsi/morpheus.tcl:43>> VarMake lastscancommand Text User
sim/topsi/morpheus.tcl:44>> lastscancommand "unknown scan"
sim/topsi/morpheus.tcl:45>> Publish savemotorpar Mugger
sim/topsi/morpheus.tcl:46>> SicsAlias STH A3
sim/topsi/morpheus.tcl:47>> SicsAlias STH SOM
sim/topsi/morpheus.tcl:48>> SicsAlias STH TH
sim/topsi/morpheus.tcl:49>> SicsAlias STH OM
sim/topsi/morpheus.tcl:50>> SicsAlias STT A4
sim/topsi/morpheus.tcl:51>> SicsAlias STT S2T
sim/topsi/morpheus.tcl:52>> SicsAlias STT TTH
sim/topsi/morpheus.tcl:53>> SicsAlias STT 2T
sim/topsi/morpheus.tcl:54>> SicsAlias SCX SCH
sim/topsi/morpheus.tcl:55>> SicsAlias SCY SPH
sim/topsi/morpheus.tcl:56>> SicsAlias SCY ATX
sim/topsi/morpheus.tcl:57>> SicsAlias PO1 POL
sim/topsi/morpheus.tcl:58>> SicsAlias PO2 ANA
sim/topsi/morpheus.tcl:59>> SicsAlias MTH A1
sim/topsi/morpheus.tcl:60>> SicsAlias MTH MOM
sim/topsi/morpheus.tcl:61>> SicsAlias MTT A2
sim/topsi/morpheus.tcl:62>> SicsAlias MTT M2T
sim/topsi/morpheus.tcl:63>> SicsAlias MFV MCV
sim/topsi/morpheus.tcl:64>> SicsAlias SCX CHI
sim/topsi/morpheus.tcl:65>> SicsAlias SCY PHI
sim/topsi/morpheus.tcl:66>> MakeLin2Ang sttl utt
sim/topsi/morpheus.tcl:67>> sttl length 2110
sim/topsi/morpheus.tcl:68>> SicsAlias sttl u2t
sim/topsi/morpheus.tcl:69>> MakeO2T O2T sth stt
sim/topsi/morpheus.tcl:70>> MakeO2T O2TL sth sttl
sim/topsi/morpheus.tcl:71>> MakeO2T O2U sth sttl
sim/topsi/morpheus.tcl:72>> MakeScanCommand xxxscan counter $scripthome/morpheus.hdd \
$loghome/recover.bin
sim/topsi/morpheus.tcl:73>> MakePeakCenter xxxscan
sim/topsi/morpheus.tcl:74>> xxxscan configure soft
sim/topsi/morpheus.tcl:75>> MakeOptimise opti counter
sim/topsi/morpheus.tcl:76>> SicsAlias drive dr
sim/topsi/morpheus.tcl:77>> DefineAlias TT temperature
sim/topsi/morpheus.tcl:78>> MakeHKL stt sth sph sch
sim/topsi/morpheus.tcl:79>> MakeHKLMot hkl
sim/topsi/morpheus.tcl:80>> MakeUBCalc ubcalc hkl
sim/topsi/morpheus.tcl:81>> MakeCone cone ubcalc
sim/topsi/morpheus.tcl:82>> MakeXYTable table
sim/topsi/morpheus.tcl:83>> MakeConfigurableMotor two
sim/topsi/morpheus.tcl:84>> two drivescript twoscript
ERROR: duplicate exe manager not created
sim/topsi/morpheus.tcl:85>> fileeval $scripthome/morpheuscom.tcl
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:86>> MakeStateMon xxxscan
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:87>> hmake /morpheus spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:88>> hsetprop /morpheus type instrument
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:89>> hmake /graphics spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:90>> hsetprop /graphics type graphset
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:91>> hmake /commands spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:92>> hsetprop /commands type commandset
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:93>> hattach /morpheus title title
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:94>> hmake /morpheus/user spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:95>> hsetprop /morpheus/user type dev
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:96>> hattach /morheus/user user name
ERROR: path to attach object too not found
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:97>> hattach /morpheus/user adress address
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:98>> hattach /morpheus/user phone phone
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:99>> hattach /morpheus/user email email
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:100>> hmake /morpheus/monochromator spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:101>> hsetprop /morpheus/monochromator type part
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:102>> hattach /morpheus/monochromator lambda wavelength
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:103>> hattach /morpheus/monochromator mth theta
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:104>> hattach /morpheus/monochromator mtt two_theta
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:105>> hattach /morpheus/monochromator mtx x_translation
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:106>> hattach /morpheus/monochromator mty y_translation
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:107>> hattach /morpheus/monochromator mfv vertical_focusing
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:108>> hmakescript /morpheus/monochromator/d_value "mono dd" "mono dd" float
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:109>> hsetprop /morpheus/monochromator/d_value priv manager
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:110>> hmakescript /morpheus/monochromator/scattering_sense "mono ss" "mono ss" int
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:111>> hsetprop /morpheus/monochromator/scattering_sense priv manager
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:112>> hmake /morpheus/slit1 spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:113>> hsetprop /morpheus/slit1 type part
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:114>> hattach /morpheus/slit1 d1l left
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:115>> hattach /morpheus/slit1 d1r right
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:116>> hattach /morpheus/slit1 d1t top
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:117>> hattach /morpheus/slit1 d1b bottom
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:118>> hmake /morpheus/slit2 spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:119>> hsetprop /morpheus/slit2 type part
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:120>> hattach /morpheus/slit2 d2l left
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:121>> hattach /morpheus/slit2 d2r right
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:122>> hattach /morpheus/slit2 d2t top
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:123>> hattach /morpheus/slit2 d2b bottom
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:124>> hmake /morpheus/sample spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:125>> hsetprop /morpheus/sample type part
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:126>> hattach /morpheus/sample sample name
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:127>> hattach /morpheus/sample sth omega
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:128>> hattach /morpheus/sample stt two_theta
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:129>> hattach /morpheus/sample stx x_translation
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:130>> hattach /morpheus/sample sty y_translation
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:131>> hattach /morpheus/sample sgy y_goniometer
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:132>> hattach /morpheus/sample sgx x_goniometer
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:133>> hmake /morpheus/monitor spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:134>> hsetprop /morpheus/monitor type part
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:135>> hmakescript /morpheus/monitor/counts "counter getmonitor 1" hdbReadOnly int
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:136>> hsetprop /morpheus/monitor/counts priv internal
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:137>> hmakescript /morpheus/monitor/preset "counter getpreset" "counter setpreset" float
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:138>> hmakescript /morpheus/monitor/countmode "counter getmode" "counter setmode" text
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:139>> hmake /morpheus/counter spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:140>> hsetprop /morpheus/counter type part
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:141>> hmakescript /morpheus/counter/counts "counter getcounts" hdbReadOnly int
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:142>> hsetprop /morpheus/counter/counts priv internal
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:143>> hmake /graphics/scan_data spy none
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:144>> hsetprop /graphics/scan_data type graphdata
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:145>> hsetprop /graphics/scan_data viewer default
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:146>> hmake /graphics/scan_data/rank mugger int
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:147>> hset /graphics/scan_data/rank 1
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:148>> hsetprop /graphics/scan_data/rank priv internal
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:149>> hmakescript /graphics/scan_data/dim "xxxscan np" hdbReadOnly intar 1
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:150>> hsetprop /graphics/scan_data/dim priv internal
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:151>> hmakescript /graphics/scan_data/scan_variable "gethdbscanvardata 0" hdbReadOnly floatvarar 1
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:152>> hsetprop /graphics/scan_data/scan_variable type axis
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:153>> hsetprop /graphics/scan_data/scan_variable dim 0
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:154>> hsetprop /graphics/scan_data/scan_variable priv internal
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:155>> hmakescript /graphics/scan_data/counts "gethdbscancounts" hdbReadOnly intvarar 1
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:156>> hsetprop /graphics/scan_data/counts type data
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:157>> hsetprop /graphics/scan_data/counts priv internal
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:158>> hcommand /commands/scan hdbscan
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:159>> hsetprop /commands/scan type command
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:160>> hsetprop /commands/scan priv user
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:161>> hmake /commands/scan/scan_variables user text
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:162>> hmake /commands/scan/scan_start user text
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:163>> hmake /commands/scan/scan_increments user text
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:164>> hmake /commands/scan/NP user int
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:165>> hmake /commands/scan/mode user text
/home/koenneck/psi/workspace/sics/sim/topsi/morpheuscom.tcl:166>> hmake /commands/scan/preset user float
OK
==16499== Invalid read of size 4
==16499== at 0x807D1B4: CheckPointer (callback.c:73)
==16499== by 0x807D408: RegisterCallback (callback.c:163)
==16499== by 0x80F4593: StateMonAction (statemon.c:276)
==16499== by 0x8051B55: InterpExecute (SCinter.c:319)
==16499== Address 0x45C708EC is not stack'd, malloc'd or (recently) free'd
==16499==
==16499== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==16499== Access not within mapped region at address 0x45C708EC
==16499== at 0x807D1B4: CheckPointer (callback.c:73)
==16499== by 0x807D408: RegisterCallback (callback.c:163)
==16499== by 0x80F4593: StateMonAction (statemon.c:276)
==16499== by 0x8051B55: InterpExecute (SCinter.c:319)
valgrind: vg_signals.c:1660 (make_coredump): Assertion `vgPlain_lseek(core_fd, 0, 1) == phdrs[i].p_offset' failed.
==16499== at 0xB002B765: vgPlain_skin_assert_fail (in /usr/lib/valgrind/stage2)
==16499== by 0xB002B764: assert_fail (in /usr/lib/valgrind/stage2)
==16499== by 0xB002B7A2: vgPlain_core_assert_fail (in /usr/lib/valgrind/stage2)
==16499== by 0xB0031009: make_coredump (in /usr/lib/valgrind/stage2)
sched status:
Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
==16499== at 0x807D1B4: CheckPointer (callback.c:73)
==16499== by 0x807D408: RegisterCallback (callback.c:163)
==16499== by 0x80F4593: StateMonAction (statemon.c:276)
==16499== by 0x8051B55: InterpExecute (SCinter.c:319)
Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.
If that doesn't help, please report this bug to: valgrind.kde.org
In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using. Thanks.