fault

Determine whether memory location is in CPU cache

混江龙づ霸主 提交于 2020-01-01 05:05:07
问题 It is possible for an operating system to determine whether a page of memory is in DRAM or in swap; for example, simply try to access it and if a page fault occurs, it wasn't. However, is the same thing possible with CPU cache? Is there any efficient way to tell whether a given memory location has been loaded into a cache line, or to know when it does so? 回答1: In general, I don't think this is possible. It works for DRAM and the pagefile since that is an OS managed resource, cache is managed

How to throw FaultException from self hosting wcf service?

泪湿孤枕 提交于 2019-12-25 03:19:23
问题 I'm planning to host the service in windows service, but I'm thinking about the problem described in the title. Anyone had similar issue? Thanks Update The problem is that when you throw an exception in WinForms/WPF/Win Service app, the program crashes and you'll have to restart it. 回答1: An exception does not always crash your server. Even an unexpected server-side exception will be transferred to the client. It is considered more severe than an expected one though, faulting the channel. The

“Core Data could not fulfill a fault” for objects that were not deleted

廉价感情. 提交于 2019-12-24 19:29:53
问题 For a recent update to an app, I am seeing many crash logs with the error that core data could not fulfill a fault. But nowhere in the app (startup, or elsewhere) did I delete the objects whose faults cannot be fulfilled, nor would they have been cascade deleted. How else can this error be happening? And is there a way to catch it and fix it within the live app? Could it also be if you added but did not properly save the object yet? 回答1: It is possible that an object that was not "properly"

Segmentation fault (core dumped) error in C

99封情书 提交于 2019-12-24 09:35:46
问题 I am trying to write a C program to sum and substract two complex numbers. Here's the code: #include <stdlib.h> #include <stdio.h> typedef struct cplx { int re; int im; } cplx; cplx* sum(cplx *x, cplx *y,int n) { cplx *z; int i; for(i=0;i<n;i++) { z[i].re=x[i].re+y[i].re; z[i].im=x[i].im+y[i].im; } return z; } cplx* difference(cplx *x, cplx *y, int n) { cplx *z; int i; for(i=0;i<n;i++) { z[i].re=x[i].re-y[i].re; z[i].im=x[i].im-y[i].im; } return z; } cplx* sumdiff(cplx *x,cplx *y, int n,cplx*

Faulting module what does this mean and why does this happen?

丶灬走出姿态 提交于 2019-12-23 22:18:57
问题 I have an apllication written in .net C# and it sporafdically crashes (not responding) the windows event log ahd the following message. (teh dll it refers to is unmanaged code) does anyone know what does this exception mean? what might cause this? and what are the ways to solve this? Faulting application name: Application.exe, version: 4.2.11.0, time stamp: 0x4e8d8e86 Faulting module name:myDll.DLL_unloaded, Exception code: 0xc0000005 Fault offset: 0x0000000180004d3c Faulting module path:

How to shuffle a list with Gaussian distribution

十年热恋 提交于 2019-12-23 19:23:03
问题 I want to simulate fault on a message (Eg: 1000010011 => 1010000011). Is there a way to implement this in Python? I tried the following, which works: import random a = "1011101101" b = [el for el in a] # b = ['1', '0', '1', '1', '1', '0', '1', '1', '0', '1'] random.shuffle(b) print b # b = ['0', '1', '1', '1', '0', '1', '1', '1', '1', '0'] random.shuffle(b, random.random) print b # b = ['1', '1', '0', '1', '1', '0', '1', '0', '1', '1'] I would like my reordering to be Normally/Gaussian

When to use WCF Fault Exception

a 夏天 提交于 2019-12-23 11:54:52
问题 I have a simple WCF service that carries out a simple operation: [OperationContract] DoSomething (Stuff input); If an exception occurs inside DoSomething then a FaultException will be returned. Given that all the client needs to know is whether something went wrong, would you say that there's no need to define a FaultException in this scenario? 回答1: It is always good practice to return a FaultException , since if you do not, the channel will be faulted and cannot be used again. The decision

iPhone Core Data relationship fault

半城伤御伤魂 提交于 2019-12-22 08:29:49
问题 I am building a core data iphone app, and having trouble with retrieving one-many relationship data. Please bear with me while I explain. I have used the data model designer to setup an entity called "Item" that contains many entities called "Comment". I then retrieve multiple entities and display them in a UITableView . I fetch these entities like this (in the viewDidLoad method): NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription

BizTalk Catch Http Response Code

拈花ヽ惹草 提交于 2019-12-19 03:21:15
问题 I have a orchestration which is receive a request from local rest service then send request to another remote Rest Service then if the remote service returns a response successfully with 200 HTTP code BizTalk can be able to process response message, but if HTTP response code different then 200 BizTalk could not process fault response message. BizTalk log gives below error on event viewer. Details:"System.Net.WebException: The remote server returned an unexpected response: (400) Bad Request. {

Fault injection for .NET apps?

随声附和 提交于 2019-12-18 12:55:18
问题 I am wondering if anyone knows of tools or techniques to automatically inject common faults into a running .NET program. Stuff like... Randomly inject an OutOfMemoryException upon allocation Randomly inject FileNotFoundException upon trying to access a files Randomly inject IO or Network exceptions upon using a socket. So I'm really looking for a way to intercept some specific calls in the CLR similar to what AppVerifier does for native Win32 code. The purpose is to test apps under lots of