When running a simulation for a channel assignment algorithm in mesh network in NS3.25 I get the following error:
assert failed. cond="tc != 0", file=..src/internet/model/ipv4-l3-protocol.cc
terminate called without an active exception
I have tried the simulation with different parameter settings. However, I still get the same error. I cant figure out its cause, or what should I try to eliminate it.
Seems to me, just looking at the variable names, that you're missing Traffic Control (tc) layer in the node, since assertion fails. Have you initialized your IPv4 stack on the node using InternetStackHelper?
It sets a simple FIFO TC layer by default if none other is provided. If you initialized your stack manually, without using the helper, that may be the problem.
Related
I am using Ignite.Net and I have a very simple use case, wherein I want to put something into the cache without any transaction using CacheAtomicityMode.ATOMIC, to achieve that I am trying to use putIfAbsentAsync(key,Value) method.
But having a look at the description of the method on
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/IgniteCache.html#putIfAbsentAsync-K-V- page, I am a bit confused!
Being new to Ignite can you please help me understand this better?Below are my doubts.
Description of putIfAbsentAsync method in the above link states the below
"For CacheAtomicityMode.ATOMIC return value on primary node crash may be incorrect because of the automatic retries.It is recommended to disable retries with withNoRetries() and manually restore primary-backup consistency in case of update failure."
Can you please explain what are automatic retries ? How and when to use it ?
What are pros and cons of disabling retries with withNoRetries() ?
I am also using ReplaceAsync(), RemoveAsync() And PutIfAbsentAsync() with the same cache configuration. Will there be any impact on the functionally of these functions after disabling retries?
What are the possible scenarios where in primary node may crash?
In what scenarios will putIfAbsentAsync() return false?
In what scenarios will putIfAbsentAsync() throw an exception? And List of all possible exception ?
I know the above link states the list of exceptions
(TransactionTimeoutException,TransactionRollbackException,TransactionHeuristicException) But all three are related to Transactions ! I don't really understand why Transaction exception will be thrown in ATOMIC mode, as there aren't any transactions in ATOMIC mode ?
I tried another use case have just one server node and one client node. Server Node creates and stores the cache and client Node just puts or gets cache ,When I manual stopped the server node just before a client node was trying to put something in the cache I got SocketException i.e java.net.SocketException: Socket is closed Exception. If this is a valid use case it would be better if you list these exception on the page.
I don't understand this line "manually restore primary-backup consistency in case of update failure" can you please explain what is primary-backup consistency ? and how to manually restore it ?
withNoRetries() just disallows retries. If operation fails, you get exception promptly. This compared to default behavior where operation will be retried until it is possible.
See more about ATOMIC limitations and IEP-12 in the docs. Note that normally this is only possible when more than one node leaves cluster at once.
In my environment, I have connected predictor bus_in port to output analysis port of monitor. I have also implement reg_adapter bus2reg function and connect adapter to predictor.
I'm using passive prediction (https://verificationacademy.com/cookbook/registers/integrating). The mirror value of uvm_reg should be updated automaticly as long as there's transaction sent from monitor. However I did not see that happen. When I check the source code for uvm_reg_predictor, it seems like it failed in get_reg_by_offset() function so that it did not get uvm_reg object. Did anyone has similar issue? If so, what's your solution? Thanks.
This issue can be resolved by configuring the offset in the REG map.
Make sure that the transactions (address) received by adapter and the address in the REG map are same. Add set_auto_predict(0) for turning off implicit prediction. The reg_offset failed since there was an address mismatch and Mapping was not happening henceforth the predict method for that register was not getting called implicitly.
My goal is to influence the error descriptions that appear in BizTalk Administration Console in the Error Information tab of suspended instance windows, after errors occur in my custom functoids. If possible, I would also like the ErrorReport.Description promoted property to display this error description on the failed message.
I've read everything I can find about custom functoid development, but I can't find much about error handling within them. In particular, whenever my functoids throw exceptions, I see the boilerplate "Exception has been thrown at the target of an invocation" message that occurs whenever exceptions occur through reflection, rather than the message on the exception itself.
I had hoped to find something within the BaseFunctoid class framework that would allow me to submit an error string, so as to traverse the reflection boundary. Is there some way to pass error information from within a custom functoid, such that the BizTalk Administration Console will display it?
If I emulate the approach taken by DatabaseLookupFunctoid and DatabaseErrorExtractFunctoid, is there some way I can fail the map with the extracted error, rather than mapping it to a field on the destination schema as is shown in its examples?
The simplest way to do this is using custom C#, writing something like this in your code:
System.Diagnostics.EventLog.WriteEntry("EVENT_LOG_SOURCE", "Error message...", System.Diagnostics.EventLogEntryType.Error);
As Johns-305 mentions, you need to make sure your event source is registered (e.g. System.Diagnostics.EventLog.CreateEventSource("EVENT_LOG_SOURCE", "Application") - but this should really be done as part of your installation steps with an EventLogInstaller or some kind of script to set up the environment). It's certainly true that error handling in BizTalk is just .NET error handling, but one thing to keep in mind is that maps are actually executing as XSLT, and the context in which their executing can have a major impact on how exceptions and errors will be handled, particularly unhandled exceptions.
Orchestrations
If you're executing a transform in an orchestration that has exception handling in it, the exception thrown will be handled and may even fall into additional logging you have in the orchestration - in other words, executing a throw from a C# functiod will work the way you'd think it would work elsewhere in C#. However, I try to avoid this since you never know if a map will at some point be used else where and because exception handling in XSLT doesn't always work the way you'd think (see below).
Send/Receive Ports
Unfortunately, if you're executing a map on a send or receive port and throw an exception within it, you will almost definitely get very unhelpful error message in the event log and a suspended instance in the group hub. There is no easy, straightforward way to simple "cancel" a transform - XSLT 1.0 doesn't have any specified way of doing that (see for example Throwing an exception from XSLT). That leaves you with outputting an error string to a particular node in the output (and/or to the EventLog), or writing lots of completely custom XSLT to try to validate input, or designing your schemas properly and using a validating component where necessary. For example, if you have a node that must match a particular regex, or should never be empty, or should never repeat more than X times, make sure you set those restrictions on the schema and then make sure you pass it through the XmlValidator or similar before attempting to map.
The simplest answer is, you just do.
Keep in mind, there is nothing special at all about error handling in BizTalk apps, it's just regular plain old .Net error handling.
So, what you do is catch the error in you code, write the details to the Windows Event Log (be sure to create a custom Event Source) and...that's it. That is all I do. I don't worry about what appear in BT Admin specifically.strong text
Suppose I have a controller method like so:
#expose()
def search(self, title):
return dict()
Going to http://site/search/ will cause an exception to be thrown: TypeError: search() takes exactly 2 arguments (1 given).
The error is logical, but I'd rather handle it more gracefully. Is using *args or **kwargs the only way to avoid an error that I don't even seem to be able to catch?
EDIT: I guess I could always use title=None, but too much of that could get ugly...
Anyway, is there a way to catch the exception and/or handle argument mismatches more gracefully?
Thanks
The exception thrown at you for specifying an "incompatible" controller method signature only happens in debug / development mode.
You dont need to handle it more gracefully in a production environment, because once you disable development mode, controller methods send an HTTP 500 Error when they lack essential parameters.
You might want to consider the respective settings in your development.ini:
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to
# execute malicious code after an exception is raised.
set debug = false
I hope this was your question.
In the case that you still want the controller do its work, even though its lacks important parameters, you must define default values, else the controller cannot do its work properly anyway.
The question you better ask yourself is: Do you simply want a nicer error message, or do you want the controller to be able to do its task. In the latter case, specifying default parameters is best practise, *args and **kwargs for each method just so the customer doesnt get an error is a very ugly hack in my option.
If you want to change the display of these errors refer to /controllers/error.py
Hope this helped,
Tom
I'm trying to talk to a USB device using libusb, but I feel like I'm tripping up on the first leg of the race. I know precisely what endpoints I need to talk to, etc., but I can't even get that far. I have, in essence:
usb_device *dev = ...; // opened from get_busses()
usb_set_configuration(dev, dev->config[0].bConfigurationValue); // bConfigVal = 1
Now, I can look at the device information in debug mode and I know that the current configuration is 0 (uninitialized / just after restart), and there's exactly 1 valid configuration, which has a configuration number of 1. But when I set the config to 1, I get a return value of -22, which (passed through the stringifier) translates to "windows api error: bad parameter.
I haven't been able to find other people having a similar problem, and it seems like such a simple thing to do -- I can't even claim the interface, or set the alt-interface, or anything like that, because I have to set the configuration first. What am I missing? (if it matters: this is on WinXP)
Looking at libusb-win32\src\driver\set_configuration.c, there seem to be a bunch of different reasons for returning STATUS_INVALID_PARAMETER.
Use libusb_set_debug (from your user mode application) to set verbose debug level, then run Sysinternals DebugView to see the driver's error messages. Hopefully you'd see a clue as to why your set_configuration call fails.